"Trailing Stop pending order" in two direction
-
.
-
On every 5 minutes do this: For each Pending Order -> slide order
But if there are multiple orders at different levels and you want to keep them at the same relative position from the current price, it will be more complicated.
All "Trailing..." blocks are designed to move only in one direction. That's why they have the word "Trailing" in their names
-
.
-
excuse me radoslav
I found that function in mt5 but not in mt4 -
-
READ BELOW
-
.
-
"check age" works with OrderOpenTime(). There are only few available functions to get parameters of the orders - https://docs.mql4.com/trading OrderOpenTime() and OrderCloseTime() are two of the parameters, but there is nothing about the last modified time. In theory such time can be collected while the EA is working, but I prefer to work only with functions that would continue to work the same after the EA is restarted.
But I don't see why you need Modified time. Isn't your idea to move orders every X seconds? "Once per seconds"... I will suggest to put this block on top level. I don't exactly remember how this block worked, but I think that it doesn't work at exactly equal periods of time. If you want exactly 5 seconds, then you can work under "on Timer", but in this case you will not be able to backtest this functionality because "on Timer" doesn't work in the Tester.