Buy and Sell Pending orders in grid
-
Hi There,
Can anybody help me to accomplish my simple EA. It trades using buy pending orders in grid for 5 levels with TP (take profit) and SL (stop loss). Each cycle will end when TP is hit and new cycle should start all over again. If all that 5 levels of buy pending orders were realized and the last SL was hit, reverse orders will be executed i.e. sell pending orders will be initiated for another 5 levels with TP and SL as well. Again, cycle will end when TP is hit and new cycle should start all over again. I have tried this idea using following blocks : https://fxdreema.com/shared/2vdd8vcA. But so far it does not work well. Thanks.
-
http://prntscr.com/brpb6d - this should be only used under "on Trade".
I think you need to understand this concept, because the way you connected this condition does not look right: https://fxdreema.com/demo/mt4-wrong-closing-rule
I would try to do everything under "on Tick" and only if needed I would use "on Trade" for something. Because "on Tick" is more... reliable, let's say. So, under "on Tick" you can for example detect if there are no trades at all at any moment, which could be the moment to create new orders. You can also check the exact amount of trades, orders or both. There are also blocks like "Close trades" and "Delete pending orders"