Presenting the Net new highs script for Tradingview!
This indicator displays the net number of stocks on NSE (India) making 52-week highs or lows. The count is displayed as a fraction of the total number of stocks in the NSE universe.
Net New Highs (NNH) are calculated by taking the number of new 52-week highs on any given day and subtracting from it the number of new 52-week lows. A market is considered strong (bullish) when NNH are positive, or, in other words, when new highs exceed new lows.
You can read more about Net New Highs here:
Net New Highs Chartink dashboard
Features
Background highlight
We consider the bias as positive (bullish) when NNH stays positive for 3 consecutive days, & negative (bearish) when NNH stays negative for 3 consecutive days. Positive bias is highlighted with a green background. Negative bias is highlighted with a red background.
Moving Average
Another way to decrease whipsaws in analysing positive or negative NNH can be by smoothing them with a moving average. The script uses a 10-day SMA (user can modify this) of NNH. The bias is bullish when the smoothed NNH line is positive and bearish when negative.
Table
There is an option to display, in a table, the number of stocks making new 52-week highs and new 52-week lows separately. This helps in understanding which of the two metrics is responsible for the other overall net score.
Dark mode
One-click dark mode, as usual.
Link
Here is the link to the Net new highs script for Tradingview:
Dependency
The script uses the Pine Seeds service to import custom data hosted in a GitHub repository and accesses it via TradingView as the frontend. So, the number of bars appearing on charts is fully dependent on the amount of historical data available. Any error or omission, if there, is a reflection of the hosted data, & not that of Tradingview.
Limitations
Such data has some limitations, like it can only be updated at EOD (End-of-Day), & only daily-based timeframes can be applied to such data. Irrespective of the intraday changes, only the last saved value on the chart is seen. So, it's best to use this script as EOD, rather than intraday.
Credits
This script uses the NSE Market Breadth data from @swing_ka_sultan via a pine seed from my friend @EquityCraze. Hats off to these amazing individuals, without whose efforts, such scripts wouldn't have seen the light of this day!