NinjaScript > Language Reference > Indicator >

Displacement

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
An offset value that shifts the plotted value of an indicator.

 

Property Value

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

 

Syntax

Displacement

 

 

Examples

// Initialize method of a custom indicator
protected override void Initialize()
{
    Add(new Plot(Color.Orange, "SMA"));
    Displacement = 2; // Plots the indicator value from 2 bars ago on the current bar
}