I keep getting an error on Line 44, which by default from NT is a comment line! It says CS1012 Too many characters in character literal.?
The only thing I did to the code is change within the () on lines 45 and lines 46. I created 2 lines so there are 2 things to code.
/// <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, "Top"));
Add(new Plot(Color.FromKnownColor(KnownColor.DarkOrange), PlotStyle.Line, "Bottom"));
Overlay = 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
44
Top.Set(High[0]);
Bottom.Set(Low[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 Bottom
{
get { return Values[1]; }
}
[Description("")]
[GridCategory("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
}
Comment