How to use multi timeframe bollinger bands in cbot
How to use multi timeframe bollinger bands in cbot
06 Jul 2022, 09:09
I want use in my cbot daily 4hour 1hour data bollinger band parameters together.
Replies
MongolTrader
06 Jul 2022, 14:39
RE:
PanagiotisCharalampous said:
Hi MongolTrader,
You need to make your question more specific. What exactly do you need to find out? How to initialize the indicator using data from another timeframe?
Best Regards,
Panagiotis
I ask before about like this question adx multitime frame its same as this question only using indicator is bollinger band i dont know how use it in bollinger band case please check link below https://ctrader.com/forum/calgo-support/38261
@MongolTrader
PanagiotisCharalampous
06 Jul 2022, 14:44
Hi MongolTrader,
Here you go
using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo.Robots
{
[Robot(AccessRights = AccessRights.None)]
public class ADXOtherTimeFrame : Robot
{
private BollingerBands _bb;
private Bars _otherTimeFrameBars;
[Parameter("Other Time Frame")]
public TimeFrame OtherTimeFrame { get; set; }
[Parameter("Periods")]
public int Periods { get; set; }
[Parameter("Deviation")]
public int Deviation { get; set; }
protected override void OnStart()
{
_otherTimeFrameBars = MarketData.GetBars(OtherTimeFrame);
_bb = Indicators.BollingerBands(_otherTimeFrameBars.ClosePrices, Periods, Deviation, MovingAverageType.Simple);
}
}
}
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
06 Jul 2022, 14:23
Hi MongolTrader,
You need to make your question more specific. What exactly do you need to find out? How to initialize the indicator using data from another timeframe?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous