AddLine()
<< Click to Display Table of Contents >> AddLine() |
Adds line objects on a chart.
Note: Lines are ONLY visible from the UI property grid when AddLine() is called from State.SetDefaults. If your indicator or strategy dynamically adds lines during State.Configure, you will NOT have an opportunity to select the line or to set the line configuration via the UI. Alternatively, you may use custom public Brush, Stroke or value properties which are accessible in the State.SetDefaults and pass those values to AddLine() during State.Configure. Calling AddLine() in this manner should be reserved for special cases. Please see the examples below. |
Determines if the line(s) used in an indicator are configurable from within the indicator dialog window. |
|
Objects derived from the Line class are used to characterize how an oscillator line is visually displayed (plotted) on a chart. |
|
A collection holding all of the Line objects that define the visualization characteristics oscillator lines of the indicator. |
AddLine(Brush brush, double value, string name)
AddLine(Stroke stroke, double value, string name)
Warning: This method should ONLY be called within the OnStateChange() method during State.SetDefaults or State.Configure |
brush |
A Brush object used to construct the line |
name |
A string value representing the name of the line |
stroke |
A Stroke object used to construct the line |
value |
A double value representing the value the line will be drawn at |
Defining a single UI configurable static line |
|
---|---|
protected override void OnStateChange() |
Indicator which dynamically adds a line in State.Configure |
|
---|---|
protected override void OnStateChange() |