I load an indicator (OBC) in my strategy (OET). unfortunately, the indicator is now also calculated on OET instead of on OBC, why? if the indicator is loaded at the same time on another chart without a strategy, everything works. the aim is to start the strategy and with it the indicator. the indicator does its calculations on OBC and then passes on parameters to the strategy via a public property (this works).
Strategy:
protected override void OnStateChange() { case State.SetDefaults: Calculate = Calculate.OnEachTick; case State.DataLoaded: sidiSuperTrend = SidiSuperTrend(StrategyIdString); if (sidiSuperTrend != null) { sidiSuperTrend.Strategy = this; priorShowSupertrend = ShowSupertrend; [COLOR=#e74c3c]sidiSuperTrend.Calculate = Calculate.OnBarClose; // has no influence [/COLOR] AddChartIndicator(sidiSuperTrend); } ... }
protected override void OnStateChange() { case State.SetDefaults: Calculate = Calculate.OnBarClose; ... }
Comment