Does this happen also when you change the indicator period to H1 for example?
Finally fixed the issue, i was not copying the right amount of bars for the Daily period.
When i moved 3 lines to the OnCalculate method it works like a charm.
Attached the fixed indicator.
When i moved 3 lines to the OnCalculate method it works like a charm.
Attached the fixed indicator.
Files:
SRIndicator.mq5
7 kb

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 All,
My first post, after some long time reading and using MT5. Recently i started like all others with creating an own EA.
I have created multiple indicators before and used them in my EA with success. Only since a week i have started using a new indicator
which i did not created my self i found it on this forum https://www.mql5.com/en/articles/3186
The indicator works correctly when attached to a new chart, so i was a happy coder. When i added it to my EA all looked good until i
started testing it with the strategy tester and i discovered an issue. I have used google / this forum to find my answer but no luck.
The issue i experience is that the indicator draws the lines correctly for all the bars before my test starts and in the test period all lines
are drawn at the same point. If i check the values i see they are all the same.
The following screenshot shows my issue more clearly, left side of the yellow line the lines are drawn correctly. right side of the
yellow line my test period starts and all lines are drawn on the same points (blue line)
Attached is the indicator i am using
What am i doing wrong,