charton API / @chart-on/ta / supertrend
Function: supertrend()
supertrend(
high,low,close,length,mult,out?,state?):Supertrend
Defined in: trend.ts:144
Supertrend: bands mult average true ranges (atr over length) above and below the bar's midpoint (high + low) / 2. The upper band only moves down and the lower band only moves up, unless the previous close crossed them. The trend flips up when the close rises above the upper band and down when it falls below the lower band. The first bar of a run starts up when its close is at or above the midpoint. Lookback length - 1.
Pass state to keep the average true range and bands for supertrendAt.
Parameters
high
low
close
length
number
mult
number