PINE LIBRARY

MomentumIndicators

Cập nhật
Library "MomentumIndicators"
This is a library of 'Momentum Indicators', also denominated as oscillators.
The purpose of this library is to organize momentum indicators in just one place, making it easy to access.
In addition, it aims to allow customized versions, not being restricted to just the price value.
An example of this use case is the popular Stochastic RSI.
# Indicators:
1. Relative Strength Index (RSI):
Measures the relative strength of recent price gains to recent price losses of an asset.
2. Rate of Change (ROC):
Measures the percentage change in price of an asset over a specified time period.
3. Stochastic Oscillator (Stoch):
Compares the current price of an asset to its price range over a specified time period.
4. True Strength Index (TSI):
Measures the price change, calculating the ratio of the price change (positive or negative) in relation to the
absolute price change.
The values of both are smoothed twice to reduce noise, and the final result is normalized
in a range between 100 and -100.
5. Stochastic Momentum Index (SMI):
Combination of the True Strength Index with a signal line to help identify turning points in the market.
6. Williams Percent Range (Williams %R):
Compares the current price of an asset to its highest high and lowest low over a specified time period.
7. Commodity Channel Index (CCI):
Measures the relationship between an asset's current price and its moving average.
8. Ultimate Oscillator (UO):
Combines three different time periods to help identify possible reversal points.
9. Moving Average Convergence/Divergence (MACD):
Shows the difference between short-term and long-term exponential moving averages.
10. Fisher Transform (FT):
Normalize prices into a Gaussian normal distribution.
11. Inverse Fisher Transform (IFT):
Transform the values of the Fisher Transform into a smaller and more easily interpretable scale is through the
application of an inverse transformation to the hyperbolic tangent function.
This transformation takes the values of the FT, which range from -infinity to +infinity, to a scale limited
between -1 and +1, allowing them to be more easily visualized and compared.
12. Premier Stochastic Oscillator (PSO):
Normalizes the standard stochastic oscillator by applying a five-period double exponential smoothing average of
the %K value, resulting in a symmetric scale of 1 to -1
# Indicators of indicators:
## Stochastic:
1. Stochastic of RSI (Relative Strengh Index)
2. Stochastic of ROC (Rate of Change)
3. Stochastic of UO (Ultimate Oscillator)
4. Stochastic of TSI (True Strengh Index)
5. Stochastic of Williams R%
6. Stochastic of CCI (Commodity Channel Index).
7. Stochastic of MACD (Moving Average Convergence/Divergence)
8. Stochastic of FT (Fisher Transform)
9. Stochastic of Volume
10. Stochastic of MFI (Money Flow Index)
11. Stochastic of On OBV (Balance Volume)
12. Stochastic of PVI (Positive Volume Index)
13. Stochastic of NVI (Negative Volume Index)
14. Stochastic of PVT (Price-Volume Trend)
15. Stochastic of VO (Volume Oscillator)
16. Stochastic of VROC (Volume Rate of Change)
## Inverse Fisher Transform:
1.Inverse Fisher Transform on RSI (Relative Strengh Index)
2.Inverse Fisher Transform on ROC (Rate of Change)
3.Inverse Fisher Transform on UO (Ultimate Oscillator)
4.Inverse Fisher Transform on Stochastic
5.Inverse Fisher Transform on TSI (True Strength Index)
6.Inverse Fisher Transform on CCI (Commodity Channel Index)
7.Inverse Fisher Transform on Fisher Transform (FT)
8.Inverse Fisher Transform on MACD (Moving Average Convergence/Divergence)
9.Inverse Fisher Transfor on Williams R% (Williams Percent Range)
10.Inverse Fisher Transfor on CMF (Chaikin Money Flow)
11.Inverse Fisher Transform on VO (Volume Oscillator)
12.Inverse Fisher Transform on VROC (Volume Rate of Change)
## Stochastic Momentum Index:
1.Stochastic Momentum Index of RSI (Relative Strength Index)
2.Stochastic Momentum Index of ROC (Rate of Change)
3.Stochastic Momentum Index of VROC (Volume Rate of Change)
4.Stochastic Momentum Index of Williams R% (Williams Percent Range)
5.Stochastic Momentum Index of FT (Fisher Transform)
6.Stochastic Momentum Index of CCI (Commodity Channel Index)
7.Stochastic Momentum Index of UO (Ultimate Oscillator)
8.Stochastic Momentum Index of MACD (Moving Average Convergence/Divergence)
9.Stochastic Momentum Index of Volume
10.Stochastic Momentum Index of MFI (Money Flow Index)
11.Stochastic Momentum Index of CMF (Chaikin Money Flow)
12.Stochastic Momentum Index of On Balance Volume (OBV)
13.Stochastic Momentum Index of Price-Volume Trend (PVT)
14.Stochastic Momentum Index of Volume Oscillator (VO)
15.Stochastic Momentum Index of Positive Volume Index (PVI)
16.Stochastic Momentum Index of Negative Volume Index (NVI)
## Relative Strength Index:
1. RSI for Volume
2. RSI for Moving Average

