If the position was taken during that tick event, It only gets updated when you return from OnTick().
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
Hi,
I'm testing an EA on Strategy Tester with the debugging mode on MT5.
I put a break point somewhere and wait for it to trigger.
Then, I store the value of PositionsTotal() on a variable to debug it.
While on my trading tab, I can see two open positions, the PositionsTotal() is returning only one.
What's wrong?
These are the positions open at the time of the break point is reached.
It's only detecting the position with ticket 6.
Who can help?