The ATR Trailing Stop study plots the trailing stop value, the calculation of which depends on the specified trail type.

If the trail type is "unmodified", this value is calculated as the Average True Range (ATR) on the defined period multiplied by the specified factor.

In case the "modified" trail type is set up, true range values are subjected to a special transform. Calculation mechanism then involves using a long-period moving average, minimizing gaps between adjacent bars, and smoothing out sharp surges of price.

Input Parameters

Parameter Description
trail type Defines whether to use "modified" or "unmodified" trailing stop calculation mechanism.
atr period The number of bars used to calculate the Average True Range.
atr factor The multiplier of the ATR value.
first trade Defines whether to initialize ATR calculation at a short or a long position.

average type

The type of moving average to be used in calculations: simple, exponential, weighted, Wilder's, or Hull.


Plot Description
TrailingStop The ATR Trailing Stop plot.


*For illustrative purposes only. Not a recommendation of a specific security or investment strategy.