OPEN-SOURCE SCRIPT
market sentiment

This code acts as a Market Momentum & Intensity Tracker. It converts raw price and volume data into a clear "Mood Dashboard" to help you identify the strength of a trend.
Simple Breakdown of What the Code Does:
* Data Extraction:
It automatically pulls data (Price and Volume) for the asset you select from the menu, such as NIFTY, BANKNIFTY, CNXFINANCE, or HDFCBANK, regardless of which chart you are currently viewing.
* The "Intensity" Logic:
The code calculates a Speed Ratio. It compares today's Candle Body Size and Trading Volume against their 20-day averages.
* High Ratio (> 2.0): Means the move is twice as strong as usual (Institutional activity).
* Low Ratio (< 1.2): Means the move is weak or standard (Retail activity).
* Classification into 6 Stages:
Based on the color of the candle (Red for Selling, Green for Buying) and the Speed Ratio, it classifies the market into 6 specific "Sentiments":
* Stage 1 (Heavy): Panic selling or aggressive FOMO buying.
* Stage 2 (Normal): A steady, healthy trend.
* Stage 3 (Low): Exhaustion; the move is slowing down or stabilizing.
* Visual Dashboard:
It creates a clean, customizable table on your chart showing the last 7 days of data. This allows you to see at a glance if the market is shifting from "Panic Selling" to "Stable Buying."
The Main Benefit:
It filters out "Market Noise." By looking at the Sentiment column, you can avoid "catching a falling knife" during Heavy Selling or chasing a rally that has already reached Low Buying (Exhaustion) levels.
In short: It tells you not just where the price is going, but with how much force it is moving.
Simple Breakdown of What the Code Does:
* Data Extraction:
It automatically pulls data (Price and Volume) for the asset you select from the menu, such as NIFTY, BANKNIFTY, CNXFINANCE, or HDFCBANK, regardless of which chart you are currently viewing.
* The "Intensity" Logic:
The code calculates a Speed Ratio. It compares today's Candle Body Size and Trading Volume against their 20-day averages.
* High Ratio (> 2.0): Means the move is twice as strong as usual (Institutional activity).
* Low Ratio (< 1.2): Means the move is weak or standard (Retail activity).
* Classification into 6 Stages:
Based on the color of the candle (Red for Selling, Green for Buying) and the Speed Ratio, it classifies the market into 6 specific "Sentiments":
* Stage 1 (Heavy): Panic selling or aggressive FOMO buying.
* Stage 2 (Normal): A steady, healthy trend.
* Stage 3 (Low): Exhaustion; the move is slowing down or stabilizing.
* Visual Dashboard:
It creates a clean, customizable table on your chart showing the last 7 days of data. This allows you to see at a glance if the market is shifting from "Panic Selling" to "Stable Buying."
The Main Benefit:
It filters out "Market Noise." By looking at the Sentiment column, you can avoid "catching a falling knife" during Heavy Selling or chasing a rally that has already reached Low Buying (Exhaustion) levels.
In short: It tells you not just where the price is going, but with how much force it is moving.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.