OPEN-SOURCE SCRIPT
已更新

All for One Moving Average

2 515
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
版本注释
Code Cleanup
版本注释
Added Offset and Sigma inputs even though they are only used in the Arnaud Legoux moving average (ALMA)
版本注释
Code Cleanup
版本注释

  • 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.
版本注释
  • 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
版本注释
  • 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
版本注释
  • 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

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。