PINE LIBRARY
已更新 Momentum

Library "Momentum"
Contains utilities varying algorithms for measuring momentum.
simple(fast, slow, src, fastType, slowType) Derives momentum from two moving averages of different lengths.
Parameters:
fast: The length of the fast moving average.
slow: The length of the slow moving average.
src: The series to measure from. Default is 'close'.
fastType: The type of moving average the fast should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
slowType: The type of moving average the slow should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
stochRSI(fast, fast, rsiLen, stochLen, src, kmode) Returns the K and D values of a Stochastic RSI. Allows for different moving averages to produce the K value.
Parameters:
fast: The length to average the stochastic.
fast: The length to smooth out K and produce D.
rsiLen: The length of the RSI.
stochLen: The length of stochastic.
src: The series to measure from. Default is 'close'.
kmode: The type of moving average to generate. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
Returns: [K, D]
macd(fast, slow, signal, src, fastType, slowType, slowType) Same as well-known MACD formula but allows for different moving averages types to be used.
Parameters:
fast: The length of the fast moving average.
slow: The length of the slow moving average.
signal: The length of average to applied to smooth out the signal.
src: The series to measure from. Default is 'close'.
fastType: The type of moving average the fast should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
slowType: The type of moving average the slow should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
slowType: The type of moving average the signal should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
Returns: [macd, signal, histogram]
Contains utilities varying algorithms for measuring momentum.
simple(fast, slow, src, fastType, slowType) Derives momentum from two moving averages of different lengths.
Parameters:
fast: The length of the fast moving average.
slow: The length of the slow moving average.
src: The series to measure from. Default is 'close'.
fastType: The type of moving average the fast should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
slowType: The type of moving average the slow should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
stochRSI(fast, fast, rsiLen, stochLen, src, kmode) Returns the K and D values of a Stochastic RSI. Allows for different moving averages to produce the K value.
Parameters:
fast: The length to average the stochastic.
fast: The length to smooth out K and produce D.
rsiLen: The length of the RSI.
stochLen: The length of stochastic.
src: The series to measure from. Default is 'close'.
kmode: The type of moving average to generate. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
Returns: [K, D]
macd(fast, slow, signal, src, fastType, slowType, slowType) Same as well-known MACD formula but allows for different moving averages types to be used.
Parameters:
fast: The length of the fast moving average.
slow: The length of the slow moving average.
signal: The length of average to applied to smooth out the signal.
src: The series to measure from. Default is 'close'.
fastType: The type of moving average the fast should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
slowType: The type of moving average the slow should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
slowType: The type of moving average the signal should use. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
Returns: [macd, signal, histogram]
發行說明
v2 Cleanup.發行說明
v3 Fixed function docs.發行說明
v4 Republish for debugging server error發行說明
v5 Updated reference with improved MovingAverage lib.發行說明
v6 Added 'changeNormalized' function for normalizing the velocity of movement. Typically used for moving averages.Added:
changeNormalized(src, len) Returns the 'change' (current - previous) in value normalized by standard deviation measured by the provided length.
Parameters:
src: The series to measure changes.
len: The number of bars to measure the standard deviation.
發行說明
v7 Updated DataCleaner and implemented normalize function.Updated:
changeNormalized(src, len) Returns the 'change' (current - previous) in value normalized by standard deviation measured by the provided length.
Parameters:
src: The series to measure changes.
len: The number of bars to measure the standard deviation.
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。