Help coding script

 

HI,

I'm trying to use this EA as a risky type of Advisor, based on a martin gale 6steps trading mode but, I need him to fli the 7th trade to the opposite direcction,I'm Having a real Hard time trying to incorporate the 7th trade so if the 6th sell didn't make it the 7th goes double on the opposite direcction and recovers, so it goes something like this:

OpenSell( ai_1 = FALSE) {
int l_ticket_2;
double l_lots_64;
double l_price_4 = 0;
double l_price_8 = 0;
string ls_16 = "";
bool li_ret_32 = TRUE;

if (TimeC() - g_datet_316 < 60) return (FALSE);
if (ai_1 && (!gi_388)) return (FALSE);
if (!GlobalVariableCheck("PERM")) {
GlobalVariableSet("PERM", TimeCurrent());
if (!Support) {
if (ai_1) {
if (OrderSelect(g_ticket_392, SELECT_BY_TICKET)) l_price_8 = OrderTakeProfit() + MarketInfo(Symbol(), MODE_SPREAD) * Point;
} else l_price_4 = Bid - gd_124 * Point;
}
if (ai_1) ls_16 = gs__hedged_400;
if (AllowiStopLoss == TRUE) l_price_8 = Bid + gi_136 * Point;
if (ai_1) l_lots_32 = NormalizeDouble(GetLastLotSize(0) * booster, 2);
else l_lots_32 = CalcLots(gd_236);
if (!Support) l_ticket_2 = OrderSend(Symbol(), OP_SELL, l_lots_32, Bid, slippage, l_price_8, l_price_4, EA_Name + ls_16, MagicNumber, 0, Pink);
else {
l_ticket_2 = OrderSend(Symbol(), OP_SELL, l_lots_32, Bid, slippage, 0, 0, EA_Name + ls_16, MagicNumber, 0, Pink);
Sleep(1000);
OrderModify(l_ticket_2, OrderOpenPrice(), l_price_8, l_price_4, 0, Black);
}
g_datetime_316 = TimeCurrent();
if (l_ticket_2 != -1) {
if (!ai_1) {
g_ticket_392 = l_ticket_2;
Log("SELL Ticket=" + g_ticket_392);
} else {
Log("SELL _ticket=" + l_ticket_2);
g_cmd_396 = 1;
}
} else {
Log("failed sell");
li_ret_32 = FALSE;
}
}
GlobalVariableDel("PERM");
return (li_ret_32);
}

thansk for your INPUT is greatly appreciated!, thansk for your time have a great day and Good Trades.

 

  1. The code you posted is decompiled from some .ex4. Stolen from someone. Then you publish it violating his Copyright. No one here will help you.
 

Yes It is acctually part of some EA's that I purchased in the past, but the EA I'm working on is part of what you can see in the script!,

I pay for EA's and espend good money on them althougth they always end up Not working and killing my accounts,

anyone that is interested on Helping here is more than welcome I'll be happy to share the succes with everyone here,

I'm no EA marketerer!....I'm a Trader looking for solutions to My Trading Needs!

have a good day everyone and for those ho heat please keep moving!,,,

thanks.

Reason: