On every new position, place pending order in opposite direction with double volume
-
Can anyone help on how to, as soon as a new position is open, place a pending order, at a certain distance, in opposite direction, with double volume? I managed to work around all steps, excep how to double the volume!
-
volume from previous opened trade save into variable for further use ... you can easily do math on variables
-
@miro1360 Thanks Miro, but how to get previous trade volume into a variable? Sorry if it´s obvious, but I didn´t figure out.
-

-
@miro1360 Great! Thanks a lot! Just one more issue: The block keeps increasing lots every new tick (instead of just one time per trade). I tried "once per positions" block, but it in fact prevented the block to run. Also tried pasting into "on trade" tab, but it crashes like this:
"2018.03.31 12:44:33.412 Core 1 2018.01.02 09:30:40 array out of range in '11323-21957.mq5' (6999,10)
2018.03.31 12:44:33.412 Core 1 OnTrade critical error"Any last clue to get the block to run just once for every new trade?
-
