MightyZinger

Moving_Averages

Library "Moving_Averages"

This library contains majority important moving average functions with int series support. Which means that they can be used with variable length input. For conventional use, please use tradingview built-in ta functions for moving averages as they are more precise. I'll use functions in this library for my other scripts with dynamic length inputs.

ema( src , len )
  Exponential Moving Average ( EMA )
  Parameters:
    src: Source
    len: Period
  Returns: Exponential Moving Average with Series Int Support ( EMA )

alma( src , len , a_offset, a_sigma)
  Arnaud Legoux Moving Average ( ALMA )
  Parameters:
    src: Source
    len: Period
    a_offset: Arnaud Legoux offset
    a_sigma: Arnaud Legoux sigma
  Returns: Arnaud Legoux Moving Average ( ALMA )

covwema( src , len )
  Coefficient of Variation Weighted Exponential Moving Average (COVWEMA)
  Parameters:
    src: Source
    len: Period
  Returns: Coefficient of Variation Weighted Exponential Moving Average (COVWEMA)

covwma( src , len )
  Coefficient of Variation Weighted Moving Average (COVWMA)
  Parameters:
    src: Source
    len: Period
  Returns: Coefficient of Variation Weighted Moving Average (COVWMA)

dema( src , len )
  DEMA - Double Exponential Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: DEMA - Double Exponential Moving Average

edsma( src , len , ssfLength, ssfPoles)
  EDSMA - Ehlers Deviation Scaled Moving Average
  Parameters:
    src: Source
    len: Period
    ssfLength: EDSMA - Super Smoother Filter Length
    ssfPoles: EDSMA - Super Smoother Filter Poles
  Returns: Ehlers Deviation Scaled Moving Average (EDSMA)

eframa( src , len , FC , SC )
  Ehlrs Modified Fractal Adaptive Moving Average (EFRAMA)
  Parameters:
    src: Source
    len: Period
    FC: Lower Shift Limit for Ehlrs Modified Fractal Adaptive Moving Average
    SC: Upper Shift Limit for Ehlrs Modified Fractal Adaptive Moving Average
  Returns: Ehlrs Modified Fractal Adaptive Moving Average (EFRAMA)

ehma( src , len )
  EHMA - Exponential Hull Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Exponential Hull Moving Average (EHMA)

etma( src , len )
  Exponential Triangular Moving Average (ETMA)
  Parameters:
    src: Source
    len: Period
  Returns: Exponential Triangular Moving Average (ETMA)

frama( src , len )
  Fractal Adaptive Moving Average ( FRAMA )
  Parameters:
    src: Source
    len: Period
  Returns: Fractal Adaptive Moving Average ( FRAMA )

hma( src , len )
  HMA - Hull Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Hull Moving Average ( HMA )

jma( src , len , jurik_phase, jurik_power)
  Jurik Moving Average - JMA
  Parameters:
    src: Source
    len: Period
    jurik_phase: Jurik ( JMA ) Only - Phase
    jurik_power: Jurik ( JMA ) Only - Power
  Returns: Jurik Moving Average ( JMA )

kama( src , len , k_fastLength, k_slowLength)
  Kaufman's Adaptive Moving Average ( KAMA )
  Parameters:
    src: Source
    len: Period
    k_fastLength: Number of periods for the fastest exponential moving average
    k_slowLength: Number of periods for the slowest exponential moving average
  Returns: Kaufman's Adaptive Moving Average ( KAMA )

kijun(_high, _low, len , kidiv)
  Kijun v2
  Parameters:
    _high: High value of bar
    _low: Low value of bar
    len: Period
    kidiv: Kijun MOD Divider
  Returns: Kijun v2

lsma( src , len , offset)
  LSMA/ LRC - Least Squares Moving Average / Linear Regression Curve
  Parameters:
    src: Source
    len: Period
    offset: Offset
  Returns: Least Squares Moving Average ( LSMA )/ Linear Regression Curve ( LRC )

mf( src , len , beta, feedback, z)
  MF - Modular Filter
  Parameters:
    src: Source
    len: Period
    beta: Modular Filter, General Filter Only - Beta
    feedback: Modular Filter Only - Feedback
    z: Modular Filter Only - Feedback Weighting
  Returns: Modular Filter (MF)

rma( src , len )
  RMA - RSI Moving average
  Parameters:
    src: Source
    len: Period
  Returns: RSI Moving average (RMA)

sma( src , len )
  SMA - Simple Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Simple Moving Average ( SMA )

smma( src , len )
  Smoothed Moving Average ( SMMA )
  Parameters:
    src: Source
    len: Period
  Returns: Smoothed Moving Average ( SMMA )

stma( src , len )
  Simple Triangular Moving Average (STMA)
  Parameters:
    src: Source
    len: Period
  Returns: Simple Triangular Moving Average (STMA)

tema( src , len )
  TEMA - Triple Exponential Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Triple Exponential Moving Average ( TEMA )

thma( src , len )
  THMA - Triple Hull Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Triple Hull Moving Average (THMA)

