Displacement

View as Markdown

Definition

An offset value that shifts the visually displayed value of an indicator.

Property Value

An int value that represents the number of bars ago to offset with.

Syntax

Displacement

Examples

1protected override void OnStateChange()
2{
3 if (State == State.SetDefaults)
4 {
5 Displacement = 2; // Plots the indicator value from 2 bars ago on the current bar
6 AddPlot(Brushes.Orange, "SMA");
7 }
8}