When MetaTrader is restarted, the EA opens new positions with 0.01 lot
-
Can someone please help me here or has anyone observed the same problem? I have an EA that opens grid positions. The problem is that when MetaTrader is restarted, the EA opens new positions with 0.01 lot... How can I make it continue where it left off?
-

-
Because unless you explicitly programmed the bot to store the value of the last lot size, it will consider a new sequence is to be run after the reset.
-
Thank you for the quick response Andora. Is there an idea on how I can do this?
-
Perhaps you can check the current positions as a reference for a new position size
-
@sktsec I'm unfortunately quite new to this topic, so I would really appreciate an example of how it works.
-
If trade is running use that, if not save the values in a global variable: https://fxdreema.com/forum/topic/20550/save-variables-constants-if-terminal-closes-crashes
-
@jstap Thank all very much for the numerous answers. I think that is a good solution. I will test it tomorrow and report back with the result
-
