Sarkis:
Hi
Can somebody please help me with this consistent issue i have with executing a For loop inside a function. The same code in start() works ok but when its in a custom function i always get zero values for the variables.
The functions intention is to determine when the Bollinger bands contract by checking the current StdDev MA against the Highest Std Dev MA of 12 periods ago.
Your array has a size of zero elements . . .
double Val[];
. . . that is how you have declared it. Either give it a size or use ArrayResize()
Sarkis:
Thanks Heaps Raptor! Works well now.
You are welcome, thank you for editing your post :-)

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
Can somebody please help me with this consistent issue i have with executing a For loop inside a function. The same code in start() works ok but when its in a custom function i always get zero values for the variables.
The functions intention is to determine when the Bollinger bands contract by checking the current StdDev MA against the Highest Std Dev MA of 12 periods ago.