The resource loading... loading...

talib.RSI

The talib.RSI() function is used to calculate the Relative Strength Index.

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

talib.RSI(inReal) talib.RSI(inReal, optInTimePeriod)

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 14. optInTimePeriod false number

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

The RSI() function is described in the talib library documentation as: RSI(Records[Close],Time Period = 14) = Array(outReal)

talib.ROCR100 talib.STOCH