private SMA smaFast;
private amaEHMA amaehmaFast
Here's more of a snippet. The offending code is line 44 "private amaEHMA amaehmaFast;"
public class LMACross : Strategy { ///private HMA hmaFast; private HMA hmaSlow; private amaEHMA amaehmaFast; protected override void OnStateChange() { if (State == State.SetDefaults) { Description = NinjaTrader.Custom.Resource.NinjaScriptStrategyDescriptionSampleMACrossOver; Name = "LMACross"; Fast = 8; Slow = 21; //Adj = 13; // This strategy has been designed to take advantage of performance gains in Strategy Analyzer optimizations // See the Help Guide for additional information IsInstantiatedOnEachOptimizationIteration = false; } else if (State == State.DataLoaded) { amaehmaFast = amaEHMA(Fast); hmaSlow = HMA(Slow); //hmaFast = HMA(Fast); amaehmaFast.Plots[0].Brush = Brushes.Red; hmaSlow.Plots[0].Brush = Brushes.Cyan; //AMAehmaAdj.Plots[0].Brush = Brushes.Yellow; AddChartIndicator(amaehmaFast); AddChartIndicator(hmaSlow); // AddChartIndicator(hmaFast); } }
Comment