Jump to content

Recommended Posts

Posted

Re: (REQ) THE 3RD CANDLE ROBOT

 

http://www.multiupload.com/IYUFG6KNMC

 

that's the system which was posted by someone else. not the EA though. does one exist?

"It is inconceivable that anyone will divulge a truly effective get-rich scheme for the price of a book."

Victor Niederhoffer (1943–), US hedge fund manager and statistician

Posted

Re: (REQ) THE 3RD CANDLE ROBOT

 

decompiled version..

Try .... it

 

[spoiler:2jpmojn8]#property copyright "Abner Gelin"

#property link "www.3rdcandle.com"

 

bool gi_76 = TRUE;

bool gi_80 = FALSE;

int gi_84 = 22723;

string gs_88 = "2010.03.29";

string gs_96 = "2008.08.01";

extern double order_lot = 0.1;

extern int stop_loss = 100;

extern int take_profit = 100;

extern int slippage = 3;

extern bool use_system_stop_loss = FALSE;

extern int system_SL_distance_from_fractal = 1;

int gi_132 = 1;

extern int magic_number = 23309;

double gd_140;

double gd_148;

double gd_156;

double g_tickvalue_164;

double g_ticksize_172;

double gd_180;

int gi_188;

int gi_unused_192;

int gi_unused_196;

double gd_unused_200;

int gi_unused_212;

datetime g_time_216;

 

int init() {

SetPoint();

if (gi_188 == 3 || gi_188 == 5) slippage = 10 * slippage;

g_time_216 = Time[0];

gd_unused_200 = order_lot;

gi_unused_196 = 1;

gi_unused_212 = 0;

return (0);

}

 

int deinit() {

return (0);

}

 

int start() {

double l_price_0;

double l_price_8;

gi_unused_192 = 1;

int li_16 = signal();

if (li_16 != 30 && g_time_216 != Time[0] && CountOpenOrders(OP_BUY) + CountOpenOrders(OP_SELL) < gi_132) {

if (li_16 == 10) {

if (stop_loss == 0) l_price_0 = 0;

if (stop_loss > 0) l_price_0 = Ask - stop_loss * gd_140;

if (take_profit == 0) l_price_8 = 0;

if (take_profit > 0) l_price_8 = Ask + take_profit * gd_140;

if (use_system_stop_loss) l_price_0 = iFractals(Symbol(), 0, MODE_LOWER, 2) - gd_140 * system_SL_distance_from_fractal;

OrderSend(Symbol(), OP_BUY, order_lot, Ask, slippage, l_price_0, l_price_8, "[ABG_Fractal_EA]", magic_number, 0, Red);

g_time_216 = Time[0];

}

if (li_16 == 20) {

if (stop_loss == 0) l_price_0 = 0;

if (stop_loss > 0) l_price_0 = Bid + stop_loss * gd_140;

if (take_profit == 0) l_price_8 = 0;

if (take_profit > 0) l_price_8 = Bid - take_profit * gd_140;

if (use_system_stop_loss) l_price_0 = iFractals(Symbol(), 0, MODE_UPPER, 2) + gd_140 * system_SL_distance_from_fractal;

OrderSend(Symbol(), OP_SELL, order_lot, Bid, slippage, l_price_0, l_price_8, "[ABG_Fractal_EA]", magic_number, 0, Red);

g_time_216 = Time[0];

}

}

return (0);

}

 

void SetPoint() {

gd_140 = MarketInfo(Symbol(), MODE_POINT);

gd_148 = MarketInfo(Symbol(), MODE_SPREAD);

gi_188 = MarketInfo(Symbol(), MODE_DIGITS);

gd_156 = MarketInfo(Symbol(), MODE_STOPLEVEL);

g_tickvalue_164 = MarketInfo(Symbol(), MODE_TICKVALUE);

g_ticksize_172 = MarketInfo(Symbol(), MODE_TICKSIZE);

gd_180 = g_tickvalue_164 / g_ticksize_172;

if (gi_188 == 3 || gi_188 == 5) {

gd_140 = 10.0 * gd_140;

gd_148 /= 10.0;

gd_156 /= 10.0;

gi_188--;

}

}

 

int CountOpenOrders(int a_cmd_0) {

int l_count_8 = 0;

for (int l_pos_4 = OrdersTotal() - 1; l_pos_4 >= 0; l_pos_4--) {

if (OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES) == TRUE) {

if (OrderType() == a_cmd_0 && OrderSymbol() == Symbol() && OrderMagicNumber() == magic_number) l_count_8++;

} else Print("Could not SELECT trade");

}

return (l_count_8);

}

 

int signal() {

double l_ifractals_0 = iFractals(Symbol(), 0, MODE_UPPER, 2);

double l_ifractals_8 = iFractals(Symbol(), 0, MODE_LOWER, 2);

if (l_ifractals_0 > 0.0 && l_ifractals_0 != EMPTY_VALUE && l_ifractals_8 > 0.0 && l_ifractals_8 != EMPTY_VALUE) return (30);

if (l_ifractals_0 > 0.0 && l_ifractals_0 != EMPTY_VALUE) return (20);

if (l_ifractals_8 > 0.0 && l_ifractals_8 != EMPTY_VALUE) return (10);

return (30);

}[/spoiler:2jpmojn8]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...