ScaleJustification

View as Markdown

Definition

Determines which scale an indicator will be plotted on.

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

Property Value

This property returns a ScaleJustification value of either:

  • NinjaTrader.Gui.Charts.ScaleJustification.Left
  • NinjaTrader.Gui.Charts.ScaleJustification.Overlay
  • NinjaTrader.Gui.Charts.ScaleJustification.Right

Syntax

ScaleJustification

Examples

1protected override void OnStateChange()
2{
3 if (State == State.SetDefaults)
4 {
5 Name = "Examples Indicator";
6
7 // force "My Plot" to be plotted on the left scale
8 ScaleJustification = ScaleJustification.Left;
9 }
10 else if (State == State.Configure)
11 {
12 AddPlot(Brushes.Orange, "My Plot");
13 }
14}