Skip to content

charton API


charton API / @chart-on/ta / volatilityStop

Function: volatilityStop() ​

volatilityStop(high, low, close, length, mult, out?, state?): VolatilityStop

Defined in: stops.ts:33

Volatility stop: a stop mult atrs from the trend's extreme close, below it in an uptrend and above it in a downtrend. It only moves with the trend: up in an uptrend, down in a downtrend. A close past the stop, once the stop has moved with the bar, flips the trend; the extreme restarts at that close and the stop starts mult ATRs from it.

As the indicator is usually defined, it starts on the first bar: that bar starts an uptrend with the stop at its close, and until the ATR has a value the bar's true range stands in for mult ATRs. Lookback 0. A NaN input restarts it.

Pass state to keep the ATR and extreme for volatilityStopAt.

Parameters ​

high ​

Series

low ​

Series

close ​

Series

length ​

number

mult ​

number

out? ​

VolatilityStop

state? ​

VolatilityStopState

Returns ​

VolatilityStop