Nifty 50 Stock Candle Breadth

Nifty 50 Stock Candle Breadth
This indicator tracks the candle color (green or red) of 40 Nifty 50 component stocks on the current timeframe and uses that breadth data to recolor the chart's bars.
How it works
On each bar, the indicator fetches the open and close price of each of the 40 tracked NSE stocks using request.security. It counts how many stocks closed green (close > open) and how many closed red (close < open). The current chart's bar is then recolored based on two factors: the chart's own candle direction, and whether the green or red stock count meets or exceeds the configured threshold.
If the threshold is met in the same direction as the chart candle, a darker shade is applied. If the threshold is not met, a lighter shade is used. Neutral (doji) candles display in gray.
Bar color logic
Stock table
An optional table displays all 40 tracked stocks in two columns with a color indicator for each. A summary row at the bottom shows the total green and red counts with their percentage of the 40 stocks. The table can be toggled off via the input settings.
Settings
Applicable to NSE charts on any timeframe.
This indicator tracks the candle color (green or red) of 40 Nifty 50 component stocks on the current timeframe and uses that breadth data to recolor the chart's bars.
How it works
On each bar, the indicator fetches the open and close price of each of the 40 tracked NSE stocks using request.security. It counts how many stocks closed green (close > open) and how many closed red (close < open). The current chart's bar is then recolored based on two factors: the chart's own candle direction, and whether the green or red stock count meets or exceeds the configured threshold.
If the threshold is met in the same direction as the chart candle, a darker shade is applied. If the threshold is not met, a lighter shade is used. Neutral (doji) candles display in gray.
Bar color logic
- Dark green — chart candle is green and green stock count is at or above threshold
- Light green — chart candle is green but green stock count is below threshold
- Dark red — chart candle is red and red stock count is at or above threshold
- Light red — chart candle is red but red stock count is below threshold
- Gray — chart candle is neutral (open equals close)
Stock table
An optional table displays all 40 tracked stocks in two columns with a color indicator for each. A summary row at the bottom shows the total green and red counts with their percentage of the 40 stocks. The table can be toggled off via the input settings.
Settings
- Table Position — corner of the chart where the table appears
- Stock Count Threshold — number of stocks required in one direction to trigger the darker bar color (default: 30)
- Show Stock Table — toggle the stock detail table on or off
Applicable to NSE charts on any timeframe.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。