ICT Cycle Boxes - MTFICT Cycle Boxes – Pro Strategy (3×MTF)
A multi-timeframe, confluence-driven strategy designed to capture impulsive moves, controlled pullbacks, and regime shifts. It evaluates three timeframes at once:
TF-A (Higher): establishes the broader regime.
TF-B (Mid): confirms trend context and momentum.
TF-C (Trade TF): times the entry.
Two entry tiers are used:
Very-Good Entries: all conditions align in the direction of the higher-timeframe regime, with fresh confirmation on the trade timeframe.
Medium Entries: directionally aligned but with lighter confirmation, for additional opportunities during established trends.
Risk is managed with ATR-based stops/targets on the trade timeframe, an optional trailing stop, position sizing by percent of equity, a cooldown after flat, and optional early exit when the trade timeframe returns to a neutral regime. Session filtering and flip-on-opposite are available for refined execution.
How to use
Set TF-A/TF-B/TF-C to suit your market (e.g., W/D/60, D/240/30).
Adjust risk parameters (stop/target, trailing, position size).
Enable session filtering if desired.
Review results in the Strategy Tester and fine-tune to your market and instrument.
Recherche dans les scripts pour "entry"
地狱5分钟One-Sentence Summary
A 5-minute overlay indicator that fires confirmed buy / sell arrows when
( custom momentum-exhaustion counter OR adaptive cRSI extreme OR StochRSI extreme )
passes a user-defined sensitivity filter and a minimum-bar-distance gate, then auto-audits each signal in real time.
The Three Engines (TD-Free Wording)
A. Adaptive cRSI
Dominant-cycle RSI with auto-generated dynamic upper/lower bands.
Period, vibration and “levelling” are all adjustable.
B. StochRSI
Classic stochastic of RSI with independent length & smoothing controls.
C. Momentum-Exhaustion Counter
Counts consecutive bars where close is consistently higher (or lower) than the close 4 bars ago.
When the count reaches a user-set threshold (default 9) an “exhaustion” flag is raised.
Signal Workflow
Each engine contributes 0 or 1 point to a bull or bear score.
A raw signal candidate appears when total score ≥ 3 × sensitivity.
After the bar closes and the minimum-signal-distance test is passed, the candidate becomes confirmed.
Entry price, bar index, China-time timestamp, score and exhaustion status are logged.
Real-Time Back-Test
Every confirmed signal is stored in a SignalData array.
After backtest_minutes (user-defined) the script checks if price has moved in the signal’s favour and marks the trade win/loss.
Win-rate, streaks, exhaustion-edge and flat-money P&L (fixed bet & payout) are updated instantly.
Results are aggregated by China calendar day (UTC+8) in a DailyStats array.
Visual Output
Shapes
– Green ▲ = normal long Lime ▲ = exhaustion long
– Red ▼ = normal short Orange ▼ = exhaustion short
Price labels show exact entry.
“B” / “S” characters mark exhaustion bars.
Two live tables display overall stats, exhaustion edge, longest streaks, strategy profit and today’s China-time P&L.
Alert Library (TD-Free)
Alerts fire on:
every confirmed signal (exhaustion vs normal)
exhaustion win-rate ≥ 70 %
overall win-rate ≥ 65 %
win/loss streak milestones
daily profit/loss thresholds
Input Groups
cRSI, StochRSI, exhaustion-counter parameters
Signal sensitivity & minimum distance
OB/OS thresholds for both RSIs
Back-test duration, bet size, payout ratio
Toggle for on-chart tables
Candle by Candle (CbC)Shows trend based on color of the candle.
If there are two consecutive candles of the same color, it gives an entry signal. It will trail the exit to the low of consecutive candles. You can choose whether you want to trail to the low of all of the next candles or only the candles in the direction of your entry. Once exit is breached you get an exit. You can choose whether you want the exit on candle close or immediately when the price hits.
ICT Trading by JaeheeSUMMARY
• This script consolidates widely used ICT concepts into a single, coherent toolkit that emphasizes structural clarity over chart clutter.
• It renders Market Structure (BOS/CHoCH), significant Order Blocks (OB), Fair Value Gaps (FVG) with size filtering, BSL/SSL liquidity lines with optional sweep pruning, and Killzone session start markers.
• For analysis/education only. It does not provide investment advice or imply performance/returns.
WHAT MAKES IT DIFFERENT
• Integrated coverage of core ICT elements in one script (Structure, OB, FVG, BSL/SSL, Killzone).
• Quality gating so only “meaningful” zones/gaps remain (ATR/percent/tick thresholds, leg displacement, optional volume filter).
• Liquidity line maintenance: BSL/SSL can be automatically pruned after a defined sweep so attention stays on current liquidity.
• Visual minimalism: compact labels inside boxes; no background shading by default, keeping the chart readable.
• One-click contrast: a “Force Black” toggle switches all labels/lines to black for maximum legibility.
• Component-level ON/OFF controls (FVG / OB / BSL-SSL / Killzone) to tailor visibility to your workflow.
• OB de-duplication policy prevents overlapping clutter (keep-older-and-extend-right / keep-older / replace-with-new).
COMPONENTS & LOGIC (CONCISE)
• Market Structure (BOS/CHoCH)
◦ External swings via fractal pivots.
◦ BOS confirmation = close beyond the recent swing by k·ATR + a minimum real-body (first bar).
◦ Regime-aware labeling distinguishes BOS vs CHoCH.
• Order Blocks (strict ICT with significance)
◦ Demand OB: last down candle before a qualifying upside break; Supply OB: last up candle before a qualifying downside break.
◦ Filters enforce candle body, zone thickness, leg displacement (ATR-based), optional volume.
◦ Mitigation handling: Keep / Delete / Shrink (partial fills shrink the zone until invalidation).
• Fair Value Gaps (FVG)
◦ Standard 3-candle definition.
◦ Valid only when gap height ≥ max(percent threshold, ATR-based threshold, tick threshold) → trivial gaps intentionally removed.
◦ Minimal “FVG” text is centered inside the box.
• BSL / SSL & Sweep Management
◦ Equal highs/lows detected using dual tolerances (ticks + ATR) and a bar-spacing cap.
◦ Optional auto-removal after a sweep (Wick / Close / AnyTouch) so only actionable liquidity remains.
• Killzone Session Starts
◦ Compact vertical tick + label at the first bar of Asia / Europe / New York (no background fill).
INPUTS (MINIMIZED BY DESIGN)
• Visibility toggles: Show FVG / Show Order Blocks / Show BSL-SSL / Show Killzone session starts.
• Contrast toggle: Make all texts & lines BLACK (ON/OFF).
• Most numeric thresholds are internally fixed to discourage over-optimization and preserve consistent behavior.
HOW TO USE — PRACTICAL WORKFLOW
• Frame selection
◦ HTF (bias frame): choose 1H/4H/1D to read structure and map major OB/FVG.
◦ LTF (execution frame): 1–15 minute range; prefer trades aligned with the HTF bias.
• Long scenario (checklist)
◦ Bias: HTF shows a recent upside BOS or down→up CHoCH; price approaches a credible demand OB/FVG.
◦ Liquidity: recent SSL sweep (downside liquidity taken). Swept SSLs may auto-remove if that option is enabled.
◦ Triggers (one or more):
·· Fading back into a demand OB with support (close holds above the OB top).
·· Reclaim of a bullish FVG (close back above lower/mid line).
·· LTF structural shift (mini CHoCH → BOS).
◦ Invalidation/Risk: stop below OB bottom or sweep low, with an ATR buffer.
◦ Management: scale out near local LTF highs or nearest BSL; secondary targets at opposing FVG/supply OB; trail under LTF swing lows or FVG lower boundary.
• Short scenario (checklist)
◦ Bias: HTF shows a downside BOS or up→down CHoCH.
◦ Liquidity: recent BSL sweep (upside liquidity taken).
◦ Triggers (one or more):
·· Rejection from a supply OB after re-entry.
·· Failure/reject at a bearish FVG (upper/mid line).
·· LTF structural shift (mini CHoCH → downside BOS).
◦ Invalidation/Risk: stop above OB top or sweep high, with an ATR buffer.
◦ Management: scale out near local LTF lows or nearest SSL; secondary targets at opposing FVG/demand OB; trail above LTF swing highs or FVG upper boundary.
BSL/SSL TIPS
• Generation uses recent fractal highs/lows with tick/ATR tolerance and a spacing cap to avoid spurious “equal” prints.
• If auto-removal is enabled, swept lines vanish, keeping the view focused on what matters now.
• Confluence after a sweep (e.g., reversal close + OB/FVG nearby) can increase conviction.
ORDER BLOCK TIPS
• Significance filters (body/thickness/leg displacement/optional volume) suppress weak OBs by design.
• De-duplication keeps one meaningful zone when two boxes fully overlap (or extends the older zone to the right, depending on policy).
• Mitigation modes:
◦ Keep — retain the zone for reference even after touch.
◦ Delete — remove on mitigation to keep only fresh levels.
◦ Shrink — reduce boundary toward the fill to reflect partial consumption.
FVG TIPS
• Three-way minimum size (percent / ATR / ticks) must be met; this intentionally removes micro-gaps (e.g., ~0.12%).
• Bullish FVG: reclaim of the lower/mid line with a close may serve as a long trigger in a bullish context.
• Bearish FVG: rejection at the upper/mid line may serve as a short trigger in a bearish context.
• On mitigation (close through), boxes are removed to keep the chart clean.
KILLZONE (SESSION START MARKERS)
• Asia / Europe / New York: a short vertical tick and label at the session’s first bar—no background shading.
• Focus on signals forming soon after the session opens; overlap (e.g., Europe→New York) can increase volatility.
RISK & REAL-TIME CONSIDERATIONS
• Fractal swings confirm after L/R bars, so structure labeling is delayed by definition (and then fixed).
• BOS/CHoCH is validated only on the confirming close (k·ATR beyond the swing with a minimum real-body).
• OB/FVG/BSL-SSL state can change quickly on mitigation/sweep; account for slippage and define re-entry rules ahead of time.
• Always apply independent risk management (position sizing, stops). This is a study/analysis tool only.
READABILITY TIPS
• Use the Force-Black toggle when you want maximum contrast against candles.
• Keep only what you need (e.g., FVG+OB) to avoid visual overload.
• Always re-anchor LTF decisions to HTF zones and structure.
LIMITATIONS & NOTES
• No forward-looking guarantees; filters reduce noise but cannot eliminate false signals.
• Visualizations and thresholds are for study/analysis; not financial advice.
• Invite-Only distribution; access is managed via TradingView’s invitation system. No external links or promotions are included.
GC Checklist Signals (All TF, v6 • SR-safe • Clean blocks)GC (COMEX Gold) checklist strategy with a 3:1 reward-to-risk to your training bot. It enforces the following rules:
Heiken Ashi chart logic for color, wicks, and doji detection
100-EMA filter (only buys above / sells below)
Market structure: higher-low above EMA for buys; lower-high below EMA for sells (simple pivot check)
Clean pullback: at least 2 opposite-color candles; clean = no top wicks (buys) / no bottom wicks (sells)
Entry: on high-volume doji (body ≤ ~12% of range and volume ≥ last 1–3 candles), as soon as it closes
Stops: sell = above doji high; buy = below doji low
GC Checklist Signals (All Timeframes, v6)GC (COMEX Gold) checklist strategy with a 3:1 reward-to-risk to your training bot. It enforces your rules:
Heiken Ashi chart logic for color, wicks, and doji detection
100-EMA filter (only buys above / sells below)
Market structure: higher-low above EMA for buys; lower-high below EMA for sells (simple pivot check)
Clean pullback: at least 2 opposite-color candles; clean = no top wicks (buys) / no bottom wicks (sells)
Entry: on high-volume doji (body ≤ ~12% of range and volume ≥ last 1–3 candles), as soon as it closes
Stops: sell = above doji high; buy = below doji low
SPPO - Statistical Price Position OscillatorSPPO - Statistical Price Position Oscillator
=== INDICATOR OVERVIEW ===
The Statistical Price Position Oscillator (SPPO) is an innovative technical analysis tool built on rigorous statistical principles. Unlike traditional oscillators that rely on fixed periods or subjective thresholds, SPPO uses dynamic statistical modeling to assess where current prices stand within their historical distribution.
=== KEY FEATURES ===
• Statistical Foundation: Based on normal distribution theory and Z-Score standardization
• Dynamic Parameter Adjustment: Automatically adapts to market volatility conditions
• Probability Quantification: Provides objective probability assessments for price levels
• Multi-Layer Visual System: Six layers of information encoding (line position, color intensity, line width, background, histogram, data panel)
• Professional Color Schemes: Multiple themes optimized for different trading environments
• Real-time Risk Assessment: Quantifies the statistical significance of current price positions
=== CORE COMPONENTS ===
1. SPPO Main Line
- Represents the standardized price position (Z-Score × Sensitivity)
- Dynamic line width: Normal (2px) for |Z| ≤ 1.0, Bold (6px) for extreme deviations
- Color coding: Neutral (gray) for normal range, Orange/Yellow for moderate deviation, Blue/Purple for extreme deviation
2. SPPO Histogram (Momentum Bars)
- Measures the momentum of statistical deviation, not price momentum
- Calculated as: (Current Z-Score - EMA of Z-Score) × Sensitivity
- Helps identify momentum divergences and trend continuation/reversal signals
3. Intelligent Data Panel
- Real-time display of key statistical metrics
- Shows: Price Position, Z-Score, Probability, Momentum, Deviation Classification, Market Regime
- Dynamic parameter display for transparency
4. Adaptive Background System
- Visual representation of market regimes
- Color intensity based on statistical significance
- Helps quickly identify extreme market conditions
=== PARAMETER SETTINGS ===
Core Parameters:
• Distribution Period (30-120, default 50): Statistical calculation window based on Central Limit Theorem
• Range Evaluation Period (10-100, default 14): Price range assessment window
• Position Sensitivity (0.5-4.0, default 2.5): Indicator responsiveness factor
• Probability Threshold (0.01-0.2, default 0.03): Signal trigger threshold
Confidence Intervals:
• 1σ Confidence (60%-75%, default 68%): Normal range boundary
• 2σ Confidence (90%-98%, default 95%): Significant deviation boundary
• 3σ Confidence (99.5%-99.9%, default 99.7%): Extreme deviation boundary
Dynamic Adjustment:
• Enable Dynamic Adjustment: Automatically optimizes parameters based on market volatility
• Volatility Lookback (10-50, default 10): Period for volatility assessment
• Dynamic Sensitivity Multiplier (0.5-3.0, default 1.5): Volatility-based sensitivity adjustment
=== MATHEMATICAL FOUNDATION ===
SPPO is built on several key mathematical concepts:
1. Z-Score Standardization: Z = (X - μ) / σ
Where X = current price, μ = mean, σ = standard deviation
2. Normal Distribution Theory: Assumes prices follow normal distribution within rolling windows
3. Probability Density Function: PDF(z) = e^(-z²/2) / √(2π)
4. Cumulative Distribution Function: Approximates tail probabilities for extreme events
5. Dynamic Parameter Optimization: Adjusts calculation parameters based on market volatility percentiles
=== TRADING APPLICATIONS ===
1. Mean Reversion Strategy
- Entry: SPPO > +8 or < -8 with probability < 5%
- Confirmation: Momentum histogram showing divergence
- Exit: SPPO returns to ±3 range
2. Trend Confirmation
- Trend continuation: SPPO and histogram aligned
- Trend exhaustion: Extreme SPPO with weakening histogram
- Breakout validation: SPPO breaking confidence intervals with volume
3. Risk Management
- Position sizing based on probability inverse
- Stop-loss when SPPO extends beyond ±12
- Take-profit at statistical mean reversion levels
=== MARKET REGIME CLASSIFICATION ===
• Normal Range (|SPPO| < 3): Trend-following strategies preferred
• Moderate Deviation (3 < |SPPO| < 8): Cautious mean reversion with partial positions
• Extreme Deviation (|SPPO| > 8): Aggressive mean reversion with strict risk management
=== TIMEFRAME RECOMMENDATIONS ===
• Short-term Trading (30-50 period): Intraday scalping, high sensitivity
• Medium-term Analysis (50-80 period): Swing trading, balanced sensitivity
• Long-term Trends (80-120 period): Position trading, statistical stability focus
=== UNIQUE ADVANTAGES ===
1. Objective Signal Generation: Every signal backed by statistical probability
2. Self-Adaptive System: Automatically adjusts to changing market conditions
3. Multi-Dimensional Information: Six layers of visual information in single indicator
4. Universal Application: Works across all markets and timeframes
5. Risk Quantification: Provides probability-based risk assessment
6. Professional Visualization: Institutional-grade color schemes and data presentation
=== TECHNICAL SPECIFICATIONS ===
• Pine Script Version: v6 compatible
• Maximum Bars Back: 500 (optimized for performance)
• Calculation Efficiency: Incremental updates with caching
• Memory Management: Dynamic array sizing with intelligent cleanup
• Rendering Optimization: Conditional rendering to reduce resource consumption
=== ALERT CONDITIONS ===
• Extreme Probability Alert: Triggered when probability < extreme threshold
• Buy Signal Alert: Statistical mean reversion buy conditions met
• Sell Signal Alert: Statistical mean reversion sell conditions met
• High Volatility Alert: Market enters high volatility regime (>90th percentile)
=== COMPATIBILITY ===
• Asset Classes: Stocks, Forex, Commodities, Cryptocurrencies, Indices
• Timeframes: All standard timeframes (1m to 1M)
• Market Sessions: 24/7 markets and traditional market hours
• Data Requirements: Minimum 120 bars for optimal statistical accuracy
=== PERFORMANCE OPTIMIZATION ===
• Efficient Algorithms: Uses Pine Script built-in functions for optimal speed
• Memory Management: Limited historical data caching to prevent overflow
• Rendering Optimization: Layered rendering system reduces redraw overhead
• Precision Balance: Optimized balance between calculation accuracy and performance
=== RISK DISCLAIMER ===
SPPO is a statistical analysis tool designed to assist in market analysis. While based on rigorous mathematical principles, it should not be used as the sole basis for trading decisions. Always combine SPPO analysis with:
• Fundamental analysis
• Risk management practices
• Market context awareness
• Position sizing discipline
Past performance does not guarantee future results. Trading involves substantial risk of loss.
=== SUPPORT AND DOCUMENTATION ===
For detailed technical documentation, implementation examples, and advanced strategies, please refer to the comprehensive SPPO Technical Documentation included with this indicator.
=== VERSION INFORMATION ===
Current Version: 2.0
Last Updated: 2024
Compatibility: Pine Script v6
Author:
=== CONCLUSION ===
SPPO represents a significant advancement in technical analysis, bringing institutional-grade statistical modeling to retail traders. Its combination of mathematical rigor, adaptive intelligence, and professional visualization makes it an invaluable tool for traders seeking objective, probability-based market analysis.
The indicator's unique approach to quantifying price position within statistical distributions provides traders with unprecedented insight into market extremes and mean reversion opportunities, while its self-adaptive nature ensures consistent performance across varying market conditions.
SPPO - Statistical Price Position OscillatorSPPO - Statistical Price Position Oscillator
=== INDICATOR OVERVIEW ===
The Statistical Price Position Oscillator (SPPO) is an innovative technical analysis tool built on rigorous statistical principles. Unlike traditional oscillators that rely on fixed periods or subjective thresholds, SPPO uses dynamic statistical modeling to assess where current prices stand within their historical distribution.
=== KEY FEATURES ===
• Statistical Foundation: Based on normal distribution theory and Z-Score standardization
• Dynamic Parameter Adjustment: Automatically adapts to market volatility conditions
• Probability Quantification: Provides objective probability assessments for price levels
• Multi-Layer Visual System: Six layers of information encoding (line position, color intensity, line width, background, histogram, data panel)
• Professional Color Schemes: Multiple themes optimized for different trading environments
• Real-time Risk Assessment: Quantifies the statistical significance of current price positions
=== CORE COMPONENTS ===
1. SPPO Main Line
- Represents the standardized price position (Z-Score × Sensitivity)
- Dynamic line width: Normal (2px) for |Z| ≤ 1.0, Bold (6px) for extreme deviations
- Color coding: Neutral (gray) for normal range, Orange/Yellow for moderate deviation, Blue/Purple for extreme deviation
2. SPPO Histogram (Momentum Bars)
- Measures the momentum of statistical deviation, not price momentum
- Calculated as: (Current Z-Score - EMA of Z-Score) × Sensitivity
- Helps identify momentum divergences and trend continuation/reversal signals
3. Intelligent Data Panel
- Real-time display of key statistical metrics
- Shows: Price Position, Z-Score, Probability, Momentum, Deviation Classification, Market Regime
- Dynamic parameter display for transparency
4. Adaptive Background System
- Visual representation of market regimes
- Color intensity based on statistical significance
- Helps quickly identify extreme market conditions
=== PARAMETER SETTINGS ===
Core Parameters:
• Distribution Period (30-120, default 50): Statistical calculation window based on Central Limit Theorem
• Range Evaluation Period (10-100, default 14): Price range assessment window
• Position Sensitivity (0.5-4.0, default 2.5): Indicator responsiveness factor
• Probability Threshold (0.01-0.2, default 0.03): Signal trigger threshold
Confidence Intervals:
• 1σ Confidence (60%-75%, default 68%): Normal range boundary
• 2σ Confidence (90%-98%, default 95%): Significant deviation boundary
• 3σ Confidence (99.5%-99.9%, default 99.7%): Extreme deviation boundary
Dynamic Adjustment:
• Enable Dynamic Adjustment: Automatically optimizes parameters based on market volatility
• Volatility Lookback (10-50, default 10): Period for volatility assessment
• Dynamic Sensitivity Multiplier (0.5-3.0, default 1.5): Volatility-based sensitivity adjustment
=== MATHEMATICAL FOUNDATION ===
SPPO is built on several key mathematical concepts:
1. Z-Score Standardization: Z = (X - μ) / σ
Where X = current price, μ = mean, σ = standard deviation
2. Normal Distribution Theory: Assumes prices follow normal distribution within rolling windows
3. Probability Density Function: PDF(z) = e^(-z²/2) / √(2π)
4. Cumulative Distribution Function: Approximates tail probabilities for extreme events
5. Dynamic Parameter Optimization: Adjusts calculation parameters based on market volatility percentiles
=== TRADING APPLICATIONS ===
1. Mean Reversion Strategy
- Entry: SPPO > +8 or < -8 with probability < 5%
- Confirmation: Momentum histogram showing divergence
- Exit: SPPO returns to ±3 range
2. Trend Confirmation
- Trend continuation: SPPO and histogram aligned
- Trend exhaustion: Extreme SPPO with weakening histogram
- Breakout validation: SPPO breaking confidence intervals with volume
3. Risk Management
- Position sizing based on probability inverse
- Stop-loss when SPPO extends beyond ±12
- Take-profit at statistical mean reversion levels
=== MARKET REGIME CLASSIFICATION ===
• Normal Range (|SPPO| < 3): Trend-following strategies preferred
• Moderate Deviation (3 < |SPPO| < 8): Cautious mean reversion with partial positions
• Extreme Deviation (|SPPO| > 8): Aggressive mean reversion with strict risk management
=== TIMEFRAME RECOMMENDATIONS ===
• Short-term Trading (30-50 period): Intraday scalping, high sensitivity
• Medium-term Analysis (50-80 period): Swing trading, balanced sensitivity
• Long-term Trends (80-120 period): Position trading, statistical stability focus
=== UNIQUE ADVANTAGES ===
1. Objective Signal Generation: Every signal backed by statistical probability
2. Self-Adaptive System: Automatically adjusts to changing market conditions
3. Multi-Dimensional Information: Six layers of visual information in single indicator
4. Universal Application: Works across all markets and timeframes
5. Risk Quantification: Provides probability-based risk assessment
6. Professional Visualization: Institutional-grade color schemes and data presentation
=== TECHNICAL SPECIFICATIONS ===
• Pine Script Version: v6 compatible
• Maximum Bars Back: 500 (optimized for performance)
• Calculation Efficiency: Incremental updates with caching
• Memory Management: Dynamic array sizing with intelligent cleanup
• Rendering Optimization: Conditional rendering to reduce resource consumption
=== ALERT CONDITIONS ===
• Extreme Probability Alert: Triggered when probability < extreme threshold
• Buy Signal Alert: Statistical mean reversion buy conditions met
• Sell Signal Alert: Statistical mean reversion sell conditions met
• High Volatility Alert: Market enters high volatility regime (>90th percentile)
=== COMPATIBILITY ===
• Asset Classes: Stocks, Forex, Commodities, Cryptocurrencies, Indices
• Timeframes: All standard timeframes (1m to 1M)
• Market Sessions: 24/7 markets and traditional market hours
• Data Requirements: Minimum 120 bars for optimal statistical accuracy
=== PERFORMANCE OPTIMIZATION ===
• Efficient Algorithms: Uses Pine Script built-in functions for optimal speed
• Memory Management: Limited historical data caching to prevent overflow
• Rendering Optimization: Layered rendering system reduces redraw overhead
• Precision Balance: Optimized balance between calculation accuracy and performance
=== RISK DISCLAIMER ===
SPPO is a statistical analysis tool designed to assist in market analysis. While based on rigorous mathematical principles, it should not be used as the sole basis for trading decisions. Always combine SPPO analysis with:
• Fundamental analysis
• Risk management practices
• Market context awareness
• Position sizing discipline
Past performance does not guarantee future results. Trading involves substantial risk of loss.
=== SUPPORT AND DOCUMENTATION ===
For detailed technical documentation, implementation examples, and advanced strategies, please refer to the comprehensive SPPO Technical Documentation included with this indicator.
=== VERSION INFORMATION ===
Current Version: 2.0
Last Updated: 2024
Compatibility: Pine Script v6
Author:
=== CONCLUSION ===
SPPO represents a significant advancement in technical analysis, bringing institutional-grade statistical modeling to retail traders. Its combination of mathematical rigor, adaptive intelligence, and professional visualization makes it an invaluable tool for traders seeking objective, probability-based market analysis.
The indicator's unique approach to quantifying price position within statistical distributions provides traders with unprecedented insight into market extremes and mean reversion opportunities, while its self-adaptive nature ensures consistent performance across varying market conditions.
Custom Buy/Sell Pattern BuilderAre you tired of using trading indicators that only let you follow fixed, pre-designed rules? Do you wish you could build your own “Buy” or “Sell” signals, experiment with your own ideas, or see instantly if your unique pattern works—without learning coding or hiring a developer?
The Custom Buy/Sell Pattern Builder is designed for YOU.
This TradingView indicator lets ANY trader—even a complete beginner—define exactly what kind of price and volume conditions should create a BUY or SELL label on any chart, in any market, at any timeframe.
You don’t need to know programming. You don’t need to know the definition of a hammer, doji, volume spike, or Engulfing pattern.
With a few clicks and easy dropdown choices, you can:
Make your own rules for buying or selling
Choose how many candles your pattern should look at
Decide if you want the biggest body, the lowest volume, the biggest movement, or any combination you can imagine
The result?
You’ll see clear “BUY” or “SELL” labels automatically show up on your chart whenever the exact rule YOU built matches current price action.
No more guessing. No more forced strategies. Just pure control and visual feedback!
Why Is This Powerful?
Traditional indicators (like MACD, RSI, or even classic candlestick scanners) work the same for everyone—and only as their inventors defined.
But every trader, and every market, is unique.
What if you could say:
“Show me a ‘SELL’ every time the newest candle is bigger than the one before, but with LESS volume, while the bar before that had an even smaller body—but more volume than all others?”
With this tool, it’s EASY!
You simply pick which candle you want to compare (most recent, previous, etc), what to compare (body or volume—body means the candle’s “thickness”, from open to close), choose “greater than”, “less than”, or “equal to”, and set a multiplier if you want (like “half as much”, “twice as big”, etc).
After this, if any bar on the chart fits all your rules, it will mark it as a BUY or SELL, depending on your selection.
This means—
Beginners can start experimenting with their intuition or small ideas, without tech hurdles
Experienced traders can visualize and fine-tune any possible logic, before they commit to backtesting or automating a real strategy
Every “what if” or “I wonder” setup is just 2–3 clicks away
How Does It Work? Simple Steps
1. Choose Your Signal Type
“Buy” or “Sell”
This tells the indicator whether to mark the qualifying bars with a green “BUY” or red “SELL” label
2. Pick How Many Candles To Use
“Pattern Candle Count” input (2, 3, or 4)
Example: If you use 4, the pattern will be applied to the most recent 4 candles at every step
3. Define Your Pattern With Inputs
For each candle (from newest “0” to oldest “3”), you can set:
Body Condition (example: “is this candle’s body bigger/smaller/equal to another?”)
Pick which candle to compare against
Pick “>”, “<”, “>=”, “<=”, or “=”
Set a multiplier if needed (like “0.5” to mean “half as big as” or “2” for “twice as big as”)
Volume Condition (exact same choices, but based on trading volume—not the candle’s price body)
For example:
“Candle0 Body > Candle2 Body”
means “the latest candle’s real-body (open–close) is bigger than the one two bars ago.”
“Candle1 Volume <= Candle2 Volume”
means “the previous candle’s volume is less than or equal to the volume of the bar two periods ago.”
You can leave a comparison blank if you don’t want to use it for a particular candle.
What Happens After You Set Your Rules?
Every bar on your chart is checked for your logic:
If ALL body AND volume conditions are true (for each candle you specified),
AND
The signal side (“Buy” or “Sell”) matches your dropdown,
Then a green “BUY” or red “SELL” label will show right on the bar, so you can visually spot exactly where your logic works!
Practical Example:
Suppose you want an entry setup that is:
“Sell whenever the newest candle’s body is bigger than two bars ago, body before that is bigger than three bars ago, AND the newest candle’s volume is less than or equal to two bars ago, AND the candle three bars ago’s volume is less than or equal to half the candle two bars ago’s volume.”
You’d set:
Pattern Candle Count: 4
Side: Sell
Candle0 Body Ref#: 2, Op: >, Mult: 1
Candle1 Body Ref#: 3, Op: >, Mult: 1
Candle0 Vol Ref#: 2, Op: <=, Mult: 1
Candle3 Vol Ref#: 2, Op: <=, Mult: 0.5
And the script will find all “SELL” bars on your chart matching these conditions.
Inputs Section: What Does Each Setting Do?
Let’s break down each input in the indicator’s Settings one by one, so even if you’re new, you’ll understand exactly how to use it!
1. Pattern Candle Count (2–4)
What is it?
This sets how many candles in a row you want your rule to look at.
Example:
“4” means your rules are based on the most recent candle and the 3 before it.
“2” means you are only comparing the current and previous candles.
Tip:
Beginners often use 4 to spot stronger patterns, but you can experiment!
2. Signal Side
What is it?
Choose “Buy” or “Sell”. The word you pick here decides which colored label (green for Buy, red for Sell) appears if your pattern matches.
Example:
Want to spot where “Sell” is likely? Pick “Sell”.
Change to “Buy” if you want bullish signals instead.
3. Body & Volume Comparison Settings (per Candle)
For each candle (#0 is newest/current, #3 is oldest in your pattern window):
Body Comparison
Candle# Body Ref#
Choose which other candle you want to compare this one’s body to.
“0” = newest, “1” = previous, “2” = two bars ago, “3” = three bars ago
Candle# Body Op (Operator; >, <, >=, <=, =)
How do you want to compare?
“>” means “greater than” (is bigger than)
“<” means “less than” (is smaller than)
“=” means “equal to”
Candle# Body Mult (Multiplier)
If you want relative comparisons. For example, with Mult=1:
“Candle0 body > Candle2 body x 1” means just “0 is larger than 2.”
“Candle0 body > Candle2 body x 2” means “0 is more than double 2.”
Volume Comparison
Candle# Vol Ref# / Op / Mult
Exact same logic as body, but works on the “Volume” of each candle (how much was traded during that bar).
How to Set Up a Rule (Step by Step Example)
Say you want to mark a Sell every time:
The most recent candle’s real body is BIGGER than the candle 2 bars ago;
The previous candle’s body is also BIGGER than the candle 3 bars ago;
The current candle’s volume is LESS than or equal to the volume of candle 2;
The previous candle’s volume is LESS than or equal to candle 2’s volume;
The candle 3 bars ago’s volume is LESS than or equal to HALF candle 2’s volume.
You’d set:
Pattern Candle Count: 4
Side: "Sell"
Candle0 Body Ref#: 2, Op: “>”, Mult: 1
Candle1 Body Ref#: 3, Op: “>”, Mult: 1
Candle0 Vol Ref#: 2, Op: “<=”, Mult: 1
Candle1 Vol Ref#: 2, Op: “<=”, Mult: 1
Candle3 Vol Ref#: 2, Op: “<=”, Mult: 0.5
All other comparisons (operators) can be left blank if you don’t want to use them!
When these rules are met, a bright red “SELL” label will appear right above the bar matching all your conditions.
Practical Tips & FAQ for Beginners
What does “body” mean?
It’s the “true range” of the candle: the difference between open and close. This ignores wicks for simple setups.
What does “volume” mean?
This is the total trading activity during that candle/bar. Many traders believe that patterns with different volume “meaning” (such as low-volume up bars, or high-volume down bars) signal a meaningful change.
What if nothing shows on chart?
It just means your current rules are rarely or never matched! Try making your comparisons simpler (maybe just 2-body and 2-volume conditions to start).
You can always hit “Reset Settings” to go back to default.
Can I use this for both buying and selling?
YES! You can detect both bullish (Buy) and bearish (Sell) custom conditions; just switch “Signal Side.”
Do I need to know coding?
Not at all! Everything is in simple input panels.
Creative Use Cases, Example Recipes & Troubleshooting
Creative Ways to Use
Spotting Reversals
Example:
Buy when: the newest candle body is LARGER than the previous 3 bars, but ALL volumes are lower than their neighbors.
Why? Sometimes, a big candle with surprisingly low volume after a sequence of small bars can signal a reversal.
Finding Exhaustion Moves
Example:
Sell when: the current bar body is twice as big as two bars ago, but volume is half.
Why? A very big candle with very little volume compared to similar bars may show the move is “running out of steam.”
Custom “Breakout + Confirmation” Patterns
Example:
Buy when:
Candle 0’s body is greater than Candle 2’s by at least 1.5x,
Candle 0’s volume is greater than Candle 1 and Candle 2,
Candle 1’s volume is less than Candle 0.
Why? This could catch strong breakouts but filter out noisy moves.
Multi-bar Bias/Squeeze Filter
Use “Pattern Candle Count: 4”
Set all 4 volume conditions to “<” and each reference to the previous candle.
Now, a BUY or SELL only marks when each bar is “dryer”/less active than the last — a classic squeeze or low-volatility buildup.
Troubleshooting Guide
“I don’t see any Buy/Sell label; is something broken?”
Most likely, your rules are too strict or rare! Try using only two comparisons and leave other “Op” inputs blank as a test.
Double-check you have enough candles on the chart: you need at least as many bars as your pattern count.
“Why does a label appear but not where I expect?”
Remember, the script checks your rules for every NEW candle. The candle “0” is always the most recent, then “1” is one bar back, etc.
Check the color and type chosen: “Signal Side” must be “Buy” for green, “Sell” for red.
“What if I want a more complex pattern?”
Stack conditions! You can demand the body/volume of each candle in your window meet a different rule or all follow the same rule in sequence.
Mini Glossary — For Newcomers
Candle/Bar: Each bar on the chart, shows price movement during a fixed time (e.g., one minute, one hour, one day).
Body: The colored (or filled) part of the candle — the open-to-close price range.
Volume: How much of the asset was actually traded that candle/bar.
Reference Index: When you pick “2” as a reference, it means “the candle two bars ago in the pattern window.”
Operator (“Op”): The math symbol used to compare (>, <, =, etc).
Signal Side: Whether you want to highlight bullish (“Buy”) or bearish (“Sell”) bars.
Tips for Getting More Value
Start Simple—try just one or two conditions at first. See what lights up. Slowly add more logic as you get comfortable.
Watch the chart live as you change settings. The labels update instantly—this makes strategy design fast and visual!
Try flipping your ideas: If a certain pattern doesn’t work for buys, try reversing the direction for possible “sell” setups.
Remember: There is NO wrong idea. This indicator is only limited by your creativity—it’s a “strategy playground.”
Example Quick-Start Recipes
Classic Sell:
4 candles, side = Sell
Candle0 Body > Candle2; Candle1 Body > Candle3
Candle0 Vol <= Candle2; Candle1 Vol <= Candle2; Candle3 Vol <= Candle2 × 0.5
Simple Buy After Pause:
3 candles, side = Buy
Candle0 Body > Candle1; Candle0 Vol > Candle1
All other Ops blank
Low-Volume Pullback for Entry:
4 candles, side = Buy
Candle0 Body > Candle2
Candle0 Vol < Candle1; Candle1 Vol < Candle2; Candle2 Vol < Candle3
Final Words
Think of this as your “pattern lab.” No code, no guesswork—just experiment, see what the market actually gives, and design your own visual rulebook.
If you’re stuck, reset the script to defaults—it’s always safe to start again!
If you want more ready-made “recipes” for different strategies/styles, just ask and I’ll send some more setups for you.
Happy building—and may your edge always be YOUR edge!
Deadband Hysteresis Supertrend [BackQuant]Deadband Hysteresis Supertrend
A two-stage trend tool that first filters price with a deadband baseline, then runs a Supertrend around that baseline with optional flip hysteresis and ATR-based adverse exits.
What this is
A hybrid of two ideas:
Deadband Hysteresis Baseline that only advances when price pulls far enough from the baseline to matter. This suppresses micro noise and gives you a stable centerline.
Supertrend bands wrapped around that baseline instead of raw price. Flips are further gated by an extra margin so side changes are more deliberate.
The goal is fewer whipsaws in chop and clearer regime identification during trends.
How it works (high level)
Deadband step — compute a per-bar “deadband” size from one of four modes: ATR, Percent of price, Ticks, or Points. If price deviates from the baseline by more than this amount, move the baseline forward by a fraction of the excess. If not, hold the line.
Centered Supertrend — build upper and lower bands around the baseline using ATR and a user factor. Track the usual trailing logic that tightens a band while price moves in its favor.
Flip hysteresis — require price to exceed the active band by an extra flip offset × ATR before switching sides. This adds stickiness at the boundary.
Adverse exit — once a side is taken, trigger an exit if price moves against the entry by K × ATR .
If you would like to check out the filter by itself:
What it plots
DBHF baseline (optional) as a smooth centerline.
DBHF Supertrend as the active trailing band.
Candle coloring by trend side for quick read.
Signal markers 𝕃 and 𝕊 at flips plus ✖ on adverse exits.
Inputs that matter
Price Source — series being filtered. Close is typical. HL2 or HLC3 can be steadier.
Deadband mode — ATR, Percent, Ticks, or Points. This defines the “it’s big enough to matter” zone.
ATR Length / Mult (DBHF) — only used when mode = ATR. Larger values widen the do-nothing zone.
Percent / Ticks / Points — alternatives to ATR; pick what fits your market’s convention.
Enter Mult — scales the deadband you must clear before the baseline moves. Increase to filter more noise.
Response — fraction of the excess applied to baseline movement. Higher responds faster; lower is smoother.
Supertrend ATR Period & Factor — traditional band size controls; higher factor widens and flips less often.
Flip Offset ATR — extra ATR buffer required to flip. Useful in choppy regimes.
Adverse Stop K·ATR — per-trade danger brake that forces an exit if price moves K×ATR against entry.
UI — toggle baseline, supertrend, signals, and bar painting; choose long and short colors.
How to read it
Green regime — candles painted long and the Supertrend running below price. Pullbacks toward the baseline that fail to breach the opposite band often resume higher.
Red regime — candles painted short and the Supertrend running above price. Rallies that cannot reclaim the band may roll over.
Frequent side swaps — reduce sensitivity by increasing Enter Mult, using ATR mode, raising the Supertrend factor, or adding Flip Offset ATR.
Use cases
Bias filter — allow entries only in the direction of the current side. Use your preferred triggers inside that bias.
Trailing logic — treat the active band as a dynamic stop. If the side flips or an adverse K·ATR exit prints, reduce or close exposure.
Regime map — on higher timeframes, the combination baseline + band produces a clean up vs down template for allocation decisions.
Tuning guidance
Fast markets — ATR deadband, modest Enter Mult (0.8–1.2), response 0.2–0.35, Supertrend factor 1.7–2.2, small Flip Offset (0.2–0.5 ATR).
Choppy ranges — widen deadband or raise Enter Mult, lower response, and add more Flip Offset so flips require stronger evidence.
Slow trends — longer ATR periods and higher Supertrend factor to keep you on side longer; use a conservative adverse K.
Included alerts
DBHF ST Long — side flips to long.
DBHF ST Short — side flips to short.
Adverse Exit Long / Short — K·ATR stop triggers against the current side.
Strengths
Deadbanded baseline reduces micro whipsaws before Supertrend logic even begins.
Flip hysteresis adds a second layer of confirmation at the boundary.
Optional adverse ATR stop provides a uniform risk cut across assets and regimes.
Clear visuals and minimal parameters to adjust for symbol behavior.
Putting it together
Think of this tool as two decisions layered into one view. The deadband baseline answers “does this move even count,” then the Supertrend wrapped around that baseline answers “if it counts, which side should I be on and where do I flip.” When both parts agree you tend to stay on the correct side of a trend for longer, and when they disagree you get an early warning that conditions are changing.
When the baseline bends and price cannot reclaim the opposite band , momentum is usually continuing. Pullbacks into the baseline that stall before the far band often resolve in trend.
When the baseline flattens and the bands compress , expect indecision. Use the Flip Offset ATR to avoid reacting to the first feint. Wait for a clean band breach with follow through.
When an adverse K·ATR exit prints while the side has not flipped , treat it as a risk event rather than a full regime change. Many users cut size, re-enter only if the side reasserts, and let the next flip confirm a new trend.
Final thoughts
Deadband Hysteresis Supertrend is best read as a regime lens. The baseline defines your tolerance for noise, the bands define your trailing structure, and the flip offset plus adverse ATR stop define how forgiving or strict you want to be at the boundary. On strong trends it helps you hold through shallow shakeouts. In choppy conditions it encourages patience until price does something meaningful. Start with settings that reflect the cadence of your market, observe how often flips occur, then nudge the deadband and flip offset until the tool spends most of its time describing the move you care about rather than the noise in between.
HTF Power of Three+ Limitless by Supreme
HTF Power of Three+ Limitless by Supreme
This indicator provides a high fidelity lens into the market's fundamental fractal rhythm.
For the professional trader who understands every candle is a story of accumulation manipulation and distribution this tool transcends the limitations of linear time analysis.
It offers an institutional grade panoramic dashboard of the Power of Three archetype operating seamlessly across any timeframe without constraint.
The core limitation of standard chart analysis is the boundary between timeframes.
This tool dissolves these walls presenting a fluid four dimensional view of market dynamics directly on your chart.
It transforms your perception by offering a continuous unbroken context of the higher timeframe narrative that governs all lower timeframe price action.
This is not merely another visualization tool.
It is a complete solution to the problem of temporal dissonance that plagues most traders.
The standard chart presents a flat fragmented reality.
You are forced to switch between timeframes losing your place and breaking your cognitive flow.
This constant friction degrades the quality of analysis and leads to missed opportunities or flawed execution.
The market is a fractal an infinitely repeating pattern across all scales of time.
Lower timeframe price movements are not random events.
They are the direct consequence of the objectives being pursued on higher timeframes.
To trade without this higher timeframe context is to navigate a storm without a compass guided only by the immediate chaotic waves.
This indicator provides that compass.
The Power of Three is the narrative structure embedded within every candle.
This concept posits that smart money engineers price through a deliberate three phase process.
First is the accumulation phase.
This is a period of relative equilibrium typically around the opening price where large institutions quietly build their positions.
It is the balance before the imbalance the coiling of a spring.
Second is the manipulation phase.
This is the critical judas swing or stop hunt designed to engineer liquidity.
Price is intentionally driven against the true intended direction to trip stop loss orders from breakout traders and induce uninformed participants to take the wrong side of the market.
Their selling becomes the liquidity for institutions to buy at better prices and vice versa.
Third is the distribution phase.
This is the true expansion move where price travels rapidly in the direction of institutional intent.
This is the clean efficient price leg that most trend following systems attempt to capture often after the most advantageous entry point has passed.
Understanding this three part structure is the key to aligning your trades with smart money flow.
This tool makes that entire process visible.
The current live higher timeframe candle is projected onto your chart as it forms.
This is not a static snapshot but a living representation of the ongoing campaign.
Every tick on your lower timeframe chart now has context.
You can see precisely if price is in the initial accumulation phase giving you time to prepare.
You can identify the manipulation phase as it happens allowing you to avoid being trapped or to position yourself for the reversal.
You can confirm the beginning of the distribution phase providing the confidence to engage with the true market move.
The indicator also displays the three previously completed higher timeframe candles.
This is not just historical data.
It is the immediate narrative context.
These three candles reveal the established order flow and the key price levels that matter.
The highs and lows of these candles are not arbitrary points.
They are institutional reference points magnets for liquidity and critical levels for targeting or invalidation.
A manipulation move will often seek the high or low of the previous candle before reversing.
The expansion move will often target the liquidity resting beyond a high or low from two candles prior.
This four candle panoramic view allows for sophisticated narrative construction.
You can build a high probability thesis for the trading session based on the interrelationship of these candles.
For example after a series of strong bullish higher timeframe closes a brief manipulative dip below the prior candle's open becomes a very high probability long entry.
Conversely a failure to expand above the previous candle's high after a strong run may signal exhaustion and an impending reversal.
The tool's architecture is built on a state of the art non redrawing framework.
All visual elements are created once and only their parameters are updated.
This eliminates redraw lag entirely ensuring a fluid instantaneous and seamless experience.
Your analytical environment will remain sharp responsive and completely unburdened even during extreme market volatility.
The engine is unbound by time.
Its logic is perfectly fractal.
A scalper on a one minute chart using a fifteen minute context gains the same clarity and follows the same principles as a swing trader on a daily chart using a weekly context.
The pattern is universal.
This tool makes its application universally accessible.
This is for the trader who is no longer satisfied with looking at the market through a keyhole.
It is for the analyst who demands a complete limitless and flawlessly performing view of the price delivery process.
-
By installing this indicator you move from a fragmented view of price to a holistic four dimensional understanding of the market.
You achieve temporal coherence seeing the cause on the higher timeframe and the effect on the lower timeframe as a single unified process.
You begin to operate without the constraints of conventional charting.
Engulfing Pro v1Engulfing Pro v1 — Pro Inside (C2-in-wick) signals
Engulfing Pro v1 finds a precise three-bar sequence designed to catch clean continuations or turns after an impulsive move. The signal—called Pro Inside—fires when price closes back inside the wick of a prior engulfing bar, often indicating a controlled pullback into freshly swept liquidity.
What it detects
Engulfing pre-condition (Bars -2 → -1):
A strict bullish or bearish body engulfing occurs one bar before the signal (larger body, full body containment).
Pro Inside signal (Bar 0 / C2):
The current bar (C2) closes inside the wick of the engulfing bar (C1):
Bullish: C2 closes inside C1’s upper wick
Bearish: C2 closes inside C1’s lower wick
Optional C3 confirmation (info only):
The next bar closes beyond C2’s extreme (above for bullish, below for bearish).
Why it matters
The “close-inside-wick” structure frequently marks a measured pullback after momentum just flipped (engulfing), offering a clear, rules-based entry with defined invalidation.
Inputs
Show Pro Inside (Bullish) — toggle bullish signals
Show Pro Inside (Bearish) — toggle bearish signals
Change bar color on signal (C2) — color C2 (lime/red)
Plot markers — C2 triangles and ✔ on C3 confirmations
Boundary padding (ticks) — nudge wick bounds to reduce marginal touches
Visuals & Alerts
Markers:
“C2” triangle up/down on qualifying bars
“✔” circle on C3 confirmations
Alert names:
Pro Inside (Bullish)
Pro Inside (Bearish)
Pro Inside — Bullish C3 confirmation
Pro Inside — Bearish C3 confirmation
How to use (ideas, not advice)
Entry: Aggressive at/after C2 close; conservative on C3 confirmation.
Stops: Common placements beyond the opposite side of C2, or beyond C1’s wick.
Confluence: Pair with market structure, higher-timeframe bias, or Supply & Demand zones for selectivity.
Timeframes/markets: Works on any symbol/TF; adapt padding for volatility.
Notes
Evaluates on bar close (no look-ahead).
Visual/alert tool for study and workflow—not financial advice.
Always forward-test and risk-manage appropriately.
P/B Ratio (Per Share) vs Median + Bollinger Band- 📝 This indicator highlights potential buying opportunities by analyzing the Price-to-Book (P/B) ratio in relation to Bollinger Bands and its historical median.
- 🎯 The goal is to provide a visually intuitive signal for value-oriented entries, especially when valuation compression aligns with historical context.
- 💡 Vertical green shading is applied when the P/B ratio drops below the lower Bollinger Band, which is calculated directly from the P/B ratio itself — not price. This condition often signals the ticker may be oversold.
- 🟢 Lighter green appears when the ratio is below the lower band but above the median, suggesting a possible shorter-term entry with slightly more risk.
- 🟢 Darker green appears when the ratio is both below the lower band and below the median, pointing to a potentially stronger, longer-term value entry.
- ⚠️ This logic was tested using 1 and 2-day time frames. It may not be as helpful in longer time frames, as the financial data TradingView pulls in begins in Q4 2017.
- ⚠️ Note: This script relies on financial data availability through TradingView. It may not function properly with certain tickers — especially ETFs, IPOs, or thinly tracked assets — where P/S ratio data is missing or incomplete.
- ⚠️ This indicator will not guarantee successful results. Use in conjunction with other indicators and do your due diligence.
- 🤖 This script was iteratively refined with the help of AI to ensure clean logic, minimalist design, and actionable signal clarity.
- 📢 Idea is based on the script "Historical PE ratio vs median" by haribotagada
- 💬 Questions, feedback, or suggestions? Drop a comment — I’d love to hear how you’re using it or what you'd like to see changed.
P/E Ratio vs Median + Bollinger Band- 📝 This indicator highlights potential buying opportunities by analyzing the Price-to-Earnings (P/E) ratio in relation to Bollinger Bands and its historical median.
- 🎯 The goal is to provide a visually intuitive signal for value-oriented entries, especially when valuation compression aligns with historical context.
- 💡 Vertical green shading is applied when the P/E ratio drops below the lower Bollinger Band, which is calculated directly from the P/E ratio itself — not price. This condition often signals the ticker may be oversold.
- 🟢 Lighter green appears when the ratio is below the lower band but above the median, suggesting a possible shorter-term entry with slightly more risk.
- 🟢 Darker green appears when the ratio is both below the lower band and below the median, pointing to a potentially stronger, longer-term value entry.
- ⚠️ This logic was tested using 1 and 2-day time frames. It may not be as helpful in longer time frames, as the financial data TradingView pulls in begins in Q4 2017.
- ⚠️ Note: This script relies on financial data availability through TradingView. It may not function properly with certain tickers — especially ETFs, IPOs, or thinly tracked assets — where P/S ratio data is missing or incomplete.
- ⚠️ This indicator will not guarantee successful results. Use in conjunction with other indicators and do your due diligence.
- 🤖 This script was iteratively refined with the help of AI to ensure clean logic, minimalist design, and actionable signal clarity.
- 📢 Idea is based on the script "Historical PE ratio vs median" by haribotagada
- 💬 Questions, feedback, or suggestions? Drop a comment — I’d love to hear how you’re using it or what you'd like to see changed.
P/S Ratio vs Median + Bollinger Band- 📝 This indicator highlights potential buying opportunities by analyzing the Price-to-Sales (P/S) ratio in relation to Bollinger Bands and its historical median.
- 🎯 The goal is to provide a visually intuitive signal for value-oriented entries, especially when valuation compression aligns with historical context.
- 💡 Vertical green shading is applied when the P/S ratio drops below the lower Bollinger Band, which is calculated directly from the P/S ratio itself — not price. This condition often signals the ticker may be oversold.
- 🟢 Lighter green appears when the ratio is below the lower band but above the median, suggesting a possible shorter-term entry with slightly more risk.
- 🟢 Darker green appears when the ratio is both below the lower band and below the median, pointing to a potentially stronger, longer-term value entry.
- ⚠️ This logic was tested using 1 and 2-day time frames. It may not be as helpful in longer time frames, as the financial data TradingView pulls in begins in Q4 2017.
- ⚠️ Note: This script relies on financial data availability through TradingView. It may not function properly with certain tickers — especially ETFs, IPOs, or thinly tracked assets — where P/S ratio data is missing or incomplete.
- ⚠️ This indicator will not guarantee successful results. Use in conjunction with other indicators and do your due diligence.
- 🤖 This script was iteratively refined with the help of AI to ensure clean logic, minimalist design, and actionable signal clarity.
- 📢 Idea is based on the script "Historical PE ratio vs median" by @haribotagada
- 💬 Questions, feedback, or suggestions? Drop a comment — I’d love to hear how you’re using it or what you'd like to see changed.
Liquidity Pulse Revealer (LPR) — by Qabas_algoLiquidity Pulse Revealer (LPR) — by Qabas_algo
The Liquidity Pulse Revealer (LPR) is a technical framework designed to uncover hidden phases of institutional activity by combining volatility (ATR Z-Score) and liquidity (Volume Z-Score) into a dual-condition detection model. Instead of relying on price action alone, LPR measures how volatility and traded volume behave relative to their historical distributions, revealing when the market is either “compressed” or “expanding with force.”
⸻
🔹 Core Mechanics
1. ATR Z-Score (Volatility Normalization)
• LPR calculates the Average True Range (ATR) on a higher timeframe (HTF).
• It applies a Z-Score transformation across a configurable lookback period to determine if volatility is statistically compressed (below mean) or expanded (above mean).
2. Volume Z-Score (Liquidity Normalization)
• Simultaneously, traded volume is normalized using the same Z-Score method.
• Elevated Volume Z-Scores signal the presence of institutional activity (accumulation/distribution or aggressive breakout participation).
3. Dual Conditions → Regimes
• 🧊 Iceberg Volume = Low ATR Z-Score + High Volume Z-Score.
→ Indicates a “hidden liquidity build-up” phase where price compresses but big players are positioning.
• ⚡ Revealed Momentum = High ATR Z-Score + High Volume Z-Score.
→ Marks explosive volatility phases where institutional activity is fully expressed in directional moves.
⸻
🔹 Visualization
• Iceberg Zones (blue shaded boxes):
Drawn automatically around periods of statistical compression + elevated volume. These zones act as launchpads; once broken, they often precede strong directional expansions.
• Revealed Zones (green shaded boxes):
Highlight expansionary phases with both volatility and volume spiking. They often align with trend acceleration or terminal exhaustion zones.
• Midline Tracking:
Each zone maintains a dynamic average (mid-price), updated as the session evolves, providing reference for breakout confirmation and invalidation levels.
⸻
🔹 Practical Use Cases
• Accumulation/Distribution Detection:
Spot where “smart money” is quietly building or unloading positions before large moves.
• Breakout Confirmation:
A breakout occurring after an Iceberg zone carries higher conviction than random volatility.
• Profit Management:
If a Revealed Momentum zone appears after a strong uptrend, it often signals distribution or exhaustion — useful for partial profit taking.
• Multi-Timeframe Adaptability:
With Auto, Multiplier, and Manual higher-timeframe modes, LPR adapts seamlessly to intraday scalping or swing trading contexts.
⸻
🔹 Alerts
• Instant alerts for the start of new Iceberg or Revealed zones.
• Optional alerts for breakouts above/below the last Iceberg zone boundaries.
⸻
🔹 Example Trading Scenario
1. Detection: An 🧊 Iceberg Volume zone forms around support (low volatility + high volume).
2. Trigger: Price closes above the upper boundary of this Iceberg zone.
3. Entry: Go long on the breakout.
4. Stop Loss: Place stop just below the Iceberg zone’s low (where the liquidity build-up started).
5. Target: Hold until a ⚡ Revealed Momentum zone forms — then start scaling out as the expansion matures.
This simple framework transforms hidden institutional behavior into actionable trade setups with clear risk management.
⸻
⚠️ Disclaimer: The LPR is a research and educational tool. It does not provide financial advice. Always apply proper risk management and use in combination with your own trading framework.