资源加载中... loading...

TA.ATR

The TA.ATR() function is used to calculate the Average True Volatility Indicator.

The return value of the TA.ATR() function is: a one-dimensional array. array

TA.ATR(inPriceHLC) TA.ATR(inPriceHLC, optInTimePeriod)

The inPriceHLC parameter is used to specify the K-line data. inPriceHLC true {@struct/Record Record} structure array The optInTimePeriod parameter is used to set the period. optInTimePeriod false number

function main(){
    var records = exchange.GetRecords(PERIOD_M30)
    var atr = TA.ATR(records, 14)
    Log(atr)
}
def main():
    r = exchange.GetRecords(PERIOD_M30)
    atr = TA.ATR(r, 14)
    Log(atr)
void main() {
    auto r = exchange.GetRecords(PERIOD_M30);
    auto atr = TA.ATR(r, 14);
    Log(atr);
}

The default value of the optInTimePeriod parameter of the TA.ATR() function is: 14.

{@fun/TA/TA.MACD TA.MACD}, {@fun/TA/TA.KDJ TA.KDJ}, {@fun/TA/TA.RSI TA.RSI}, {@fun/TA/TA.OBV TA.OBV}, {@fun/TA/TA.MA TA.MA}, {@fun/TA/TA.EMA TA.EMA}, {@fun/TA/TA.BOLL TA.BOLL}, {@fun/TA/TA.Alligator TA.Alligator}, {@fun/TA/TA.CMF TA.CMF}, {@fun/TA/TA.Highest TA.Highest}, {@fun/TA/TA.Lowest TA.Lowest}

TA.RSI TA.OBV