Indicators.MA()

Calculates the Moving Average indicator and returns its value.
await Indicators.MA(symbol:string, timeframe:string, maPeriod:int, maShift:int, maMethod:int, appliedPrice:int, priceType:int)

Parameters

Name Type Действие Значение по умолчанию
symbol string Symbol name on the data of which the indicator will be calculated. null means the current symbol.
timeframe string TimeFrame. It can be any of TimeFrame enumeration values. 0 means the current chart timeframe.
maPeriod int Averaging period for calculation.
maShift int MA shift. Indicators line offset relate to the chart by timeframe.
maMethod int Moving Average method. It can be any of Averaging enumeration values.
appliedPrice int Applied price. It can be any of AppliedPrice enumeration values.
priceType int Price type

Return value

Numerical values of the Moving Average indicator.

Example

let listMA = await Indicator.MA(null, 0, 13, 8, Averaging.Smoothed, AppliedPrice.Median, PriceType.Bid);