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.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.