In converting a NT 7 strategy to NT 8, everything compiles and the strategy shows up in the NinjaScript Explorer but not on the chart drop down list.
I have the following as part of the OnStateChange():
protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter Strategy Description"; Name = "MyCustomStrategyName"; Calculate = Calculate.OnPriceChange; IsEnabled = true; EntriesPerDirection = 1; IsInstantiatedOnEachOptimizationIteration = false; MaximumBarsLookBack = MaximumBarsLookBack.Infinite; IsExitOnSessionCloseStrategy = true; ExitOnSessionCloseSeconds = 900; SetStopLoss(CalculationMode.Ticks,20); } else if (State == State.DataLoaded) { cumProfitSeries = new Series<double>(this); } }
Also, can you explain why the difference in these:
Name = "MyCustomStrategyName";
Name = NinjaTrader.Custom.Resource.NinjaScriptStrategyNam eSampleMACrossOver;
Comment