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 have a fragment of code in an indicator causing an issue with CopyBuffer in my EA.
I have Googled and searched through the docs, they illustrate that this should work although I might have missed something.
https://www.mql5.com/en/articles/599#convert_add_substract
When I build the indicator and attach to a chart it works as expected.
When I build an EA and run in the Strategy Tester, using iCustom, include the time calculation in the indicator, CopyBuffer returns zeros.
I have isolated the issue in the files below.
Any help appreciated.
Apologies, I have realized the example was not the same as my issue, since the EA is using OnTick and my issue was using the OnNewBar example in the docs.
https://www.mql5.com/en/articles/159
I have updated the files below