Reset Variables
-
how to reset the variables when the trade reaches the take profit?
-
Click on the 'on Trade' tab and then:
-
Thanks, it worked.
-
-
Man, that was a very old post. I don't remember what I uploaded.
What do you exactly need? -
I wonder if there is a simple way to reset variable value to default (to the value when EA first starts to run)?
Thank you.
-
No, the only way to do it is to actively reinitiating it, I'm afraid. You will have to create the block resetting its initial value.
-
@l-andorrà That's what I do. I just thought you provided a better way

Thank you for your reply @l-andorrà
Regards.
-
You're welcome.
-
@l-andorrà said in Reset Variables:
No, the only way to do it is to actively reinitiating it, I'm afraid. You will have to create the block resetting its initial value.
Hi
Would You help me with this, How Can I do this " create the block resetting its initial value"Thank You very much
-
@pablofx What I mean is that you will need a 'modify variables' block with the variables being reinitialized there.
-
@l-andorrà said in Reset Variables:
What I mean is that you will need a 'modify variables' block with the variables being reinitialized there
Maybe I'll explain what I would like to achieve.
I would like to achieve that for each closed trade (whatever SL or TP) Drawdown Max displayed on chart (in comments) is resetting to 0.
I shared this project:
https://fxdreema.com/shared/8OPL7sQOd -
@pablofx You need to substitute that 'for each trade' block on the 'on trade' tab by a purple 'trade closed' one.