i am new to coding and want to identify when the spread of bollinger bands (upper -lower band) reaches a minimum over the last x bars. Can anyone help me write a simple function that returns the corresponding index value?
... and defined ...
UpperBand = iBands(NULL,0,MATrendPeriod,3,0,PRICE_CLOSE,MODE_UPPER,0);
LowerBand = iBands(NULL,0,MATrendPeriod,3,0,PRICE_CLOSE,MODE_LOWER,0);
BBDist = UpperBand-LowerBand;
The problem now is that i do not know how to easy store the values of BBDist into an array and running min./max. calculations on it.
Thank you in advance for your assistance in case of your help.
Thanks a lot for your quick respons whroeder1 ;)
I think I am to new to coding for this... can you give me a small example on how it would look like? Unfortunately I do not know how to use a corresponding loop function.