IsAutoScale

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Common > Charts >

IsAutoScale

Previous page Return to chapter overview Next page

Definition

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

 

Property Value

This property returns true if the drawing tool plot(s) are included in the y-scale; otherwise, false. Default set to false.

 

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

 

Syntax

IsAutoScale

 

Example

ns


protected override void OnStateChange()
{
  if (State == State.SetDefaults)
  {        
    Name                 = "Example Indicator";        
    // set this to true to call CalculateMinMix() to ensure drawing tool is fully rendered in chart scale
    IsAutoScale = true;
  }
  else if (State == State.Configure)
  {
  }
}