OPEN-SOURCE SCRIPT
Mis à jour

All for One Moving Average

2 514
This is a collection of all the moving averages available. Some are built-in, a couple were tricky to source out.
Higher timeframes can be specified so you aren't limited to your chart setting.
Repainting has been disabled by default.
There is also an option to use Heikin Ashi candles as the input source rather than standard bars.

Hope that someone finds this useful.
If you'd like anything added please DM me and I'll include it!
Feel free to copy this into your own strategies/indicators.

~Dark
Notes de version
Code Cleanup
Notes de version
Added Offset and Sigma inputs even though they are only used in the Arnaud Legoux moving average (ALMA)
Notes de version
Code Cleanup
Notes de version

  • Updated to v6: Latest Pine Script for faster loads and tidy menus.
  • Fixed SWMA: Now plots a glitch-free 4-bar average, no length tweaks needed.
  • Better EKMA: Adapts to trends smoother from the start on new charts.
  • Easier data: Cleaner multi-timeframe and Heikin Ashi pulls for steady plots.
  • Quicker calcs: Fewer repeated steps for speed on big lengths.
  • Clearer code: Added notes and spacing for quick scans.
Notes de version
  • Added tooltip to Repainting and MA Type
  • Moved ALMA settings: Now tucked under MA group for a single, uncluttered panel.
  • Smarter EKMA math: Switched to faster built-in sum for volatility calc
Notes de version
  • Fixed LTF Runtime Error: Guarded request.security_lower_tf with strict checks—only calls it when chart TF > requested TF
  • Streamlined LTF Plotting: For lower TFs, averages the MA across sub-bars for a smooth, non-stair-step line
  • Tuned Adaptive Formulas: Refined EKMA/VIDYA/FRAMA math
  • Added VIDYA, T3 and FRAMA
Notes de version
  • Dual MA Support: Introduced optional MA2 with type/length/color; shared MTF logic for consistency; dynamic crossovers detect "fast/slow" via length+TF speed score, flipping signals if needed.
  • Crossover Highlights: Toggleable BG colors (green/red semi-trans) + arrows (up/down, sized via dropdown); auto bull/bear based on fast/slow
  • Input Refinements: Separate sources for MA1/MA2
  • Code Polish: Unified get_secured_ma helper with per-MA source; separate plotshape for sizes

Clause de non-responsabilité

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