- Run a backtest in Strategy Analyzer
- Display Trades
- Select one trade, right click and open Chart...
- Indicator missing
Any ideas? Many thanks.
namespace NinjaTrader.NinjaScript.Strategies { public class StrategyAddIndicators : Strategy { protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Strategy here."; Name = "StrategyAddIndicators"; Calculate = Calculate.OnBarClose; } else if (State == State.DataLoaded) { AddChartIndicator(SMA(20)); } } protected override void OnBarUpdate() { EnterLong(); double sma = SMA(20)[0]; } } }
Comment