Averaging

Moving average averaging options

Description

Used in constructor and onUpdate to set the variant of averaging moving averages

Example

this.addInput("Averaging", InputType.Averaging, Averaging.Simple); // в constructor
         let maList1 = await Indicators.MA(Current.Symbol, Current.TimeFrame, PeriodForMA1, 0, Averaging.Exponential, Line1Price, PriceType); // в onUpdate
         let list = await Indicators.MA(Current.Symbol, 0, period, 0, Averaging.Simple, AppliedPrice.Typical, PriceType); // в onUpdate

Elements

const
Exponential Exponential averaging 1
LinearWeighted Linear-weighted averaging 3
Simple Simple averaging 0
Smoothed Smoothed averaging 2