vama( src , len , volatility_lookback)
  VAMA - Volatility Adjusted Moving Average
  Parameters:
    src: Source
    len: Period
    volatility_lookback: Volatility lookback length
  Returns: Volatility Adjusted Moving Average ( VAMA )

vidya( src , len )
  Variable Index Dynamic Average ( VIDYA )
  Parameters:
    src: Source
    len: Period
  Returns: Variable Index Dynamic Average ( VIDYA )

vwma( src , len )
  Volume-Weighted Moving Average ( VWMA )
  Parameters:
    src: Source
    len: Period
  Returns: Volume-Weighted Moving Average ( VWMA )

wma( src , len )
  WMA - Weighted Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Weighted Moving Average ( WMA )

zema( src , len )
  Zero-Lag Exponential Moving Average (ZEMA)
  Parameters:
    src: Source
    len: Period
  Returns: Zero-Lag Exponential Moving Average (ZEMA)

zsma( src , len )
  Zero-Lag Simple Moving Average (ZSMA)
  Parameters:
    src: Source
    len: Period
  Returns: Zero-Lag Simple Moving Average (ZSMA)

evwma( src , len )
  EVWMA - Elastic Volume Weighted Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Elastic Volume Weighted Moving Average (EVWMA)

tt3( src , len , a1_t3)
  Tillson T3
  Parameters:
    src: Source
    len: Period
    a1_t3: Tillson T3 Volume Factor
  Returns: Tillson T3

gma( src , len )
  GMA - Geometric Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Geometric Moving Average ( GMA )

wwma( src , len )
  WWMA - Welles Wilder Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Welles Wilder Moving Average (WWMA)

ama( src , _high, _low, len , ama_f_length, ama_s_length)
  AMA - Adjusted Moving Average
  Parameters:
    src: Source
    _high: High value of bar
    _low: Low value of bar
    len: Period
    ama_f_length: Fast EMA Length
    ama_s_length: Slow EMA Length
  Returns: Adjusted Moving Average (AMA)

cma( src , len )
  Corrective Moving average ( CMA )
  Parameters:
    src: Source
    len: Period
  Returns: Corrective Moving average ( CMA )

gmma( src , len )
  Geometric Mean Moving Average (GMMA)
  Parameters:
    src: Source
    len: Period
  Returns: Geometric Mean Moving Average (GMMA)

ealf( src , len , LAPercLen_, FPerc_)
  Ehler's Adaptive Laguerre filter (EALF)
  Parameters:
    src: Source
    len: Period
    LAPercLen_: Median Length
    FPerc_: Median Percentage
  Returns: Ehler's Adaptive Laguerre filter (EALF)

elf( src , len , LAPercLen_, FPerc_)
  ELF - Ehler's Laguerre filter
  Parameters:
    src: Source
    len: Period
    LAPercLen_: Median Length
    FPerc_: Median Percentage
  Returns: Ehler's Laguerre Filter (ELF)

edma( src , len )
  Exponentially Deviating Moving Average (MZ EDMA)
  Parameters:
    src: Source
    len: Period
  Returns: Exponentially Deviating Moving Average (MZ EDMA)

pnr( src , len , rank_inter_Perc_)
  PNR - percentile nearest rank
  Parameters:
    src: Source
    len: Period
    rank_inter_Perc_: Rank and Interpolation Percentage
  Returns: Percentile Nearest Rank ( PNR )

pli( src , len , rank_inter_Perc_)
  PLI - Percentile Linear Interpolation
  Parameters:
    src: Source
    len: Period
    rank_inter_Perc_: Rank and Interpolation Percentage
  Returns: Percentile Linear Interpolation ( PLI )

rema( src , len )
  Range EMA (REMA)
  Parameters:
    src: Source
    len: Period
  Returns: Range EMA (REMA)

sw_ma( src , len )
  Sine-Weighted Moving Average (SW-MA)
  Parameters:
    src: Source
    len: Period
  Returns: Sine-Weighted Moving Average (SW-MA)

vwap( src , len )
  Volume Weighted Average Price ( VWAP )
  Parameters:
    src: Source
    len: Period
  Returns: Volume Weighted Average Price ( VWAP )

mama( src , len )
  MAMA - MESA Adaptive Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: MESA Adaptive Moving Average ( MAMA )

fama( src , len )
  FAMA - Following Adaptive Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Following Adaptive Moving Average (FAMA)

hkama( src , len )
  HKAMA - Hilbert based Kaufman's Adaptive Moving Average
  Parameters:
    src: Source
    len: Period
  Returns: Hilbert based Kaufman's Adaptive Moving Average (HKAMA)

Bibliothèque Pine

Dans le véritable esprit de TradingView, l'auteur a publié ce code Pine en tant que bibliothèque open-source afin que d'autres programmeurs Pine de notre communauté puissent le réutiliser. Bravo à l'auteur ! Vous pouvez utiliser cette bibliothèque à titre privé ou dans d'autres publications open-source, mais la réutilisation de ce code dans une publication est régie par notre Règlement.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser cette bibliothèque?

Copiez le texte dans le presse-papiers et collez-le dans votre script.