double up,low,mid;
up=iBand(NULL,0,20,2,0,PRICE_LOW,MODE_UPPER,0);
low=iBand(NULL,0,20,2,0,PRICE_LOW,MODE_LOWER,0);
mid=(up+low)/2;
Roger wrote >>
Take upper and lower band, sum it and devide 2.
double up,low,mid;
up=iBand(NULL,0,20,2,0,PRICE_LOW,MODE_UPPER,0);
low=iBand(NULL,0,20,2,0,PRICE_LOW,MODE_LOWER,0);
mid=(up+low)/2;
wow
Why not just
mid = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, 0);
btw, bb indicator function name is iBands()
We had this many times before why not use
mid=iBand(NULL,0,20,2,0,PRICE_LOW,MODE_MAIN,0);
That way everything to do with BB comes from BB calls.
It's too easy, task was - "value of Bollinger band indicator's middle band" :-)
My fault, wrote by heart.Hi Rogers and Irtron,
I want to say a BIG " thank you" to you guys for helping me out,both of you were right,because i also confirmed that
iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, 0); has the same value with Bollinger band's middle band.
thank you so much.
- 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 all,
Please i need help on how to get the value of Bollinger band indicator's middle band for my EA code.
Any help would be highly appreciated.
Thanks.