Leveraging off the example provided by koganam (http://ninjatrader.com/support/forum...7907#poststop)), in the below code what changes must be made to
1) plot the added _sma object, and
2) set the _sma plot color (e.g. Color.Green)
public class exampleIndicator : Indicator { private SMA _sma; private int _period = 12; protected override void Initialize() { // ?? Add(new Plot(Color.Green, "SMA")); } protected override void OnStartUp() { _sma = SMA(_period); } protected override void OnBarUpdate() { // code referencing _sma } }
Shannon
Comment