The talib.STOCHF()
function is used to calculate the Stochastic Fast (fast STOCH indicator).
The return value of the talib.STOCHF()
function is a two-dimensional array.
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)
The inPriceHLC
parameter is used to specify the K-line data.
inPriceHLC
true
{@struct/Record Record} structure array
The optInFastK_Period
parameter is used to set the Fast-K period, the default value is 5.
optInFastK_Period
false
number
The optInFastD_Period
parameter is used to set the Fast-D period, the default value is 3.
optInFastD_Period
false
number
The optInFastD_MAType
parameter is used to set the Fast-D average type, the default value is 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);
}
The STOCHF()
function is described in the talib library documentation as: STOCHF(Records[High,Low,Close],Fast-K Period = 5,Fast-D Period = 3,Fast-D MA = 0) = [Array(outFastK),Array(outFastD)]