This is an indicator index based on cumulative market value of the Magnificent 7 (AAPL, MSFT, NVDA, TSLA, META, AMZN, GOOG). Such an indicator for the famous Mag 7, against which your main security can be benchmarked, was missing from the TradingView user library.

The index bar values are calculated by taking the weighted average of the 7 stocks, relative to their market cap. Explicitly, we are multiplying each bar period's total outstanding stock amount by the OHLC of that period for each stock and dividing that value by the combined sum of outstanding stock for the 7 corporations. OHLC is taken for the extended trading session.

The index dynamically adjusts with respect to the chosen main security and the bars/line visible in the chart window; that is, the first close value is normalized to the main security's first close value. It provides recalculation of the performance in that chart window as you scroll (this isn't apparent in the demo chart above this description).

It can be useful for checking market breadth, or benchmarking price performance of the individual stock components that comprise the Magnificent 7. I prefer comparing the indicator to the Nasdaq Composite Index (IXIC) or S&P500 (SPX), but of course you can make comparisons to any security or commodity.

Settings Input Options:
1) Bar vs. Line - view as OHLC colored bars or line chart. Line chart color based on close above or below the previous period close as green or red line respectively.
2) % vs Regular - the final value for the window period as % return for that window or index value
3) Turn on/off - bottom right tile displaying window-period performance

Inspired by the simpler NQ 7 Index script by @RaenonX but with normalization to main security at start of window and additional settings input options.

Please provide feedback for additional features, e.g., if a regular/extended session option is useful.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?