Please can anyone help me code the follow idea

 

If I go long with one lot but the trade go against me by 50pips, this EA should open short trade of 2lots instead 1lot to recover loss and if the trend continues in this the same direction then all opened trades should close at 30pits profit. But perhaps the trend reverse after opening the 2lots short trade let the EA open another 2lots long trade in the initial direction after the it has move to zero profit level. After this let the process continue and if the number of opened trades are 8 and the total profit is zero or above all opened trades should be closed no matter how small the profit because of the number of trades. Profit target is 30pips at each point

thank you

 

I'll save you the trouble

I tried that - and some variations - it dont work :(


-BB-

 
BarrowBoy:

I'll save you the trouble

I tried that - and some variations - it dont work :(


-BB-

Yep I tried it too the coding wasn't hard but it doesn't work

Reason: