You are probably creating an Indicator handle in OnTick(), thus replicating the indicator, instead of only creating a handle once in OnInit().
That is probably why in your Data Window on the left there are so many MA(20) indicator outputs.
EDIT: Did you perhaps migrate your EA into MQL5 from an original MQL4 EA? If so, then you are converting it incorrectly.
You are probably creating an Indicator handle in OnTick(), thus replicating the indicator, instead of only creating a handle once in OnInit().
That is probably why in your Data Window on the left there are so many MA(20) indicator outputs.
EDIT: Did you perhaps migrate your EA into MQL5 from an original MQL4 EA? If so, then you are converting it incorrectly.
Thank you for your kindness !
I used the Indicator handle by shift,and in test the IndicatorRelease can't work.
I change the shift in CopyBuffer,the problem is solved.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
In the test, the 20-day moving average will be refreshed continuously. I have repeatedly debugged it and cannot find the reason.
Who has encountered this situation?