Skip to content

charton API


charton API / @chart-on/ta / dpo

Function: dpo() ​

dpo(values, length, out?): Float64Array

Defined in: composite.ts:17

Detrended price oscillator: the value minus the sma of length from floor(length / 2) + 1 bars back, which strips the trend and leaves the cycles. This is the usual form, drawn at the current bar; the centred form compares the older value with the current average instead. Lookback length - 1 + floor(length / 2) + 1.

Parameters ​

values ​

Series

length ​

number

out? ​

Float64Array<ArrayBufferLike>

Returns ​

Float64Array