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,
The functions CExpertBase::Low(), CExpertBase::High() and others are returning their corresponding values from wrong bars when using "Every tick based on real ticks". When I use "Every tick" it works PERFECTLY. Can anyone help me on this issue?
My EA is based on MQL5 Wizard and uses:
My CSignal class uses:
One of the conditions to go long is:
In this case, my EA should only buy when the current price goes above the maximum price from the previous bar.
As you can see in the picture above, the chart on the left side shows the correct long operation because the red bar is breaking the maximum value from the previous bar (bar 1). However, the chart on the right side doesn't go long in the red bar because High(1) returns the value from bar number 2, and Close(0) from bar 1, which is completely wrong! Only when a new bar is created then High(1) returns a value from bar 1, the Close(0) from bar 0, and it configures a long operation.
Please note this happens only when the Strategy Tester is configured to "Every tick based on real ticks" or when it runs on a real account.