Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
Overlap Studies
Momentum Indicators
talib.ADX
talib.ADXR
talib.APO
talib.AROON
talib.AROONOSC
talib.BOP
talib.CCI
talib.CMO
talib.DX
talib.IMI
talib.MACD
talib.MACDEXT
talib.MACDFIX
talib.MFI
talib.MINUS_DI
talib.MINUS_DM
talib.MOM
talib.PLUS_DI
talib.PLUS_DM
talib.PPO
talib.ROC
talib.ROCP
talib.ROCR
talib.ROCR100
talib.RSI
talib.STOCH
talib.STOCHF
talib.STOCHRSI
talib.TRIX
talib.ULTOSC
talib.WILLR
Volume Indicators
Volatility Indicators
Cycle Indicators
Price Transform
Statistic Functions
Math Transform
Math Operators
Pattern Recognition
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges
talib.STOCHF
Calculates the Stochastic Fast and returns the fast %K and fast %D.
talib.STOCHF(inPriceHLC)
talib.STOCHF(inPriceHLC, optInFastK_Period)
talib.STOCHF(inPriceHLC, optInFastK_Period, optInFastD_Period)
talib.STOCHF(inPriceHLC, optInFastK_Period, optInFastD_Period, optInFastD_MAType)Examples
Compute the Stochastic Fast from the latest K-lines.
javascript
function main() {
var records = exchange.GetRecords()
if (!records) return
var ret = talib.STOCHF(records)
// Output: [fast %K array, fast %D array]
Log(ret)
}
python
import talib
def main():
records = exchange.GetRecords()
if not records:
return
ret = talib.STOCHF(records.High, records.Low, records.Close)
# Output: (fast %K array, fast %D array)
Log(ret)Returns
| Type | Description |
array | Two-dimensional array: [fast %K array, fast %D array] (a tuple in the same order in Python). |
Arguments
| Name | Type | Required | Description |
inPriceHLC |
| Yes | K-line array; the high, low and close fields are used. In Python, pass |
optInFastK_Period | number | No | Fast %K period. Default |
optInFastD_Period | number | No | Fast %D period. Default |
optInFastD_MAType | number | No | Moving average type of fast %D; see the MAType table on the |
See Also
Remarks
TA-Lib equivalent: STOCHF(Records[High,Low,Close],Fast-K Period = 5,Fast-D Period = 3,Fast-D MA = 0) = [Array(outFastK),Array(outFastD)].