PROTECTED SOURCE SCRIPT
Slope Based Divergences Multi-Block (Dual Price)

This Pine Script® indicator, titled "Slope Based Divergences Multi-Block (Dual Price)," is engineered to identify high-conviction trading signals by detecting divergences across multiple look-back lengths simultaneously. It uses a unique method of calculating momentum through average slopes rather than traditional price points, applying this logic to two different price sources and an oscillator for a comprehensive market view.
Core Concept: Average Slope Analysis
Instead of just looking at price or oscillator values, the indicator's foundation is built on measuring the rate-of-change, or slope, of the market. It goes a step further by calculating an average slope over a specified range of lengths. This provides a much more stable and robust measure of momentum compared to a single-length calculation, effectively smoothing out noise and focusing on the true underlying trend.
The Multi-Block System
The indicator's main strength comes from its "multi-block" design, which concurrently analyzes the market from three distinct perspectives:
Block 1 (Short-Term): Focuses on recent price action.
Block 2 (Mid-Term): Looks at the intermediate trend.
Block 3 (Long-Term): Analyzes the broader, underlying market structure.
For each of these blocks, the indicator calculates the average slope for two separate price sources (e.g., high and low) and one oscillator source (e.g., RSI, Stochastics).
Normalization and Thresholds
To make the slope values from different look back lengths comparable, the indicator converts each calculated average slope into a percentile rank. This rank, from 0 to 100, shows how extreme the current slope is compared to its historical values. Each of the three blocks has its own customizable high and low thresholds, allowing you to define precisely what constitutes a significant upward or downward momentum for that specific timeframe.
High-Confluence Divergence Signals
A divergence is flagged when there's a clear disagreement between the direction of price and the direction of the oscillator. For example, a bullish divergence occurs when the price sources are showing significant downward momentum (low percentile rank slopes) while the oscillator is showing significant upward momentum (high percentile rank slope).
The final signal is intentionally very selective. A "BULL" or "BEAR" signal is only generated when a rare moment of consensus occurs: all three blocks must detect a divergence simultaneously, and an additional short-term price movement must confirm this potential shift in momentum. This strict, multi-layered confirmation process is designed to filter out weak signals and highlight only the most promising opportunities.
The indicator plots clear labels on the chart and can trigger alerts, making it easy to spot these high-conviction setups when they occur
Core Concept: Average Slope Analysis
Instead of just looking at price or oscillator values, the indicator's foundation is built on measuring the rate-of-change, or slope, of the market. It goes a step further by calculating an average slope over a specified range of lengths. This provides a much more stable and robust measure of momentum compared to a single-length calculation, effectively smoothing out noise and focusing on the true underlying trend.
The Multi-Block System
The indicator's main strength comes from its "multi-block" design, which concurrently analyzes the market from three distinct perspectives:
Block 1 (Short-Term): Focuses on recent price action.
Block 2 (Mid-Term): Looks at the intermediate trend.
Block 3 (Long-Term): Analyzes the broader, underlying market structure.
For each of these blocks, the indicator calculates the average slope for two separate price sources (e.g., high and low) and one oscillator source (e.g., RSI, Stochastics).
Normalization and Thresholds
To make the slope values from different look back lengths comparable, the indicator converts each calculated average slope into a percentile rank. This rank, from 0 to 100, shows how extreme the current slope is compared to its historical values. Each of the three blocks has its own customizable high and low thresholds, allowing you to define precisely what constitutes a significant upward or downward momentum for that specific timeframe.
High-Confluence Divergence Signals
A divergence is flagged when there's a clear disagreement between the direction of price and the direction of the oscillator. For example, a bullish divergence occurs when the price sources are showing significant downward momentum (low percentile rank slopes) while the oscillator is showing significant upward momentum (high percentile rank slope).
The final signal is intentionally very selective. A "BULL" or "BEAR" signal is only generated when a rare moment of consensus occurs: all three blocks must detect a divergence simultaneously, and an additional short-term price movement must confirm this potential shift in momentum. This strict, multi-layered confirmation process is designed to filter out weak signals and highlight only the most promising opportunities.
The indicator plots clear labels on the chart and can trigger alerts, making it easy to spot these high-conviction setups when they occur
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。