Store the profit that has been accumulated so far in a global variable GlobalVariableSet() when the "cycle" or whatever is over (or in deinit() or in init()) and then during the next cycle simply subtract this number from the total profit, this will give you the profit of the current cycle only. This is how I do it in some of my EAs that keep track of the profit.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I have an expert advisior which works with the loss-and profit series from the last orders.
I calculated them by
OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)
....
Is there a posibility to restart the EA an with a loss-and profit series with the value "0" without changing the MagicNumber?? How can I do that?
Lots of thanks!