Issue with Bollinger bands

Created at 16 Feb 2021, 10:12
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TA

ta.vanya.91@gmail.com

Joined 12.03.2020

Issue with Bollinger bands
16 Feb 2021, 10:12


Hello guys, I have an issue the Bollinger bands indicator. The top, Main and Bottom dataseries of this indicator all return the same value. This is the code, I'd like your help please.

 _boll = Indicators.BollingerBands(Bars.ClosePrices, 12, 0, MovingAverageType.Simple);
            Print("boll bottom : " + _boll.Bottom.LastValue);
            Print("boll top : " + _boll.Top.LastValue);
            Print("boll main : " + _boll.Main.LastValue);

 

This is the output : 

boll bottom  : 0.778822500000001

boll top        : 0.778822500000001

boll main     : 0.778822500000001

 

Thanks in advance.

 


@ta.vanya.91@gmail.com
Replies

PanagiotisCharalampous
16 Feb 2021, 10:43

Hi there,

This happens because you have set deviation to 0.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

ta.vanya.91@gmail.com
16 Feb 2021, 10:53

RE:

PanagiotisCharalampous said:

Hi there,

This happens because you have set deviation to 0.

Best Regards,

Panagiotis 

Join us on Telegram

That's right, thank you very much.


@ta.vanya.91@gmail.com