OPEN-SOURCE SCRIPT

Stocks Above 5-Day Average (FOMO)

Overview
Inspired by Matt Carusos's FOMO indicator, this breadth indicator is designed to provide a visual representation of the percentage of stocks within major indices that are trading above their 5-day moving average.

Functionality
The indicator plots the percentage of stocks trading above their 5-day moving average for the following indices:
  • S&P 500
  • Nasdaq
  • Russell 2000
  • Dow Jones
  • All Markets (MMFD)


The indicator includes two horizontal lines:
  • Upper Threshold: Default at 85%
  • Lower Threshold: Default at 15%

These lines are used to identify potential overbought (above upper threshold) or oversold (below lower threshold) conditions.

Plot Shapes:

Small circles are plotted at the points where the percentage of stocks crosses the upper or lower thresholds, with colors matching the respective index.

Table:

The current percentage of stocks above the 5-day average for each index.
A warning sign (⚠️) is shown in the table if the percentage crosses the upper or lower threshold, regardless of whether the index plot is enabled or not.
breadthBreadth IndicatorsCyclessentiment

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian