OPEN-SOURCE SCRIPT

Market Breadth Ratio Analyzer

Introduction
The Market Breadth Ratio Analyzer is designed to provide traders with a clear and visual representation of market breadth for the NYSE (New York Stock Exchange) and NASDAQ. By calculating the ratio of Up-Volume to Down-Volume as a percentage, it highlights whether the market is in a strong uptrend, downtrend, or a neutral state.

Purpose of the Indicator
Identify Trending Days: Quickly determine if the market is showing a strong uptrend or downtrend.
Filter Out Choppy Markets: Avoid indecisive, sideways market conditions.
Understand Market Breadth: Measure the balance between buying and selling volume to assess overall market strength.
Displayed Information
Table (at the top of the chart):

Market: The index being analyzed (NYSE and NASDAQ).
Ratio (%): The percentage of Up-Volume relative to the total traded volume.
Status:
Strong Uptrend: Ratio > 60%.
Strong Downtrend: Ratio < 40%.
Neutral: Ratio between 40% and 60%.
Plotted Lines:

Breadth Ratios for NYSE and NASDAQ are plotted as lines for easy trend tracking.
Blue: Indicates an uptrend (Ratio > 50%).
Red: Indicates a downtrend (Ratio < 50%).
Zero Line:

A grey zero-line acts as a visual reference for market breadth.
How It Works
Breadth Ratio Calculation:

The ratio is calculated as the percentage of Up-Volume relative to the total volume:
Ratio
=
Up-Volume
Up-Volume
+
Down-Volume
×
100
Ratio=
Up-Volume+Down-Volume
Up-Volume

×100
Status Determination:

Strong Uptrend: Ratio > 60%.
Strong Downtrend: Ratio < 40%.
Neutral: Ratio between 40% and 60%.
Visual Representation:

A dynamic table displays the calculated ratios and statuses in real-time.
Plotted lines for NYSE and NASDAQ allow for trend monitoring over time.
Use Cases
Identifying Trend Days:
If the NYSE Ratio is 65% and NASDAQ Ratio is 70%, this indicates a clear uptrend, making it ideal for long trades.

Recognizing Choppy Days:
If both Ratios fluctuate between 40% and 60%, it suggests indecision and a likely sideways market.

Detecting Divergences:
If NYSE shows a strong uptrend but NASDAQ remains neutral, it could indicate divergence between the indices.

Indicator Settings
Scale Factor: Normalizes volume data (default: 1,000,000).
Color Highlights:
Blue: Strong Uptrend.
Red: Strong Downtrend.
Zero Line: A grey line as a reference for trend direction.
Advantages
Quick and Clear Visualization of market breadth for NYSE and NASDAQ.
Simple Trend Identification with color-coded statuses.
Effective Trade Filtering by identifying trending versus choppy conditions.
Detect Market Divergences to gain deeper insights.
Summary
The Market Breadth Ratio Analyzer is an essential tool for traders looking to measure and analyze the strength of market trends using volume ratios. By combining precision with an intuitive visual display, it allows traders to quickly identify market conditions and make informed decisions.

breadthBreadth IndicatorsbubblesnasdaqnyseratioVOLDVOLDQ

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?


Ngoài ra, trên:

Thông báo miễn trừ trách nhiệm