PROTECTED SOURCE SCRIPT
REQH/L [TakingProphets]

OVERVIEW
This indicator identifies and maintains liquidity reference levels derived from swing highs and swing lows, then flags Relative Equal Highs (REQH) and Relative Equal Lows (REQL) when two active levels are within a user-defined distance.
It is intended for educational study of liquidity behavior and market structure. It does not predict price, provide signals, or recommend trades.
-----------------------------------------------------------------------------------------------
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
• Provide a consistent, rule-based way to mark possible equal-high/equal-low liquidity pools.
• Help users journal, review, and study how price interacts with those pools.
• Keep charts clear by automatically managing lines/labels and optionally fading traded-through levels.
This is an indicator, not a strategy. No entries, exits, or performance claims are made.
-----------------------------------------------------------------------------------------------
CONCEPTS AND DEFINITIONS
-----------------------------------------------------------------------------------------------
• Swing High / Swing Low: local extrema used to seed candidate liquidity levels.
• Buyside Liquidity (BSL): swing highs (potential buy-side stops).
• Sellside Liquidity (SSL): swing lows (potential sell-side stops).
• Relative Equal Highs (REQH): two unswept highs within a small price distance.
• Relative Equal Lows (REQL): two unswept lows within a small price distance.
• Traded-Through: a level is considered taken once price trades past it (high > level for BSL, low < level for SSL).
-----------------------------------------------------------------------------------------------
HOW IT WORKS (ALGORITHMIC FLOW)
-----------------------------------------------------------------------------------------------
Swing Detection
• Uses built-in pivot functions with a fixed swingStrength = 1.
• On a confirmed pivot high, a BSL level is created; on a pivot low, an SSL level is created.
• Each level stores: price, bar index, line handle, label handle, and status flags.
REQH / REQL Identification
• A constant REQ_THRESHOLD = 2.0 is used to test proximity between active levels of the same side.
• For BSL (highs): when two highs are within threshold, the higher level is kept and flagged REQH; the other is removed.
• For SSL (lows): when two lows are within threshold, the lower level is kept and flagged REQL; the other is removed.
• When a level is flagged, its line is revealed in side color and its label updates to “REQH” or “REQL”.
Traded-Through Handling
• If price trades through an active level (high > BSL price, or low < SSL price), two behaviors are possible:
– If Keep Traded-Through Levels = OFF: the level is deleted.
– If ON: the level is marked traded, its color is faded (opacity ≈ 75), and the line’s extension is frozen at the trade-through bar.
Line/Label Maintenance
• Lines are created initially invisible (fully transparent). Flagging reveals the line in color.
• Labels can be shown/hidden; placement can be Left (at level start, with left offset) or Right (at current bar, with right offset).
• All active lines extend to the right as bars progress.
-----------------------------------------------------------------------------------------------
KEY INPUTS
-----------------------------------------------------------------------------------------------
• Buyside Level Color (default #089981)
• Sellside Level Color (default #E91E63)
• Line Style (Solid / Dashed / Dotted) and Width
• Show Labels (on/off), Label Placement (Left/Right)
• Keep Traded-Through Levels (on/off), Traded Opacity (~75)
• REQ Threshold (fixed in code at 2.0 by default; represents the max distance between two levels to be considered “relative equal”)
Note: In this version, swingStrength is fixed to 1 inside the script. If you want a user control here, I can expose it as an input.
-----------------------------------------------------------------------------------------------
PRACTICAL USAGE
-----------------------------------------------------------------------------------------------
• Identify potential equal-high/equal-low zones using objective proximity logic.
• Observe if those zones attract price or are traded through during your session study.
• Journal how often flagged REQH/REQL zones remain intact versus get swept.
• Combine with your own analysis and risk framework; this script is informational only.
-----------------------------------------------------------------------------------------------
VISUAL BEHAVIOR AND STYLE
-----------------------------------------------------------------------------------------------
• Flagged levels are plotted in side color (buyside/sellside).
• Right-placement keeps labels aligned near the most recent bar for clarity; Left-placement anchors labels near the origin index.
• When keep-traded-levels is enabled, faded color indicates the level has been traded through, while preserving the historical reference.
-----------------------------------------------------------------------------------------------
LIMITATIONS AND TECHNICAL NOTES
-----------------------------------------------------------------------------------------------
• Timeframe and symbol volatility will influence the usefulness of a fixed REQ threshold. For very high-priced or low-priced instruments, consider adjusting the threshold in code to suit your market’s tick/point value.
• Using swingStrength = 1 introduces more sensitivity; users who prefer fewer, stronger pivots may wish to expose this as an input and increase it.
• No look-ahead is used; pivots are confirmed using standard pivot confirmation.
• Arrays and line/label objects are bounded by max_lines_count = 500; extremely long sessions or dense markets may require reducing visual retention.
• The script does not compute performance, signals, or recommendations.
-----------------------------------------------------------------------------------------------
ORIGINALITY AND VALUE
-----------------------------------------------------------------------------------------------
• Implements a simple, explicit REQ proximity engine that only reveals and labels lines after they qualify as REQH/REQL, keeping charts clean.
• Provides deterministic deletion or fading behavior once levels are traded through, preserving historical context when desired.
• Uses a clear line/label management model with consistent right-extension and optional label offsets to avoid overlap.
-----------------------------------------------------------------------------------------------
TERMS AND DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is provided solely for educational and informational purposes.
It does not constitute financial advice, trading signals, or a recommendation to buy or sell any instrument.
Past behavior of price structures does not guarantee future results.
Users are fully responsible for their own decisions and outcomes.
This description is self-contained and does not solicit purchases or external contact.
This indicator identifies and maintains liquidity reference levels derived from swing highs and swing lows, then flags Relative Equal Highs (REQH) and Relative Equal Lows (REQL) when two active levels are within a user-defined distance.
It is intended for educational study of liquidity behavior and market structure. It does not predict price, provide signals, or recommend trades.
-----------------------------------------------------------------------------------------------
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
• Provide a consistent, rule-based way to mark possible equal-high/equal-low liquidity pools.
• Help users journal, review, and study how price interacts with those pools.
• Keep charts clear by automatically managing lines/labels and optionally fading traded-through levels.
This is an indicator, not a strategy. No entries, exits, or performance claims are made.
-----------------------------------------------------------------------------------------------
CONCEPTS AND DEFINITIONS
-----------------------------------------------------------------------------------------------
• Swing High / Swing Low: local extrema used to seed candidate liquidity levels.
• Buyside Liquidity (BSL): swing highs (potential buy-side stops).
• Sellside Liquidity (SSL): swing lows (potential sell-side stops).
• Relative Equal Highs (REQH): two unswept highs within a small price distance.
• Relative Equal Lows (REQL): two unswept lows within a small price distance.
• Traded-Through: a level is considered taken once price trades past it (high > level for BSL, low < level for SSL).
-----------------------------------------------------------------------------------------------
HOW IT WORKS (ALGORITHMIC FLOW)
-----------------------------------------------------------------------------------------------
Swing Detection
• Uses built-in pivot functions with a fixed swingStrength = 1.
• On a confirmed pivot high, a BSL level is created; on a pivot low, an SSL level is created.
• Each level stores: price, bar index, line handle, label handle, and status flags.
REQH / REQL Identification
• A constant REQ_THRESHOLD = 2.0 is used to test proximity between active levels of the same side.
• For BSL (highs): when two highs are within threshold, the higher level is kept and flagged REQH; the other is removed.
• For SSL (lows): when two lows are within threshold, the lower level is kept and flagged REQL; the other is removed.
• When a level is flagged, its line is revealed in side color and its label updates to “REQH” or “REQL”.
Traded-Through Handling
• If price trades through an active level (high > BSL price, or low < SSL price), two behaviors are possible:
– If Keep Traded-Through Levels = OFF: the level is deleted.
– If ON: the level is marked traded, its color is faded (opacity ≈ 75), and the line’s extension is frozen at the trade-through bar.
Line/Label Maintenance
• Lines are created initially invisible (fully transparent). Flagging reveals the line in color.
• Labels can be shown/hidden; placement can be Left (at level start, with left offset) or Right (at current bar, with right offset).
• All active lines extend to the right as bars progress.
-----------------------------------------------------------------------------------------------
KEY INPUTS
-----------------------------------------------------------------------------------------------
• Buyside Level Color (default #089981)
• Sellside Level Color (default #E91E63)
• Line Style (Solid / Dashed / Dotted) and Width
• Show Labels (on/off), Label Placement (Left/Right)
• Keep Traded-Through Levels (on/off), Traded Opacity (~75)
• REQ Threshold (fixed in code at 2.0 by default; represents the max distance between two levels to be considered “relative equal”)
Note: In this version, swingStrength is fixed to 1 inside the script. If you want a user control here, I can expose it as an input.
-----------------------------------------------------------------------------------------------
PRACTICAL USAGE
-----------------------------------------------------------------------------------------------
• Identify potential equal-high/equal-low zones using objective proximity logic.
• Observe if those zones attract price or are traded through during your session study.
• Journal how often flagged REQH/REQL zones remain intact versus get swept.
• Combine with your own analysis and risk framework; this script is informational only.
-----------------------------------------------------------------------------------------------
VISUAL BEHAVIOR AND STYLE
-----------------------------------------------------------------------------------------------
• Flagged levels are plotted in side color (buyside/sellside).
• Right-placement keeps labels aligned near the most recent bar for clarity; Left-placement anchors labels near the origin index.
• When keep-traded-levels is enabled, faded color indicates the level has been traded through, while preserving the historical reference.
-----------------------------------------------------------------------------------------------
LIMITATIONS AND TECHNICAL NOTES
-----------------------------------------------------------------------------------------------
• Timeframe and symbol volatility will influence the usefulness of a fixed REQ threshold. For very high-priced or low-priced instruments, consider adjusting the threshold in code to suit your market’s tick/point value.
• Using swingStrength = 1 introduces more sensitivity; users who prefer fewer, stronger pivots may wish to expose this as an input and increase it.
• No look-ahead is used; pivots are confirmed using standard pivot confirmation.
• Arrays and line/label objects are bounded by max_lines_count = 500; extremely long sessions or dense markets may require reducing visual retention.
• The script does not compute performance, signals, or recommendations.
-----------------------------------------------------------------------------------------------
ORIGINALITY AND VALUE
-----------------------------------------------------------------------------------------------
• Implements a simple, explicit REQ proximity engine that only reveals and labels lines after they qualify as REQH/REQL, keeping charts clean.
• Provides deterministic deletion or fading behavior once levels are traded through, preserving historical context when desired.
• Uses a clear line/label management model with consistent right-extension and optional label offsets to avoid overlap.
-----------------------------------------------------------------------------------------------
TERMS AND DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is provided solely for educational and informational purposes.
It does not constitute financial advice, trading signals, or a recommendation to buy or sell any instrument.
Past behavior of price structures does not guarantee future results.
Users are fully responsible for their own decisions and outcomes.
This description is self-contained and does not solicit purchases or external contact.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.