OPEN-SOURCE SCRIPT

MAG 7 - Weighted Multi-Symbol Momentum + Extras

Overview
This indicator aggregates the percentage change of multiple symbols into a single “weighted momentum” value. You can set individual weights to emphasize or de-emphasize particular stocks. The script plots two key items:

The default tickers in the script are:

AAPL (Apple)
AMZN (Amazon)
NVDA (NVIDIA)
MSFT (Microsoft)
GOOGL (Alphabet/Google)
TSLA (Tesla)
META (Meta Platforms/Facebook)

Raw Weighted Momentum (Histogram):
Each bar represents the combined (weighted) percentage change across your chosen symbols for that bar.
Bars are colored green if the momentum is above zero, or red if below zero.
Smoothed Momentum (Yellow Line):
An Exponential Moving Average (EMA) of the raw momentum for a smoother trend view.
Helps visualize when short-term momentum is accelerating or decelerating relative to its average.
Features

Symbol Inputs: Up to seven user-defined tickers, with weights for each symbol.
Smoothing Period: Set a custom lookback length to calculate the EMA (or switch to SMA in the code if you prefer).
Table Display: A built-in table in the top-right corner lists each symbol’s real-time percentage change, plus the total weighted momentum.
Alerts:
Configure alerts for when the weighted momentum crosses above or below user-defined thresholds.
Helps you catch major shifts in sentiment across multiple symbols.
How To Use

Select Symbols & Weights: In the indicator’s settings, specify the tickers you want to monitor and their corresponding weights. Weights default to 1 (equal weighting).
Watch the Bars vs. Zero:
Bars above zero mean a positive weighted momentum (the basket is collectively moving up).
Bars below zero mean negative weighted momentum (the basket is collectively under pressure).
Check the Yellow Line: The EMA of momentum.
If the bars consistently stay above the line, short-term momentum is stronger than its recent average.
If the bars dip below the line, momentum is weakening relative to its average.
Review the Table: Quick snapshot of each symbol’s daily percentage change plus the total basket momentum, all color-coded red or green.
Caution & Tips

This indicator measures rate of change, not absolute price levels. A rising momentum can still be part of a larger downtrend.
Always combine momentum readings with other technical and/or fundamental signals for confirmation.
For better reliability, experiment with different smoothing lengths to suit your trading style (shorter for scalping, longer for swing or positional approaches).
mag7multisymbolmultitickerOscillatorsPine utilitiesTechnical AnalysisTrend Analysisweighted

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


Também em:

Aviso legal