first of all, don't do it on "init" section, you will probably ran into error 4066
int i; int Bar=10; double Stoch[]; ArrayResize(Stoch, Bar); for(i=0;i<Bar-1;i++) { Stoch[i]=iStochastic(NULL,PERIOD_CURRENT,5,3,3,MODE_SMA,0,MODE_MAIN,i); Alert(Stoch[i]); }

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
Hello everybody, I'm trying desperatedly to get the value of past stochastic values over n amount of bars.
The error i get is "'[' array required".
Could you please explain me why iStochastic function wouldn't start on a simple for loop?
Here is my code.
Many thanks