1. Need not display Plot1 on schedule (to hide), but the calculations needed for the strategy.
or
2. Display Plot1 to another (new) panel or attach it to the left .
or
3. To make available (visible) in the strategy calculations in myDataSeries
Help me solve any of these problems (better examples of all three). Thank you.
namespace NinjaTrader.Indicator
{
[Description("Enter the description of your new custom indicator here")]
public class AAA : Indicator
{
private int myInput0 = 1; // Default setting for MyInput0
private DataSeries myDataSeries; // Define a DataSeries variable
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
Add(new Plot(Color.FromKnownColor(KnownColor.Aqua), PlotStyle.Line, "Plot1"));
Overlay = false;
myDataSeries = new DataSeries(this, MaximumBarsLookBack.Infinite);
}
protected override void OnBarUpdate()
{
Plot0.Set(Close[0]);
Plot1.Set(Close[0]*10000);
myDataSeries.Set(Close[0]*10000);
}
#region Properties
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries Plot0
{
get { return Values[0]; }
}
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries Plot1
{
get { return Values[1]; }
}
[Description("")]
[GridCategory("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
}
}

Comment