CODING EA PYRAMID

Posted: May 19, 2011 in Expert Advisor

Ini ada daleman PyramidEA namun coding ini hanya berjalan di acc demo.. ada coding lock acc nya..
jika temen-temen pengen make di acc real, temen-temen harus menemukan lockingnya dan edit, pasti bisa berjalan di acc real..

Ini codingnya silahkan di oprex..

#property copyright “Copyright © 2009 PyramidEA™”
#property link “http://www.PyramidRobotForex.com”

extern string PyramidEA = “.:: PyramidEA™ ULTIMATE DEMO ::.”;
extern string AccountTypeInfo = “2=(0.01 Lot), 1=(0.1 Lot), 0=(1.0 Lot)”;
extern int AccountType = 2;
double gd_96 = 0.01;
double gd_104 = 7.0;
double g_pips_112 = 53.0;
int gi_120 = 23;
int gi_124 = 7;
double gd_128 = 2.3;
double gd_136 = 1.7;
bool gi_144 = TRUE;
int gi_148 = 2;
int gi_152 = 2;
int gi_156 = 7;
int gi_160 = 18;
int gi_164 = 19;
int g_magic_168 = 13579;
int gi_172 = 24680;
bool gi_176 = TRUE;
string g_comment_180 = “PyramidEA DEMO”;

int gi_unused_188 = 0;
double g_pips_192 = 0.0;
int gi_unused_200 = 0;
int g_count_204 = 0;
int g_pos_208 = 0;
int g_slippage_212 = 5;
double g_price_216 = 0.0;
double g_price_224 = 0.0;
double g_ask_232 = 0.0;
double g_bid_240 = 0.0;
double gd_248 = 0.0;
double g_lots_256 = 0.0;
double gd_unused_264 = 0.0;
int g_cmd_272 = OP_BUY;
int gi_276 = 0;
bool gi_280 = TRUE;
double g_ord_open_price_284 = 0.0;
int gi_292 = 0;
double gd_296 = 0.0;
int g_ticket_304 = 0;
int gi_308 = 0;
double g_price_312 = 0.0;
double g_ord_lots_320 = 0.0;
double gd_unused_328 = 0.0;
string gs_336 = “”;
int g_count_344 = 0;

