namespace NinjaTrader.Indicator
{
/// <summary>
/// Custom Lines Indicator
/// </summary>
[Description("Custom Lines Indicator")]
public class CustomLinesIndicator : Indicator
{
#region Variables
// Wizard generated variables
private int period = 20; // Default setting for Period
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
CalculateOnBarClose = true;
Overlay = false;
PriceTypeSupported = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
Plot0.Set(1.0);
}
}
}
Comment