chnp:
Please help. Thanks!
I want to caculate standard dev of Bands upper and lower lines. Thnaks.
To make it kind of inverted : what is the size of your BandU and BandL arrays? As soon as you answer that question, you shall have an answer to an array out of range question too
Mladen Rakic:
To make it kind of inverted : what is the size of your BandU and BandL arrays? As soon as you answer that question, you shall have an answer to an array out of range question too
Thanks. I am a newbie. Do you mean using "ArrayResize"? I only need 4 numbers in the array. This still not working. Please help. Thanks!
double BandU[]; double BandL[]; ArrayResize(BandU,4); ArrayResize(BandL,4); for (int i=1;i<5;i++) { BandU[i] = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,i); BandL[i] = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_LOWER,i); } double stdbandsup = iStdDevOnArray(BandU,3,3,0,MODE_SMA,1); double stdbandslo = iStdDevOnArray(BandL,3,3,0,MODE_SMA,1); printf(stdbandsup+" "+stdbandslo);
chnp: I am a newbie. Do you mean using "ArrayResize"? I only need 4
numbers in the array. This still not working. Please help. Thanks!
- Answer the previous question, and you would be half there.
- Of course it's still not working. What is the highest index you now store? Answer that question and you will know why.
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
Please help. Thanks!
I want to caculate standard dev of Bands upper and lower lines. Thnaks.