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

talib.STDDEV

The talib.STDDEV() function is used to calculate Standard Deviation.

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

talib.STDDEV(inReal) talib.STDDEV(inReal, optInTimePeriod) talib.STDDEV(inReal, optInTimePeriod, optInNbDev)

The inReal parameter is used to specify the K-line data. inReal true {@struct/Record Record} structure arrays, numeric arrays The optInTimePeriod parameter is used to set the period, the default value is 5. optInTimePeriod false number The optInNbDev parameter is used to set the Deviations, the default value is 1. optInNbDev false number

function main() {
    var records = exchange.GetRecords()
    var ret = talib.STDDEV(records)
    Log(ret)
}
import talib
def main():
    records = exchange.GetRecords()
    ret = talib.STDDEV(records.Close)
    Log(ret)
void main() {
    auto records = exchange.GetRecords();
    auto ret = talib.STDDEV(records);
    Log(ret);
}

The STDDEV() function is described in the talib library documentation as: STDDEV(Records[Close],Time Period = 5,Deviations = 1) = Array(outReal)

talib.LINEARREG_SLOPE talib.TSF