OPEN-SOURCE SCRIPT
Actualizado

TA Moving Averages

1 721
TA Moving Averages

An all-in-one moving average overlay: eight timeframe-anchored MAs (the 20 / 50 / 100 / 200 day and 20 / 50 / 100 / 200 week) plus five fully customizable slots, all on one indicator.

The point of difference is that every predefined MA is calculated with request.security, so it shows the correct daily or weekly value no matter what timeframe your chart is on. The 200-day reads the true daily 200-period SMA whether you are viewing a 5-minute, hourly, daily, or weekly chart. No switching timeframes to check where the big averages sit.

Daily structure
20-Day (bright pink), short-term reference
50-Day (royal blue), common swing reference
100-Day (deep orange), stronger short-term floor
200-Day (yellow), the most-watched long-term trend line across equities and crypto

Weekly structure
20-Week (green), accumulation zone often defended during pullbacks
50-Week (cyan), primary long-term trend filter; above is structural bull, below is structural bear
100-Week (amber), intermediate structural zone for multi-year cycles
200-Week (purple), long-term structural anchor and the classic bull-market floor for crypto

Custom slots
Five extra slots, each with any length, SMA or EMA type, a Chart / Daily / Weekly anchor, and a color picker. Off by default. Enable a 34 EMA, an 89-day Fibonacci reference, a 300-week anchor, or whatever your method calls for.

Built for every style
Day traders lean on the 20D / 50D for intraday support and resistance. Swing traders use the 50D / 100D with the 20W / 50W for cycle structure. Position traders watch the 100W / 200W as long-term anchors. Multi-timeframe analysts see all eight at once.

Notes
All MAs use lookahead off, so there is no repaint risk. Each line has its own toggle and color picker, and values are kept out of the chart legend to keep the title clean (still visible on the price scale and in the Data Window). Works on any timeframe; the weekly MAs reveal structure best on daily and weekly charts.
Notas de prensa
Updated custom MA defaults:
The five customizable moving average slots now start with more commonly used lengths. Slots 1 to 3 default to 12, 22, and 55, slot 4 to a 9 EMA, and slot 5 to a 200 EMA. They are still off by default, so enable the ones you want. The eight built in levels (the 20, 50, 100, and 200 day and week) are unchanged and stay on SMA, the standard for those reference levels.

SMA and EMA explained in settings:
Each custom slot's Type selector now has an info icon that spells out the difference. SMA averages recent closes equally for a smoother, slower line, while EMA weights recent closes more heavily so it reacts faster and turns sooner.
Notas de prensa
Custom MA timeframe tweak:
The 12 and 22 custom moving averages now default to the chart timeframe, so they track whatever timeframe you are viewing instead of being pinned to the daily. They are fast flip averages for day and swing traders, so reading them off your current chart is more useful. The 55, 9, and 200 custom slots are unchanged.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.