IsAutoScale

View as Markdown

Definition

If true, the object will call CalculateMinMax() in order to determine the object’s MinValue and MaxValue value used to scale the Y-axis of the chart.

Property Value

This property returns true if the object’s are included in the y-scale; otherwise, false. Default set to false for DrawingTools, but set to true for Indicators.

This property should ONLY be set from the OnStateChange() method during State.SetDefaults or State.Configure.

Syntax

IsAutoScale

Examples

1protected override void OnStateChange()
2{
3 if (State == State.SetDefaults)
4 {
5 Name = "Example Indicator";
6 // set this to true to call CalculateMinMix() to ensure drawing tool is fully rendered in chart scale
7 IsAutoScale = true;
8 }
9 else if (State == State.Configure)
10 {
11 }
12}