What error do you get?
HighRange = High[iHighest(_Symbol,PERIOD_M30,MODE_HIGH,Stochastic_period,i)];
you are getting an index from a higher timeframe and using it on a lower timeframe. That doesn't make sense
HighRange = High[iHighest(_Symbol,PERIOD_M30,MODE_HIGH,Stochastic_period,i)];
- GumRai: you are getting an index from a higher timeframe and using it on a lower timeframe. That doesn't make senseAnd using a index on a lower timeframe to find the highest bar on a higher timeframe.
- You are mixing apples and oranges

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
Ive been trying to make the following code draw a double smoothed stochastic of the 30m chart while on the 5m chart but always get a critical error and not sure why? I have tried to put PERIOD_M30 enumeration in 2nd parameter of iHigest() and iLowest() but it doesnt work.