rsi(source, length)
  RSI (Relative Strengh Index). Measures the relative strength of recent price gains to recent price losses of an asset.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    length: (int) Period of loopback
  Returns: (float) Series of RSI

roc(source, length)
  ROC (Rate of Change). Measures the percentage change in price of an asset over a specified time period.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    length: (int) Period of loopback
  Returns: (float) Series of ROC

stoch(kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Stochastic Oscillator. Compares the current price of an asset to its price range over a specified time period.
  Parameters:
    kLength
    kSmoothing: (int) Period for smoothig stochastic
    dSmoothing: (int) Period for signal (moving average of stochastic)
    maTypeK: (int) Type of Moving Average for Stochastic Oscillator
    maTypeD: (int) Type of Moving Average for Stochastic Oscillator Signal
    almaOffsetKD: (float) Offset for Arnaud Legoux Moving Average for Oscillator and Signal
    almaSigmaKD: (float) Sigma for Arnaud Legoux Moving Average for Oscillator and Signal
    lsmaOffSetKD: (int) Offset for Least Squares Moving Average for Oscillator and Signal
  Returns: [float, float] A tuple of Stochastic Oscillator and Moving Average of Stochastic Oscillator

stoch(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Stochastic Oscillator. Customized source. Compares the current price of an asset to its price range over a specified time period.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    kLength: (int) Period of loopback to calculate the stochastic
    kSmoothing: (int) Period for smoothig stochastic
    dSmoothing: (int) Period for signal (moving average of stochastic)
    maTypeK: (int) Type of Moving Average for Stochastic Oscillator
    maTypeD: (int) Type of Moving Average for Stochastic Oscillator Signal
    almaOffsetKD: (float) Offset for Arnaud Legoux Moving Average for Stoch and Signal
    almaSigmaKD: (float) Sigma for Arnaud Legoux Moving Average for Stoch and Signal
    lsmaOffSetKD: (int) Offset for Least Squares Moving Average for Stoch and Signal
  Returns: [float, float] A tuple of Stochastic Oscillator and Moving Average of Stochastic Oscillator

tsi(source, shortLength, longLength, maType, almaOffset, almaSigma, lsmaOffSet)
  TSI (True Strengh Index). Measures the price change, calculating the ratio of the price change (positive or negative) in relation to the absolute price change.
The values of both are smoothed twice to reduce noise, and the final result is normalized in a range between 100 and -100.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    shortLength: (int) Short length
    longLength: (int) Long length
    maType: (int) Type of Moving Average for TSI
    almaOffset: (float) Offset for Arnaud Legoux Moving Average
    almaSigma: (float) Sigma for Arnaud Legoux Moving Average
    lsmaOffSet: (int) Offset for Least Squares Moving Average
  Returns: (float) TSI

smi(sourceTSI, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  SMI (Stochastic Momentum Index). A TSI (True Strengh Index) plus a signal line.
  Parameters:
    sourceTSI: (float) Source of series for TSI (close, high, low, etc.)
    shortLengthTSI: (int) Short length for TSI
    longLengthTSI: (int) Long length for TSI
    maTypeTSI: (int) Type of Moving Average for Signal of TSI
    almaOffsetTSI: (float) Offset for Arnaud Legoux Moving Average
    almaSigmaTSI: (float) Sigma for Arnaud Legoux Moving Average
    lsmaOffSetTSI: (int) Offset for Least Squares Moving Average
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal
  Returns: [float, float, float] A tuple with TSI, signal of TSI and histogram of difference

wpr(source, length)
  Williams R% (Williams Percent Range). Compares the current price of an asset to its highest high and lowest low over a specified time period.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    length: (int) Period of loopback
  Returns: (float) Series of Williams R%

cci(source, length, maType, almaOffset, almaSigma, lsmaOffSet)
  CCI (Commodity Channel Index). Measures the relationship between an asset's current price and its moving average.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    length: (int) Period of loopback
    maType: (int) Type of Moving Average
    almaOffset: (float) Offset for Arnaud Legoux Moving Average
    almaSigma: (float) Sigma for Arnaud Legoux Moving Average
    lsmaOffSet: (int) Offset for Least Squares Moving Average
  Returns: (float) Series of CCI

ultimateOscillator(fastLength, middleLength, slowLength)
  UO (Ultimate Oscilator). Combines three different time periods to help identify possible reversal points.
  Parameters:
    fastLength: (int) Fast period of loopback
    middleLength: (int) Middle period of loopback
    slowLength: (int) Slow period of loopback
  Returns: (float) Series of Ultimate Oscilator

ultimateOscillator(source, fastLength, middleLength, slowLength)
  UO (Ultimate Oscilator). Customized source. Combines three different time periods to help identify possible reversal points.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    fastLength: (int) Fast period of loopback
    middleLength: (int) Middle period of loopback
    slowLength: (int) Slow period of loopback
  Returns: (float) Series of Ultimate Oscilator

macd(source, fastLength, slowLength, signalLength, maTypeFast, maTypeSlow, maTypeMACD, almaOffset, almaSigma, lsmaOffSet)
  MACD (Moving Average Convergence/Divergence). Shows the difference between short-term and long-term exponential moving averages.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    fastLength: (int) Period for fast moving average
    slowLength: (int) Period for slow moving average
    signalLength: (int) Signal length
    maTypeFast: (int) Type of fast moving average
    maTypeSlow: (int) Type of slow moving average
    maTypeMACD: (int) Type of MACD moving average
    almaOffset: (float) Offset for Arnaud Legoux Moving Average
    almaSigma: (float) Sigma for Arnaud Legoux Moving Average
    lsmaOffSet: (int) Offset for Least Squares Moving Average
  Returns: [float, float, float] A tuple with MACD, Signal, and Histgram

fisher(length)
  Fisher Transform. Normalize prices into a Gaussian normal distribution.
  Parameters:
    length
  Returns: [float, float] A tuple with Fisher Transform and signal

fisher(source, length)
  Fisher Transform. Customized source. Normalize prices into a Gaussian normal distribution.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    length
  Returns: [float, float] A tuple with Fisher Transform and signal

inverseFisher(source, length, subtrahend, denominator)
  Inverse Fisher Transform.
Transform the values of the Fisher Transform into a smaller and more easily interpretable scale is
through the application of an inverse transformation to the hyperbolic tangent function.
This transformation takes the values of the FT, which range from -infinity to +infinity,
to a scale limited between -1 and +1, allowing them to be more easily visualized and compared.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    length: (int) Period for loopback
    subtrahend: (int) Denominator. Useful in unbounded indicators. For example, in CCI.
    denominator
  Returns: (float) Series of Inverse Fisher Transform

premierStoch(length, smoothlen)
  Premier Stochastic Oscillator (PSO).
Normalizes the standard stochastic oscillator by applying a five-period double exponential smoothing
average of the %K value, resulting in a symmetric scale of 1 to -1.
  Parameters:
    length: (int) Period for loopback
    smoothlen: (int) Period for smoothing
  Returns: (float) Series of PSO

premierStoch(source, smoothlen, subtrahend, denominator)
  Premier Stochastic Oscillator (PSO) of custom source.
Normalizes the source by applying a five-period double exponential smoothing average.
  Parameters:
    source: (float) Source of series (close, high, low, etc.)
    smoothlen: (int) Period for smoothing
    subtrahend: (int) Denominator. Useful in unbounded indicators. For example, in CCI.
    denominator
  Returns: (float) Series of PSO

stochRsi(sourceRSI, lengthRSI, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    sourceRSI
    lengthRSI
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochRoc(sourceROC, lengthROC, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    sourceROC
    lengthROC
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochUO(fastLength, middleLength, slowLength, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    fastLength
    middleLength
    slowLength
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochTSI(source, shortLength, longLength, maType, almaOffset, almaSigma, lsmaOffSet, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    source
    shortLength
    longLength
    maType
    almaOffset
    almaSigma
    lsmaOffSet
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochWPR(source, length, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    source
    length
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochCCI(source, length, maType, almaOffset, almaSigma, lsmaOffSet, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    source
    length
    maType
    almaOffset
    almaSigma
    lsmaOffSet
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochMACD(source, fastLength, slowLength, signalLength, maTypeFast, maTypeSlow, maTypeMACD, almaOffset, almaSigma, lsmaOffSet, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    source
    fastLength
    slowLength
    signalLength
    maTypeFast
    maTypeSlow
    maTypeMACD
    almaOffset
    almaSigma
    lsmaOffSet
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochFT(length, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    length
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochVolume(kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochMFI(source, length, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    source
    length
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochOBV(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    source
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochPVI(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    source
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochNVI(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    source
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochPVT(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    source
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochVO(shortLen, longLen, maType, almaOffset, almaSigma, lsmaOffSet, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    shortLen
    longLen
    maType
    almaOffset
    almaSigma
    lsmaOffSet
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

stochVROC(length, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
  Parameters:
    length
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD

iftRSI(sourceRSI, lengthRSI, lengthIFT)
  Parameters:
    sourceRSI
    lengthRSI
    lengthIFT

iftROC(sourceROC, lengthROC, lengthIFT)
  Parameters:
    sourceROC
    lengthROC
    lengthIFT

iftUO(fastLength, middleLength, slowLength, lengthIFT)
  Parameters:
    fastLength
    middleLength
    slowLength
    lengthIFT

iftStoch(kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD, lengthIFT)
  Parameters:
    kLength
    kSmoothing
    dSmoothing
    maTypeK
    maTypeD
    almaOffsetKD
    almaSigmaKD
    lsmaOffSetKD
    lengthIFT

iftTSI(source, shortLength, longLength, maType, almaOffset, almaSigma, lsmaOffSet, lengthIFT)
  Parameters:
    source
    shortLength
    longLength
    maType
    almaOffset
    almaSigma
    lsmaOffSet
    lengthIFT

iftCCI(source, length, maType, almaOffset, almaSigma, lsmaOffSet, lengthIFT)
  Parameters:
    source
    length
    maType
    almaOffset
    almaSigma
    lsmaOffSet
    lengthIFT

iftFisher(length, lengthIFT)
  Parameters:
    length
    lengthIFT

iftMACD(source, fastLength, slowLength, signalLength, maTypeFast, maTypeSlow, maTypeMACD, almaOffset, almaSigma, lsmaOffSet, lengthIFT)
  Parameters:
    source
    fastLength
    slowLength
    signalLength
    maTypeFast
    maTypeSlow
    maTypeMACD
    almaOffset
    almaSigma
    lsmaOffSet
    lengthIFT

iftWPR(source, length, lengthIFT)
  Parameters:
    source
    length
    lengthIFT

iftMFI(source, length, lengthIFT)
  Parameters:
    source
    length
    lengthIFT

iftCMF(length, lengthIFT)
  Parameters:
    length
    lengthIFT

iftVO(shortLen, longLen, maType, almaOffset, almaSigma, lsmaOffSet, lengthIFT)
  Parameters:
    shortLen
    longLen
    maType
    almaOffset
    almaSigma
    lsmaOffSet
    lengthIFT

iftVROC(length, lengthIFT)
  Parameters:
    length
    lengthIFT

smiRSI(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    length
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiROC(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    length
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiVROC(length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    length
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiWPR(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    length
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiFT(length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    length
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiFT(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    length
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiCCI(source, length, maTypeCCI, almaOffsetCCI, almaSigmaCCI, lsmaOffSetCCI, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    length
    maTypeCCI
    almaOffsetCCI
    almaSigmaCCI
    lsmaOffSetCCI
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiUO(fastLength, middleLength, slowLength, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    fastLength
    middleLength
    slowLength
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiMACD(source, fastLength, slowLength, signalLength, maTypeFast, maTypeSlow, maTypeMACD, almaOffset, almaSigma, lsmaOffSet, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    fastLength
    slowLength
    signalLength
    maTypeFast
    maTypeSlow
    maTypeMACD
    almaOffset
    almaSigma
    lsmaOffSet
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiVol(shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiMFI(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    length
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiCMF(length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    length
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiOBV(source, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiPVT(source, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiVO(shortLen, longLen, maType, almaOffset, almaSigma, lsmaOffSet, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    shortLen
    longLen
    maType
    almaOffset
    almaSigma
    lsmaOffSet
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiPVI(source, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

smiNVI(source, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
  Parameters:
    source
    shortLengthTSI
    longLengthTSI
    maTypeTSI
    almaOffsetTSI
    almaSigmaTSI
    lsmaOffSetTSI
    maTypeSignal
    smoothingLengthSignal
    almaOffsetSignal
    almaSigmaSignal
    lsmaOffSetSignal

rsiVolume(length)
  Parameters:
    length

rsiMA(sourceMA, lengthMA, maType, almaOffset, almaSigma, lsmaOffSet, lengthRSI)
  Parameters:
    sourceMA
    lengthMA
    maType
    almaOffset
    almaSigma
    lsmaOffSet
    lengthRSI
Phát hành các Ghi chú
v2

Added:
- Momentum Oscillator
- SMI of Momentum

Fixed:
- Fisher Transform with custom source
  New parameters:
    sourceHigh (float)
    sourceLow (float)
    length (simple int)

- SMI of Fisher Transform with custom source
  New parameters:
    sourceHigh (float)
    sourceLow (float)
    length (simple int)
Phát hành các Ghi chú
v3
1. Parameters related to the moving average type have been transformed from STRING to INT, using key-value logic.
The reason is that the INT type takes up less memory than STRING.

2. Added Asymmetrical RSI (credits: Alex Orekhov).

3. TSI vs SMI:
TSI and SMI aren't the same thing, so now this has been corrected.

True Strength Index (TSI): measures the price change, calculating the ratio of the price change (positive or negative) in relation to the absolute price change.

Stochastic Momentum Index (SMI): compares the closing price of an asset with the range of its prices over a certain period of time.
Phát hành các Ghi chú
v4
1. Added new indicator: SMIE (Stochastic Momentum Index Ergodic).
2. Minor fix in default parameters.
Phát hành các Ghi chú
v5

[FIX] SMI's formula corrected to match the original one.
Now the value is multiplied by 200 instead of 100.
So the oscillator will be in the range of -100 to 100 instead of -50 to 50.

[Feature] Added an overloaded function of SMI to support custom source for high, low, and relative range.

[Feature] Added Know Sure Thing (KST) indicator.
Phát hành các Ghi chú
v6
[FIX] SMI double smooth formula fixed to use %D Length parameter.
fishertrasnformMomentum OscillatorsoscillaltorSMIstochasticoscillatortechindicatorTSI

Thư viện Pine

Theo tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này dưới dạng thư viện nguồn mở để các lập trình viên Pine khác trong cộng đồng của chúng tôi có thể sử dụng lại. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này riêng tư hoặc trong các bài đăng nguồn mở khác. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ.


To contribute to my work:
⚡Bitcoin Lightning: forwardocean64@walletofsatoshi.com
🟠Bitcoin: bc1qv0j28wjsg6l8fdkphkmgfz4f55xpph893q0pdh
🔵PayPal: paypal.com/donate/?hosted_button_id=D9KRKY5HMSL9S
Ngoài ra, trên:

Thông báo miễn trừ trách nhiệm