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

talib.STOCHRSI

talib.STOCHRSI()函数用于计算Stochastic Relative Strength Index (随机强弱指数)

talib.STOCHRSI()函数的返回值为:二维数组。 array

talib.STOCHRSI(inReal) talib.STOCHRSI(inReal, optInTimePeriod) talib.STOCHRSI(inReal, optInTimePeriod, optInFastK_Period) talib.STOCHRSI(inReal, optInTimePeriod, optInFastK_Period, optInFastD_Period) talib.STOCHRSI(inReal, optInTimePeriod, optInFastK_Period, optInFastD_Period, optInFastD_MAType)

inReal参数用于指定K线数据。 inReal true {@struct/Record Record}结构数组、数值数组 optInTimePeriod参数用于设置周期,默认值为14。 optInTimePeriod false number optInFastK_Period参数用于设置Fast-K周期,默认值为5。 optInFastK_Period false number optInFastD_Period参数用于设置Fast-D周期,默认值为3。 optInFastD_Period false number optInFastD_MAType参数用于设置Fast-D均线类型,默认值为0。 optInFastD_MAType false number

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

STOCHRSI()函数在talib库文档中的描述为:STOCHRSI(Records[Close],Time Period = 14,Fast-K Period = 5,Fast-D Period = 3,Fast-D MA = 0) = [Array(outFastK),Array(outFastD)]

talib.STOCHF talib.TRIX