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

talib.STOCHF

talib.STOCHF()函数用于计算Stochastic Fast (快速STOCH指标)

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

talib.STOCHF(inPriceHLC) talib.STOCHF(inPriceHLC, optInFastK_Period) talib.STOCHF(inPriceHLC, optInFastK_Period, optInFastD_Period) talib.STOCHF(inPriceHLC, optInFastK_Period, optInFastD_Period, optInFastD_MAType)

inPriceHLC参数用于指定K线数据。 inPriceHLC true {@struct/Record Record}结构数组 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.STOCHF(records)
    Log(ret)
}
import talib
def main():
    records = exchange.GetRecords()
    ret = talib.STOCHF(records.High, records.Low, records.Close)
    Log(ret)
void main() {
    auto records = exchange.GetRecords();
    auto ret = talib.STOCHF(records);
    Log(ret);
}

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

talib.STOCH talib.STOCHRSI