Hi,
I try to create custom indicator that give arrow signal if the conditions are met. Using MA and Stochastic. If I run the indicator independently there is no problem, but when I try to call the indicator from EA the values is not the same with what the indicator show.
My indicator code as below:
And my EA code as below:
Thank you for any input.
Apply
*** ArraySetAsSeries(GUUp,true); ArraySetAsSeries(GUDn,true); if(CopyBuffer(handle[0],0,1,100,GUUp)<=0) return; if(CopyBuffer(handle[0],1,1,100,GUDn)<=0) return;
Apply
Thank you Vladimir, I have tried your suggestion. The result as below:
The EA only once get the value from the indicator, while actually the indicator give a lot of signal, for example from Oct 2020 till now as below:
Both use the same TF 4hr. I don't know what's the problem.
And the history quality is 99%. So, I don't think there is a problem with the history data.
Maybe you have another solution Vladimir ?
Thank you.
There are many errors in the indicator. The zero bar can never be calculated. Don't use CIndicators classes, work with pure iMA and iStochastic ...
Thank you Vladimir... will do that...

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I try to create custom indicator that give arrow signal if the conditions are met. Using MA and Stochastic. If I run the indicator independently there is no problem, but when I try to call the indicator from EA the values is not the same with what the indicator show.
My indicator code as below:
And my EA code as below:
Thank you for any input.