I am getting MACD indicator values through using MACD object and I have added multiple timeframes in the strategy and my strategy is running on COBC = false.If I have added the same time frame which I am using in the strategy through initialize method and use this time frame to get Macd values it shows wrong values in this case and if I use other time frames that is not on which strategy is running it gives correct values.
private MACD macd;
Initialize it in startup function
protected override void OnStartUp()
{
this.macd = MACD(BarsArray[timeframe],fast,slow,smooth);
this.macd.CalculateOnBarClose = true;
}
please help me out about this behaviour of MACD object.
Thanks,
Irfan

Comment