int start() {
bool l_bool_0;
int l_acc_number_4;
if (gi_176) {
l_bool_0 = IsDemo();
if (!l_bool_0) {
l_acc_number_4 = AccountNumber();
if (l_acc_number_4 != gi_172) {
Alert(“Only DEMO Account can use this EA ! – PyramidRobotForex.com”);
return (0);
}
}
}
double l_icustom_8 = iCustom(NULL, 0, “Indicator1”, 0, 1);
double l_icustom_16 = iCustom(NULL, 0, “Indicator1”, 1, 1);
double l_icustom_24 = iCustom(NULL, 0, “Indicator2”, 2, 1);
double l_icustom_32 = iCustom(NULL, 0, “Indicator2”, 3, 1);
double l_icustom_40 = iCustom(NULL, 0, “Indicator3”, 0, 1);
double l_icustom_48 = iCustom(NULL, 0, “Indicator3”, 1, 1);
double l_icustom_56 = iCustom(NULL, 0, “Indicator3″, 2, 1);
double l_imacd_64 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, 1);
double l_imacd_72 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_MAIN, 1);
double ld_80 = NormalizeDouble(MarketInfo(Symbol(), MODE_MINLOT), AccountType);
double ld_88 = NormalizeDouble(MarketInfo(Symbol(), MODE_MAXLOT), AccountType);
double ld_96 = NormalizeDouble(MarketInfo(Symbol(), MODE_LOTSIZE), AccountType);
double l_tickvalue_104 = MarketInfo(Symbol(), MODE_TICKVALUE);
if (gi_144) {
switch (AccountType) {
case 0:
gd_248 = NormalizeDouble(gd_136 * AccountEquity() / 100000.0, 0);
break;
case 1:
gd_248 = NormalizeDouble(gd_136 * AccountEquity() / 100000.0, 1);
break;
case 2:
gd_248 = NormalizeDouble(gd_136 * AccountEquity() / 100000.0, 2);
break;
default:
gd_248 = NormalizeDouble(gd_136 * AccountEquity() / 100000.0, 1);
}
} else gd_248 = gd_96;
if (gd_248 ld_88) gd_248 = ld_88;
g_count_204 = 0;
g_count_344 = 0;
for (g_pos_208 = 0; g_pos_208 g_count_204) {
for (g_pos_208 = OrdersTotal(); g_pos_208 >= 0; g_pos_208–) {
OrderSelect(g_pos_208, SELECT_BY_POS, MODE_TRADES);
g_cmd_272 = OrderType();
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_168) {
if (g_cmd_272 == OP_BUY) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), g_slippage_212, Green);
if (g_cmd_272 == OP_SELL) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), g_slippage_212, Green);
return (0);
}
}
}
gi_292 = g_count_204;
if (g_count_204 >= gi_124) gi_280 = FALSE;
else gi_280 = TRUE;
if (g_ord_open_price_284 == 0.0) {
for (g_pos_208 = 0; g_pos_208 = gi_152 && Hour() = gi_160 && Hour() 0.0 && l_icustom_24 > l_icustom_32 && l_icustom_56 == l_icustom_40 && (l_imacd_64 > l_imacd_72 && l_imacd_72 0.0 && l_icustom_24 < l_icustom_32 && l_icustom_48 == l_icustom_40 && (l_imacd_64 0.0)) gi_276 = 2;
}
}
gd_296 = 0;
g_ticket_304 = 0;
gi_308 = FALSE;
g_price_312 = 0;
g_ord_lots_320 = 0;
for (g_pos_208 = 0; g_pos_208 < OrdersTotal(); g_pos_208++) {
OrderSelect(g_pos_208, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_168) {
g_ticket_304 = OrderTicket();
if (OrderType() == OP_BUY) gi_308 = FALSE;
if (OrderType() == OP_SELL) gi_308 = TRUE;
g_price_312 = OrderClosePrice();
g_ord_lots_320 = OrderLots();
g_ord_open_price_284 = OrderOpenPrice();
if (gi_308 == FALSE) {
if (OrderClosePrice() OrderOpenPrice()) gd_296 += (OrderClosePrice() – OrderOpenPrice()) * OrderLots() / Point;
}
if (gi_308 == TRUE) {
if (OrderClosePrice() > OrderOpenPrice()) gd_296 -= (OrderClosePrice() – OrderOpenPrice()) * OrderLots() / Point;
if (OrderClosePrice() = 1) g_pips_192 = 0;
if (g_count_204 == 0) g_pips_192 = gd_104;
if (gi_276 == 3) gs_336 = ” | Analyzing…”;
else gs_336 = “”;
Comment(“Account: “, AccountNumber(), ” | Name: “, AccountName(), ” | Laverage: 1:”, AccountLeverage(), ” | Total Balance: “, DoubleToStr(AccountBalance(), 2), ” | Profit: $”, DoubleToStr(AccountProfit(), 2), “+/- “, gs_336,
“\n”, PyramidEA);
if (AccountEquity() > AccountBalance()) {
if ((Hour() > gi_156 && Hour() gi_164) {
if (g_count_204 >= 1) {
OrderClose(g_ticket_304, g_ord_lots_320, g_price_312, g_slippage_212, Green);
gi_280 = FALSE;
return (0);
}
}
if (gi_276 == 2 && l_icustom_16 > 0.0) {
OrderClose(g_ticket_304, g_ord_lots_320, g_price_312, g_slippage_212, Green);
gi_280 = FALSE;
return (0);
}
if (gi_276 == 1 && l_icustom_8 > 0.0) {
OrderClose(g_ticket_304, g_ord_lots_320, g_price_312, g_slippage_212, Green);
gi_280 = FALSE;
return (0);
}
if (gi_276 == 2 && (g_count_204 >= gi_148 && Bid – g_ord_open_price_284 >= gi_120 * Point)) {
OrderClose(g_ticket_304, g_ord_lots_320, g_price_312, g_slippage_212, Green);
gi_280 = FALSE;
return (0);
}
if (gi_276 == 1 && (g_count_204 >= gi_148 && g_ord_open_price_284 – Ask >= gi_120 * Point)) {
OrderClose(g_ticket_304, g_ord_lots_320, g_price_312, g_slippage_212, Green);
gi_280 = FALSE;
return (0);
}
if (gi_276 == 2 && (g_count_204 >= gi_148 && l_icustom_24 > l_icustom_32 && l_icustom_56 == l_icustom_40)) {
OrderClose(g_ticket_304, g_ord_lots_320, g_price_312, g_slippage_212, Green);
gi_280 = FALSE;
return (0);
}
if (gi_276 == 1 && (g_count_204 >= gi_148 && l_icustom_24 = gi_120 * Point || g_count_204 < 1) {
g_bid_240 = Bid;
g_ord_open_price_284 = 0;
if (g_pips_192 == 0.0) g_price_224 = 0;
else g_price_224 = g_bid_240 – g_pips_192 * Point;
if (g_pips_112 == 0.0) g_price_216 = 0;
else g_price_216 = NormalizeDouble(g_bid_240 + g_pips_112 * Point + (gi_124 – g_count_204) * gi_120 * Point, Digits);
if (g_count_204 != 0) {
g_lots_256 = gd_248;
for (g_pos_208 = 1; g_pos_208 = ld_88) g_lots_256 = ld_88;
OrderSend(Symbol(), OP_SELL, g_lots_256, g_bid_240, g_slippage_212, g_price_216, g_price_224, g_comment_180, g_magic_168, 0, Green);
return (0);
}
}
if (gi_276 == 2 && gi_280) {
if (g_ord_open_price_284 – Ask >= gi_120 * Point || g_count_204 < 1) {
g_ask_232 = Ask;
g_ord_open_price_284 = 0;
if (g_pips_192 == 0.0) g_price_224 = 0;
else g_price_224 = g_ask_232 + g_pips_192 * Point;
if (g_pips_112 == 0.0) g_price_216 = 0;
else g_price_216 = NormalizeDouble(g_ask_232 – g_pips_112 * Point – (gi_124 – g_count_204) * gi_120 * Point, Digits);
if (g_count_204 != 0) {
g_lots_256 = gd_248;
for (g_pos_208 = 1; g_pos_208 = ld_88) g_lots_256 = ld_88;
OrderSend(Symbol(), OP_BUY, g_lots_256, g_ask_232, g_slippage_212, g_price_216, g_price_224, g_comment_180, g_magic_168, 0, Green);
return (0);
}
}
return (0);
}

File jadinya dapat di download “disini”

Comments
  1. febrianto says:

    gx da mslah sma lock acc nya, newbe jg bisa ngoprekin itu, krna gx serumit fapturbo… yg jadi pertanyaan saya kok banyak ea buatan dlm negeri yg menyadur dan memodif ea luar, trmsuk yg brbayar itu…..

  2. redo says:

    Mas semar,,ada indikatornya buat EA pyramid ini??boleh dibagi gk?kirim y ke redo_stiawan@yahoo.co.id

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s