Is it possible to create Inputs in Ninjascript and mark them somehow so they are not optimizable?
I have inputs for PeriodType and Period Value which I want to use in StrategyAnalyzer for Backtesting. This works fine now, but when I switch to Optimization I get an error stating that I am trying to optimize using Dynamic bar definitions.
For instance, I am using the following to define the parameters:
[Range(0, 6)] [NinjaScriptProperty] [Display(Name = "SI_LTPeriodType", Description = "Input System Discovery: Long Term Chart Type", Order = 1, GroupName = "StratDiscConst")] public int SI_LTCPeriodType { get; set; } [Range(0, int.MaxValue)] [NinjaScriptProperty] [Display(Name = "SI_LTPeriodValue", Description = "Input System Discovery: Long Term Chart Period Value", Order = 2, GroupName = "StratDiscConst")] public int SI_LTCPeriodValue { get; set; }
switch (SI_STCPeriodType) { case 0: // Tick AddDataSeries(BarsPeriodType.Tick, SI_STCPeriodValue); Print("Adding STC Tick Bars: " + SI_STCPeriodValue); break; }
Comment