Bollinger Bands on Custom Array MQL5
I have a spread variable/array and I want to apply bollinger bands to it, but I cannot figure out how to do it. I searched everywhere and the only info I found is how to apply the iBands indicator on another indicator's data. But I found nothing about how to apply it on a custom array. Can anybody help please? Thank you.
Here is the code:
You need to calculate the standard deviation from your series and then add and subtract it from your "middle" value...
I would really appreciate if you could provide some info on how to achieve that with an array based on a specific lookback period? As even the iStDev function needs an indicator, similar to the iBands function, so I have no idea how to do it with an array. On MQL4 there was the iBandsOnArray/iStdDevOnArray function but on MQL5 there is no such option. Also not much info online on how to do it. Thank you!
I have a spread variable/array and I want to apply bollinger bands to it, but I cannot figure out how to do it. I searched everywhere and the only info I found is how to apply the iBands indicator on another indicator's data. But I found nothing about how to apply it on a custom array. Can anybody help please? Thank you.
Here is the code: