protected override void OnStart() { base.OnStart(); //Init our indicator to get code access this._RunningWithTheWolves_Indicator = new RunningWithTheWolves_Indicator(); }
protected override void OnStartUp() { base.OnStartUp(); //Print("OnStartUp" + Bars[0].Time); //Init our indicator to get code access this._RunningWithTheWolves_Indicator = new RunningWithTheWolves_Indicator(); //Initalize statistic data list if this feature is enabled if (this.StatisticBacktesting) { this._StatisticContainer = new StatisticContainer(); } }
/// <summary> /// Enter the description for the new custom indicator here /// </summary> public RunningWithTheWolves_Indicator RunningWithTheWolves_Indicator(IDataSeries input, System.Boolean shouldIGoLong, System.Boolean shouldIGoShort) { var indicator = CachedCalculationUnits.GetCachedIndicator <RunningWithTheWolves_Indicator>(input, i => i.ShouldIGoLong == shouldIGoLong && i.ShouldIGoShort == shouldIGoShort); if (indicator != null) { return(indicator); } indicator = new RunningWithTheWolves_Indicator { BarsRequired = BarsRequired, CalculateOnBarClose = CalculateOnBarClose, Input = input, ShouldIGoLong = shouldIGoLong, ShouldIGoShort = shouldIGoShort }; indicator.SetUp(); CachedCalculationUnits.AddIndicator2Cache(indicator); return(indicator); }