UPDATED: COMBO - EMA/LRI/SuperTrend/HMA StrategyOverview
The EMA / LRI / SuperTrend / HMA Execution Suite is a streamlined overlay designed for intraday momentum traders, scalpers, and trend followers. It combines dynamic trend baselines, statistical breakout evaluation, and multi-tier moving average filters into a single, highly performant script.
By focusing purely on high-probability trend structure and dynamic fair value, this indicator keeps your chart visually clean and clutter-free for quick execution.
Key Features & Components:
Core Purpose: An advanced multi-indicator technical suite specifically designed for futures and stock trading.
Moving Averages & Momentum: Integrates a customizable Exponential Moving Average (EMA), a versatile Hull Moving Average (HMA) with both single and 3-HMA crossover modes, and a directionally-colored Linear Regression Index (LRI) for momentum tracking.
Breakout Probability Engine: Features a SuperTrend overlay enhanced with a relative volume Gaussian Kernel Density Estimation (KDE) model to calculate breakout strength and display confidence percentage labels.
Visual Adjustments: Includes fully customizable vertical offsets and connecting lines for the probability bubbles to maintain clear chart readability.
Comprehensive Alerts: Built-in alert conditions for trend flips, high-confidence breakouts, and moving average or price crossovers against the LRI.
Indicator

Zone Flow S/R StrategyZone Flow S/R Strategy
📌 Strategy Overview
Zone Flow is a multi‑timeframe support/resistance strategy that uses dynamic pivot‑derived zones to identify high‑probability reversal and breakout setups.
Unlike static support/resistance lines, this 9‑level zone system (R4–R1, P, S1–S4) automatically adapts to market structure changes at each new period (Daily/Weekly/Monthly). Each zone has a configurable width (Percentage, ATR, or Fixed) to account for volatility, and a breakout threshold to filter out minor wicks.
# Unique Synergy
Most pivot strategies treat levels as static lines, leading to false breakouts. Most engulfing strategies ignore the bigger picture, catching falling knives. This strategy solves both problems by combining these components in a specific sequence:
1- Dynamic Zones + Gap State Machine (The Context)
Instead of just drawing lines, we create zones (R1-R4, P, S1-S4) with adaptive width. More importantly, the Gap State Machine tracks which gap price sits in (e.g., between R1 and Pivot). This tells us exactly where we are in the market structure. If price moves from upper Gap to lower Gap, the strategy instantly switches sentiment from Bullish to Bearish.
- Why this matters: It prevents the strategy from trading blindly; it only trades when price is transitioning between structural levels, and price retrace to the zone drastically reducing false signals in the middle of nowhere.
2- Pin Bar Sweep + Engulfing Combo (The Momentum Trigger)
A standard pin bar alone is a weak reversal signal. A standard engulfing pattern alone is common. However, when a Pin Bar sweeps the N-bar high/low (proving a breakout attempt failed) and is immediately followed by an Engulfing pattern on the next candle, this combo represents a "double confirmation" of exhaustion.
Crucially, this specific combo overrides the EMA confirmation.
- Why this matters: Strong momentum sweeps often happen against the short-term EMA trend. By allowing this specific combo to bypass the EMA, the strategy captures powerful reversals that pure trend-following strategies miss.
3- Dynamic Zone Width (The Volatility Adaptation)
Instead of using fixed support/resistance, the zone width changes based on the selected Period's ATR or Percentage.
- Why this matters: This ensures the strategy scales perfectly across any asset (Gold, Crypto, Forex) without manual width adjustments, making it robust across different volatility regimes.
4- Selective Zone Activation (The Manual Override)
Unlike standard pivot systems that force trades on every level, the Zone Selection inputs allow users to disable specific zones (e.g., turn off R3 if price often fakes out there or turn off S4 market is always get exhausted lower probability trade).
- Why this matters: This turns the strategy from a rigid algorithm into a customizable framework where the user can apply their own discretion based on historical price behavior.
5. Hierarchical EMA Architecture (The Structural Governor)
This strategy does not treat all EMAs equally. It uses a two-tier EMA system with a strict hierarchy:
Lower TF EMA (Optional & Overrideable): The Lower TF EMA on the current timeframe acts as a micro-trend filter. However, as explained above, the Pin Bar Sweep + Engulfing Combo can override this filter. Why? Because strong institutional reversals often happen against the short-term trend, and we want to capture them.
Higher TF EMA (Absolute & Non-Negotiable): Higher TF EMA on the selected Higher Timeframe acts as an "Absolute Structural Governor." Unlike the lower EMA, this filter cannot be overridden by any pattern.
For Long entries: Price must be above this HTF EMA.
For Short entries: Price must be below this HTF EMA.
Most strategies either ignore the HTF entirely. By making the HTF EMA absolute and the LTF EMA overrideable, this strategy achieves the perfect balance:
The HTF EMA prevents catastrophic drawdowns by keeping you on the right side of the bigger trend.
The LTF EMA override allows you to catch sharp, high-probability reversals within that trend without being delayed by a slow-moving micro-filter.
6. Optional Risk Architecture (The Management Layer)
The strategy includes a built-in partial-take-profit and breakeven module. By default, this module is disabled to provide a clean, straightforward 1:3 risk-reward backtest without the complexity of multiple exit orders.
This default setting allows users to evaluate the core entry logic (zones + patterns) without interference from partial exits.
However, for traders who want to reduce psychological pressure or manage Gold's notorious retracements, they can enable Allow Breakeven and Allow Partial TP. When activated, the strategy closes a percentage of the position (e.g., 50%) at a lower R:R threshold (TP1) and moves the remaining position to breakeven—locking in early profits while letting the rest of the trade run.
# Zone Calculation
The strategy calculates 9 zones using a modified pivot point formula from the selected period (Daily, Weekly, Monthly, Quarterly, Yearly):
The pivot formula can be one of 5 methods: Classic, Fibonacci, Woodie, Camarilla, or DM.
The Classic Pivot (shown below) is the most widely used and serves as the default:
Pivot (P) = (H + L + C) / 3
R1 = (2 × P) – L
S1 = (2 × P) – H
R2 = P + (H – L)
S2 = P – (H – L)
(R3, R4, S3, S4 are logical extensions of this same principle)
Additional Methods (Briefly Explained):
Fibonacci: Uses the golden ratio multipliers (0.382, 0.618, 1.000, 1.618) to place support/resistance levels between the pivot and the high/low range.
Woodie: Gives extra weight to the closing price (Formula: P = (H + L + 2C) / 4), making it more sensitive to the current session's momentum.
Camarilla: Uses multipliers based on the previous range to place levels very close to the current price, ideal for range-bound trading and scalping.
DM: Adjusts the pivot formula conditionally based on whether the close was higher or lower than the open, making it adaptive to daily sentiment.
From these, the strategy derives:
- 4 Resistance Zones (R4, R3, R2, R1) – above the pivot
- 1 Pivot Zone (P)
- 4 Support Zones (S1, S2, S3, S4) – below the pivot
Each zone is expanded by a Zone Width to create a buffer, making the levels more practical.
# Zone Width Calculation
Three modes:
- Percentage – zone width as a percentage of current price
- ATR Multiplier – width = ATR × Multiplier
- Fixed – fixed price distance
# Gap Index Mapping (0–9):
Gap 0 – Above R4 → Aggressive (no trades)
Gap 1 – Between R4 and R3 → Bearish near R4, Bullish near R3
Gap 2 – Between R3 and R2 → Bearish near R3, Bullish near R2
Gap 3 – Between R2 and R1 → Bearish near R2, Bullish near R1
Gap 4 – Between R1 and Pivot → Bearish near R1, Bullish near Pivot
Gap 5 – Between Pivot and S1 → Bearish near Pivot, Bullish near S1
Gap 6 – Between S1 and S2 → Bearish near S1, Bullish near S2
Gap 7 – Between S2 and S3 → Bearish near S2, Bullish near S3
Gap 8 – Between S3 and S4 → Bearish near S3, Bullish near S4
Gap 9 – Below S4 → Aggressive (no trades)
Based on the gap index and price action, the strategy sets allowLong or allowShort – and displays the status on the info table.
Market Status Displayed:
- Bullish – near support zones; long trades allowed
- Bearish – near resistance zones; short trades allowed
- Waiting – new period started; zones recalculating; no trades
- Aggressive – above R4 or below S4; no trades
- Zone disabled – manually disabled zone; no trades
# Entry Signals
1. Engulfing Patterns
Detects bullish and bearish engulfing with filters:
- Body Only – if true, only bodies must engulf (not full range)
- Min/Max Range – can be Percentage, ATR Multiplier, or Fixed
- Gap Allowance – max price gap between previous close and current open
- Previous or Prior Candle – at least one of the last two candles must be the opposite. color (bearish for bullish engulf; bullish for bearish engulf).
This is not a random condition. The strategy only considers trades when price is near a strong structural zone (support/resistance). Because the zone itself provides the primary context for a potential reversal, the immediate previous candle does not need to be strictly opposite in color.By relaxing the requirement to "at least one of the last two," the strategy captures valid reversals at key levels that a strict, textbook rule would miss—while remaining highly selective because it only trades near strong zones.
2. Pin Bar + Engulfing Combo (EMA Override)
Identifies hammers/shooting stars with:
- Wick/Body Ratio (Wick 3× body)Requires a clearly defined pin bar with a very small body.
- Max Body/Range (Body is at most 20% of range) Ensures the body is genuinely small relative to the total range. This is the textbook definition of a pin bar/hammer. Captures true rejection candles.
- Min Wick/Range (70% of range) This is the classic pin bar definition. A 70%+ wick means price aggressively rejected the level and reversed.
- Sweep Lookback – bullish pinbar must break the lowest low of the previous N bars;
bearish must break the highest high
a pin bar that sweeps a recent extreme (lookback) and the very next candle forms an engulfing pattern in the same direction. This combo overrides the Lower TF EMA confirmation – a unique feature that captures strong momentum after a sweep.
Combined Entry Requirements
All of the following must be true:
1. Valid engulfing or pin+engulf combo
2. Pattern occurs near a zone (open inside zone boundaries or crossing it)
3. Market status aligns with trade direction
4. Daily trade limit not exceeded (default: 2)
5. Relevant zone is enabled
6. Price is on the correct side of EMAs (unless overridden by combo)
7. HTF EMA confirms (if enabled)
8. RSI not overbought/oversold (if enabled)
9. Not within the no‑trade window (if enabled)
-----------------------------------------------------
# Confirmation Filters
Current TF EMA – ensures micro‑trend alignment. Overridden by pin+engulf combo.
Higher TF EMA (default 150 on 1H) – filters out counter‑trend moves in the bigger picture.
RSI – prevents buying above 70 and selling below 30.
Bollinger Bands – blocks trades when volatility is too low (BB width below threshold).This filter is specifically designed for assets that range heavily—choppy, sideways markets.
No‑Trade Window – avoids end‑of‑day volatility (active only for timeframes ≤15min).
# Risk & Position Management
1- Position Sizing:
- Risk per trade – percentage of equity for first trade, separate for second
- Position size = (Account Risk) / (Entry – SL distance).
- Second trade does not increment the daily trade counter:
This is a deliberate design choice. The daily trade counter tracks new trade initiations, not total positions. The second trade (pyramiding) is considered a continuation of the existing position, not a new independent decision. This ensures the strategy can scale into strong trends without consuming the daily limit, while still respecting the maximum number of new entries per session.
2-Stop Loss Options:
- Low-High – entry bar low/high ± buffer Tight, reactive stops. Best for scalping or when you want the SL to follow the immediate price action of the entry candle.
- Swing high/low – N-bar low/high ± buffer Broader, structural stops. Ideal for swing trading or when you want the SL to respect recent market structure rather than a single bar.
- Zone – zone boundary ± buffer Structural stops aligned with pivot levels. Best when you want the SL to be placed exactly at the structural support/resistance level that defines the trade.
- Fixed distance – fixed price distance Simple, static stops. Useful when you know your exact risk tolerance in dollar/pip terms and want a consistent SL distance regardless of volatility.
- ATR Multiplier – entry ± (ATR × multiplier) Volatility-adaptive stops. Best for Gold's changing volatility—widens during news/high volatility, tightens during calm periods.
3- Take Profit:
- Main R:R ratio – main R:R ratio (default 1:3), plus optional partial TP and breakeven at a lower R:R ratio.
- Partial TP – close a percentage of position at a lower R:R (TP1)
- Breakeven – optionally move stop to entry at TP1
4- Trade Counter Reset:
- For TF ≤ 15m: resets at NY (9:30 AM) and London (3:30 AM) starts (configurable)
This aligns with Gold's session-specific volatility and allows fresh participation in each session while preventing over-trading within a single session.
- For TF > 15m: resets once per day at session start (Every new day) Session-specific behavior is less relevant on higher timeframes, and a simple daily cap is more appropriate for swing trading.
5- No‑Trade Window:
- Avoids high‑volatility periods (e.g., end of day)
- Active only for TF ≤ 15m (16:00 PM – 18:30 PM NY time, configurable) End-of-day volatility spikes can cause excessive slippage and erratic price action on short timeframes. on TF > 15 The window is too short to be meaningful; higher timeframe traders are less affected by brief volatility spikes.
6- Session Close:
- TF ≤ 15m: can close at day end and/or week end (configurable). Scalping trades on 1m–15m charts typically last minutes to a few hours. These trades are highly sensitive to Overnight gaps, Weekend gaps
- 15m < TF ≤ 10h: only week end. Swing trading on 30m–4H charts typically lasts hours to several days.
- TF > 10h: feature disabled. Position trading on daily+ charts lasts days to weeks. These trades aim to capture large macro moves.
# Chart Display
- Zone boxes – semi‑transparent red/pink with labels (R4…S4), auto‑cleanup (max 55 periods)
- Trade management lines – entry (white), SL (red), TP (green), TP1/breakeven (dashed),
with green/red fills; auto‑cleanup ((4) * max 125)
- Info table (top‑right) :
1. shows Market Status(Bullish/Bearish/Aggressive/Waiting).
2. EMA confirmations.
3. Zone Width, Breakout threshold.
4. Engulf range max min.
5. SL settings(SL refrence, sL bufer)
- EMA plots – light blue (lower TF) and light red (higher TF)
- Signal shapes – hidden by default (can be enabled via style settings)
- arrowdown shapes - "Reset trade counter"
- Background 1 color – yellow during no‑trade window
- Background 2 color – white close all position on week/day end.
UI Note: Inputs are hidden from the status line to keep your chart clean. All settings (zones, EMAs, risk, patterns) remain fully adjustable in Settings → Inputs.
# Default Settings – Optimized for XAUUSD (Gold)
All default values have been calibrated specifically for Gold's typical volatility and intraday structure.
(Setting : Default : Why This Works for Gold)
----------------------------------------------------------------------------------------
Period : Daily : Gold respects daily highs/lows as key structural levels.
-----------------------------------------------------------------------------------------
Pivot Type : Classic : Most widely used and reliable for Gold.
-----------------------------------------------------------------------------------------
Zone Width : ATR (0.053× ATR(14)) : ATR(14) provides a stable, week-to-week view of Gold's volatility (roughly two trading weeks of data).Adapts to Gold's daily volatility (Zone Width often $4–$10 range).
-----------------------------------------------------------------------------------------
Breakout Threshold : 7% of zone width : Zone width ≈ $3.00–$10.00 (Daily ATR × 0.053). 7% ≈ $0.21–$0.70 (21–70 ticks)—filters noise wicks, captures genuine breaks.Prevents false transitions caused by standard stop-hunting wicks
-----------------------------------------------------------------------------------------
Engulfing Range : ATR(14) (0.375× – 2.5×) : ATR(14) sits in the "sweet spot"—responsive enough to capture shifts in Gold's volatility relatively quickly, yet long enough to smooth out the daily noise and provide a reliable, consistent measure. Captures meaningful moves $3–$15—ensures candle has enough size to be meaningful, rejecting tiny $0.30–$0.50 noise patterns, while filtering out massive blow-off spikes (> $20–$25 on 15m).
-----------------------------------------------------------------------------------------
Pin Bar Sweep : 12 bars : 12 bars – Calibrated for Gold's 3-hour intraday cycle and session transitions. Long enough to capture genuine liquidity grabs, short enough to avoid outdated levels.
-----------------------------------------------------------------------------------------
Risk per trade : 2% (1st), 1% (2nd) : Balances risk with Gold's occasional false breakouts. For Gold's volatile nature, 2%-1% provides the best balance between survival and growth.
-----------------------------------------------------------------------------------------
Risk:Reward : 1:3 : Gold routinely moves 1.5–2× its ATR in a single directional push. A 1:3 target is well within Gold's typical daily range.
-----------------------------------------------------------------------------------------
Stop-Loss Reference : ATR Multiplier : For Gold's volatile nature, a static stop-loss (Fixed or Low-High) cannot adapt to changing volatility. ATR-based SL scales with market conditions—widening during high volatility (news, session opens) and tightening during calm periods. This ensures the stop-loss is always "fair" relative to current market conditions, preventing premature stops during normal volatility spikes
-----------------------------------------------------------------------------------------
Stop-Loss Multiplier : 1.8× ATR(14) : A 1.8× ATR(14) stop-loss represents 1.8 times Gold's average 14-period range. Why 1.8× and not 2.0× or 1.5×? Backtesting revealed that 1.8× is the "sweet spot"—wide enough to survive Gold's normal volatility spikes without being stopped out by noise, yet tight enough to limit losses
-----------------------------------------------------------------------------------------
Current TF EMA : 21 (Enabled, Overrideable) : On 15m chart = 5.25 hours—perfectly captures Gold's average intraday move length. Can be overridden by Pin Bar + Engulfing Combo to catch institutional reversals that occur against the short-term trend.
-----------------------------------------------------------------------------------------
Higher TF EMA : 150 on 1H : On Gold, a 150-period EMA on a 1H chart represents roughly 6.5 days (one full trading week) of data. By making this filter absolute, the strategy guarantees it will never take a counter-trend trade against the weekly macro-structure.trend.
-----------------------------------------------------------------------------------------
Filter (RSI) : length 12 : Most traders default to RSI(14), but RSI(12) is intentionally faster for Gold's volatile intraday moves. Gold often spikes into overbought/oversold territory and reverses quickly. A 12-period RSI reacts ~15% faster than RSI(14), catching these reversals earlier while remaining smooth enough to avoid excessive whipsaws.
-----------------------------------------------------------------------------------------
Filter (Bollinger Bands) : Disabled by default : Gold is historically a trending asset with strong directional moves. A low-volatility filter would unnecessarily block valid entries during these trends. Designed for range-bound assets (choppy crypto, certain forex crosses)—enable it only if your market consolidates heavily.
-----------------------------------------------------------------------------------------
These values are a starting point – you may adjust them for other assets or personal risk tolerance.
# Important Notes on Backtest Realism
- Commission – Most ECN/raw-spread brokers charge $3.00–$3.50 per side (round-turn commission of $6.00- $7.00) for 1 standard lot (100 oz) of XAUUSD. Standard accounts usually build the fee into a wider spread instead of charging a separate cash. This strategy deducts $3.50 per entry and $3.50 per exit ($0.035 × 100 oz)round-turn commission of $7.00. Adjust this to match your broker's exact fees.
- 4 ticks Slippage - For XAUUSD, 1 tick = $0.01 per ounce. 4 ticks = **$0.04 per ounce (unit)**. Accounts for real-world price . Prevents overly optimistic backtest equity curves.
Always adjust the commission value to your broker's exact fee structure before relying on the results.
"A backtest without realistic commission and slippage is a fantasy. A backtest with realistic commission and slippage is a truthful reflection of what you can expect when trading live."
- Intra-Bar Execution: The strategy uses calc_on_every_tick = true, meaning it recalculates on every price tick during real-time trading. This allows the breakeven and partial TP logic to trigger immediately when price hits TP1, protecting the trade from intra-bar reversals.
Note: Backtests use OHLC data only, so intra-bar fills and breakeven triggers cannot be perfectly simulated. Real-time performance may differ from backtest results due to this limitation
# The Core Innovation (Why This Isn't Just a Mashup)
This strategy is built on a three-layer validation system. Each layer solves a specific problem that the other layers cannot solve alone.
Layer 1 (The Structure): Dynamic Pivot Zones
Layer 2 (The Trigger): Pin-Bar Sweep + Engulfing Combo
Layer 3 (The Execution): Gap State Machine
Here is how they interdepend to create a unique edge:
1. Adaptive Pivot Mathematics (The "Regime Matching" Logic)
Instead of offering multiple pivot types just for the sake of it, this strategy provides them so the trader can match the mathematical formula to the market's current behavioral regime:
Why this matters: Most strategies lock you into one formula. This strategy acknowledges that price dynamics change, and it gives you the mathematical weapon to adapt without rewriting the entire code.
2. The "Liquidity Grab" Trigger (Sweep + Engulfing Combo)
This is the most critical edge of the strategy. A standard Engulfing pattern is common. A standard Pin Bar is common. But when they occur sequentially—a Pin Bar that sweeps the 12-bar extreme, immediately followed by an Engulfing candle—it represents a textbook institutional "liquidity grab."
- The Logic: Large players often push price to sweep obvious stop-losses (above highs or below lows) before reversing the trend.
- The Override: Crucially, this specific combo overrides the Lower TF EMA confirmation.
- Why this is a breakthrough: Standard trend-following strategies with a hard EMA filter will miss these reversals because price is moving against the EMA in the short term. By programming this specific override, the strategy captures the exact moment of institutional reversal—catching the move before the EMA flips and the trend-followers finally enter.
3. The Gap State Machine (Dynamic Sentiment Tracking)
Unlike static support/resistance scripts that just plot lines and wait for touches, this strategy features a state machine that tracks which of the 9 gaps (between R4-R1, Pivot, S1-S4) the price currently occupies.
- The Mechanism: A Breakout Threshold (default 7% of zone width) acts as a "dead-zone" filter. Price must exceed this threshold to officially transition from one gap to another.
- The Alpha: This prevents the strategy from whipsawing during minor noise. When price crosses from Gap 4 (between R1 and Pivot) into Gap 3 (between R2 and R1), the strategy instantly and autonomously switches market status from "Bearish" to "Bullish" or vice versa.
4. Selective Zone Activation (Strategic Discretion)
- This strategy allows the user to completely disable specific zones (e.g., turn off R3).
- The Value: By disabling a weak level, the user forces the strategy to wait for the next stronger level, instantly increasing the win rate and filtering out historically weak signals without altering any other code.
5. Non-Invasive Risk Architecture (Clean Defaults)
For traders who want to reduce psychological pressure or optimize for Gold's notorious retracements, they can enable these modules. When activated, the strategy closes % of the position at a lower R:R threshold and moves the remaining position to breakeven—locking in profits while letting the rest run.
In Summary: The "Mashup" Justification
This is not a random collection of indicators.
1. The State Machine provides the structural context.
2. The Pin+Engulf combo provides the high-conviction trigger that overrides slow-moving filters.
3. The Selectable Pivot Types provide the mathematical adaptability to different assets.
4. The Selectable Zones provide the manual discretion to avoid historical losing levels.
5. The Disabled TP/BE by default provides a clean baseline for evaluating the core logic.
Author: Awab_Hassan
Strategy

Shifted Hourly Candles :00 (RTH, for 1H chart)What it does
On US stocks, PulseWire's hourly bars on Regular Trading Hours are anchored to the 9:30 session open, so every 1-hour candle opens and closes at minute :30 (9:30–10:30, 10:30–11:30, ...). Switching to Extended Hours gives you :00 alignment, but then your chart and indicators include pre-market and after-hours data.
This indicator gives you the third option PulseWire doesn't offer natively: hourly candles cut at the top of the clock hour, built from RTH data only. It redraws all candles of the session as 9:30–10:00 (a short opening candle), then 10:00–11:00, 11:00–12:00, through 15:00–16:00 — the same way TC2000 and several other platforms build their hourly bars.
Who it's for
Traders who track hourly opens/closes at the top of the hour (hourly ORB, top-of-hour reversals, hourly close confirmations) and need the candle boundaries to match.
Traders migrating between TC2000 and PulseWire who want both platforms to show the same hourly bars.
Anyone who tried the ETH workaround and found that extended-hours candles distorted their view of regular-session price action.
How it works
The script requests lower-timeframe intrabar data (request.security_lower_tf) and re-aggregates it into clock-hour buckets, detecting boundaries from actual bar timestamps in exchange time — so the short 9:30–10:00 opening candle, trading halts, and early-close sessions are all handled correctly. Each completed candle is drawn with plotcandle on the chart bar where its hour completes, and the current forming hour is drawn live on the last bar, updating as intrabars confirm.
Setup
Use a 1H chart with Extended Hours OFF.
Add the indicator, then hide the native candles (chart Settings → Symbol → set body/wick/border colors fully transparent) so only the shifted candles are visible.
Optional: switch the intrabar timeframe input to "1" for faster live updates (at the cost of history depth) or "15" for maximum history.
Limitations
The time axis labels read 30 minutes early: the 10:00–11:00 candle sits on the slot labeled 10:30. OHLC values are exact — Pine scripts cannot move the chart's time grid.
Intrabar data is capped by PulseWire (~100k intrabars), giving roughly 1 year of history at "1", ~5 years at "5".
Indicators you add to the chart still calculate on the native :30 bars; indicators must be ported to the shifted closes to match (I use companion scripts for MAs and stochastics built on the same bucket logic).
Background
This came out of a discussion in the PulseWire subreddit asking for a native "align intraday bars to clock hour" option: www.reddit.com — until that exists, this script is the workaround. Indicator

TD SeqEx Pro [VISIONAKI]Logic:
When the stock price reaches the trigger condition for nine consecutive days during an upward/downward trend, a sequence of numbers 1, 2, 3, 4, 5, 6, 7, 8, 9 is generated and sequentially marked above/below the candlestick chart. The sequence only begins to display when the stock price reaches the trigger condition.
When the trigger condition is reached on number 9, a 9-turn structure is formed. If the trigger condition is not reached on the number 9, the numbers of the previous 8 disappear, and the 9-turn structure is invalid. A 9-turn structure formed during a stock price rise is called an "Upward 9" structure (a green highlight area with green small arrow). the number above the candlestick chart and then a downward trend may occur after the upward trend. Conversely, a nine-turn structure formed during a stock price fall is called a "Downward 9" structure (a red highlight area with red small arrow). the number below the candlestick chart, an upward trend is highly likely to continue.
Special Circumstances:
1) After the number 9 appears, it may extend to four more digits of 9, eventually reaching the 13th digit (9+4=13) as a high-probability trend reversal.
2) If the number 9 may continue to extend, even surpassing the 13th digit of 9, proving that the unilateral (buyer/seller) forces are too strong. A trend reversal will fail. Indicator

Auto-ATR Volatility Spike & Trend Tracker [BigBeluga]Auto-ATR Volatility Spike & Trend Tracker is an institutional-grade algorithmic trend-following terminal engineered for PulseWire. It is specifically built to isolate high-momentum breakout anomalies (spikes) from ordinary noise and anchor a dynamic, risk-managed trailing stop-loss directly to the underlying structural expansion.
By merging volumetric price momentum with an adaptive Average True Range (ATR) detection framework, this indicator completely redefines how breakout traders enter and manage trends. Instead of reacting blindly to standard moving average crosses, the system utilizes an execution state machine that locks onto systemic market expansion, tracks trend health via dynamic midpoint lines, and protects capital with a trailing protection line.
🔵 CHANNELS & ARCHITECTURAL CORE ENGINE FEATURES
1. Dual-Mode Spike Detection System
Auto ATR Volatility Engine: Automatically adapts to varying market conditions. By cross-referencing incoming candle structures against an ATR Length multiplier baseline, the indicator filters out flat consolidation periods and flags abnormal, high-liquidity volume expansions that signify true institutional participant footprints.
Fixed Percentage Breakout Mode: For traders operating in highly structured assets with predictable daily limits, this module locks onto absolute price change thresholds ( Fixed Spike Threshold % ), isolating momentum moves that pierce predefined parameters.
Wick-to-Body Range Toggle: Allows you to switch calculations to run from either the raw candle body (Open to Close) or the full extreme range ( Calculate From Wicks (High/Low) ). This isolates clean structural closes while adjusting to high-volatility liquidity sweeps.
2. Predictive Mid-Level Benchmarks & Spacing Visuals
Dynamic Mid Level Dash Lines: When a valid trend spike is verified, the engine immediately draws a horizontal midpoint line extending from the center of the candle ( Display Mid Level Dash Line ). This centerline serves as an immediate structural macro floor or ceiling; as long as price retains this boundary, the primary breakout impulse remains historically intact.
Measurement Arrow Guides & Measurement Labels: Automatically draws measurement arrow guides along with real-time text percentage indicators directly over the breakout candle ( Display Size % Labels & Arrow Lines ). This gives you instant clarity on the volatility profile without needing to use manual drawing tools.
3. Algorithmic State Machine & Trailing Protection
Volatility-Adjusted Trailing Stops: Once a breakout trend is established, the indicator deploys a step-calculated trailing line based on your Trailing ATR Multiplier . This line is engineered to trail tightly beneath bullish expansions or above bearish flushes, keeping you safely in the macro trend while mitigating downside variance.
Trend Interlock Protection: The underlying state machine features built-in trigger restrictions that lock execution while a trend is dominant. This prevents counter-trend false entries or premature reversals, keeping your focus strictly on the dominant structural path.
Theme Overwrite Candlesticks: Completely recolors the active layout chart workspace bars using vivid, customized hex-theme presets ( Bullish/Bearish Theme Colors ) the exact moment an abnormal spike is validated.
4. Persistent Macro Statistics Dashboard Matrix
Top-Right Analytics HUD Table: Instantly maps out a high-performance database grid showing critical data points from the most recent historical market expansions.
Real-Time Metrics Monitoring: Explicitly stores and displays the precise directional Spike Type , Size (%) , and exact entry execution Price for both bullish and bearish cycles, providing a reliable quantitative snapshot of the asset's structural strength.
🔵 SYSTEMATIC EXECUTION STRATEGIES & RISK INTERPRETATION
Midpoint Re-test Accumulation Plays: When a powerful up-spike forces a market breakout, do not chase the initial overextended move. Instead, wait for a constructive pullback toward the extended dynamic dashed midline. If price builds a base and prints a clean rejection candle at this level, it signals a premium, low-risk continuation entry aligned with institutional order flow.
Trailing ATR Invalidation Exits: The trailing stop-loss line acts as your absolute trend line invalidation boundary. In a powerful bullish expansion, the indicator will continuously trail and lock in accrued profit beneath the recent low points. A clean daily close crossing beneath this line confirms an official trend termination, signaling an immediate exit to protect your capital.
Breakout Sizing Divergences: Cross-reference the live metrics dashboard data to spot exhausting trends. If an asset is pressing higher but newly generated bullish spikes show smaller percentage sizes compared to the historical records on your HUD table, it exposes fading momentum—frequently warning of an impending reversal or structural distribution phase.
🔵 INTERFACE CONFIGURATION AND PARAMETERS
Detection Mode Controls: Choose between Auto ATR or Fixed % settings and specify lookback periods to customize the indicator to match any asset class, volatility cycle, or execution chart timeframe.
Visibility Filters Overrides: Independently toggle midlines, trailing stops, background cloud color fills, or measurement labels to maintain a clean, distraction-free charting interface.
Theme Personalization Modifiers: Fully adjust color properties for upward spikes, downward spikes, buy/sell arrows, and trailing lines to blend seamlessly into your dark or light workspace layout themes.
Transform your charting workspace from speculative guessing into an automated, volatility-tracked breakout environment with the Auto-ATR Volatility Spike & Trend Tracker terminal. Indicator

Indicator

[ A L P H A X ] BASTION - Support & Resistance PatternsAlphaX BASTION — Support & Resistance Lattice Engine: Touch-Clustered Zone Detection, HTF Level Blending, Four Interaction Playbooks & Level-to-Level Target System
AlphaX BASTION is a professional-grade support and resistance system built around the concept of a lattice — a dynamic, self-updating grid of strength-scored price zones that are continuously constructed from fractal pivot clusters, blended with higher timeframe levels, decayed over time as they lose relevance, and scored by touch frequency and institutional significance. Unlike static horizontal line indicators or basic pivot systems, BASTION treats every support and resistance level as a living structure with a birth date, a touch history, an HTF weight, and a decay clock. Where most S/R systems simply identify levels and leave the trader to decide what to do, BASTION goes one step further: it monitors every active level for four specific micro-pattern interactions — DEFEND, SWEEP, RETEST, and COIL — and fires precision entry signals when those interactions occur at qualified levels with sufficient confluence. The target for every signal is not an arbitrary ATR multiple or measured move — it is the next Bastion level in the signal direction, the natural institutional delivery destination from one defended wall to the next. Designed for traders across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏰 The Lattice — A Self-Building Defended Price Map
The word "lattice" captures the core concept precisely: BASTION constructs an interconnected grid of defended price levels that represents the current institutional support and resistance landscape. This lattice is not drawn manually, not imported from a fixed timeframe, and not redrawn from scratch on every bar. It is built incrementally — growing as new pivots form, strengthened as levels are retested, and pruned as levels age beyond their relevance window.
How the lattice is constructed:
On every bar, BASTION detects confirmed fractal pivot highs and lows (using a configurable pivot length, default: 5 bars each side). Each new pivot is fed into the lattice's merge algorithm:
If the new pivot is within the merge tolerance (default: 0.22× ATR) of an existing level, it merges with that level — the level's midpoint shifts to the weighted average of all contributing pivots, the touch count increments, the zone boundaries expand if necessary, and the last touch timestamp updates
If the new pivot is farther than the merge tolerance from any existing level, a new level is created with the pivot as its midpoint, zone height of ±0.18× ATR above and below, touch count of 1, and the current bar as its birth bar
When the number of levels per side exceeds the configured maximum (default: 4), the oldest level is dropped from the end of the array
Level decay:
Levels that have not been touched in more than the configured decay period (default: 250 bars) are pruned automatically. This ensures the lattice reflects current institutional market memory rather than accumulating ancient, irrelevant levels that clutter the chart and produce false signals.
Why touch clustering produces better levels than standard S/R: A single pivot high at a price is a weak level — it represents one instance of sellers overwhelming buyers. The same price area touched three times across different sessions represents a genuine institutional order cluster — the level where significant participants have repeatedly defended their position. BASTION's weighted averaging and touch counting system identifies these genuine defended levels and distinguishes them from noise pivots.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📡 HTF Level Blending — Multi-Timeframe Institutional Walls
Every Bastion level is either a current timeframe pivot cluster or a higher timeframe structural level . When Show HTF Swing Levels is enabled (default: on), BASTION pulls pivot highs and lows from the configured HTF (default: H4) and feeds them into the same merge algorithm as current timeframe pivots.
HTF levels receive a special weight in the strength calculation: +2 additional strength points beyond their touch count. This reflects the institutional significance differential — a resistance level formed on H4 represents a zone where a much larger institutional participant defended their position, and carries proportionally more weight than a current timeframe pivot at the same price.
HTF levels are visually distinguished: HTF-sourced zones are rendered with a slightly different purple color (slateblue rather than the standard purple), and HTF-contributing midlines use a thicker dashed line (width 2 vs 1 for standard levels). This allows you to immediately identify which levels have higher timeframe structural backing.
How HTF blending works in practice: When an H4 resistance level is at 2490.00 and a current timeframe resistance forms at 2491.50 — within the merge tolerance — they merge into a single strengthened level. The merged level receives the touch count of both the HTF pivot and any current timeframe retests, plus the HTF weight bonus, making it one of the strongest levels in the lattice. This is the precise behavior of real institutional support and resistance: the H4 level acts as the anchor, and intraday touches confirm it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💪 Level Strength Scoring
Every level in the lattice has a dynamically computed strength score used to qualify signals and sort level priority.
Strength components:
Touch count — the primary strength component. Each time a new pivot merges into the level, touch count increments. A level with 4 touches is significantly stronger than one with 1
HTF bonus (+2) — levels that have HTF pivot contributions receive 2 additional strength points, reflecting their higher institutional significance
Recency bonus (+1) — levels born within the last 80 bars receive 1 additional point. Fresh levels that were recently created and immediately retested carry more immediate institutional relevance than older levels with the same touch count
Minimum strength gate: Signals are blocked from firing at levels with strength below the configured minimum (default: 2 touches). This single filter eliminates the single most common false signal in S/R trading — entering at an untested level that has not proven itself as a genuine defended zone.
Strength display on dashboard: The nearest support and resistance levels are displayed on the dashboard with their strength scores in brackets — e.g., "2450.50 " means the level at 2450.50 has a strength score of 4. At a glance, you know which levels are most defended.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎮 The Four Interaction Playbooks
The lattice provides the structural map. The playbook engine defines what to do when price arrives at a lattice level. Four specific micro-pattern interactions are monitored continuously — each representing a different way price can interact with a defended wall and a different entry scenario.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DEFEND — Wick Rejection at Level
The most common and cleanest S/R interaction. A wick rejection candle forms when price tests the level and is immediately repelled — buyers overwhelm sellers at support, or sellers overwhelm buyers at resistance, within a single candle.
Long conditions (support DEFEND):
The current bar's low is within the proxAtr distance of the nearest support level
The lower wick exceeds the configured minimum (default: 52% of bar range) — a dominant rejection wick
The close is in the upper quarter of the bar (above bodyBot + 25% of range)
The close is above the zone bottom — price rejected from inside the zone
The DEFEND signal tells you: The support level absorbed the selling pressure on this bar with a clear institutional response. The wick is the signature of buyers stepping in aggressively at the defended zone. This is the most textbook S/R signal available and the highest-frequency of the four playbooks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SWEEP — Liquidity Grab + Reclaim
The institutional stop-hunt interaction. Price breaches the zone boundary to trigger stop orders, then immediately reverses and closes back inside the zone.
Long conditions (support SWEEP):
The current bar's low extends below the zone bottom by more than the minimum sweep depth (default: 0.12× ATR) — stop orders below support have been triggered
The bar closes above the zone midline — the reclaim is decisive, not just touching the boundary
The bar closes bullish (close above open) — institutional buying drove the recovery
Why SWEEP is the highest-conviction signal: A liquidity sweep at a lattice level combines two layers of institutional evidence. The level itself has been defended multiple times (touch count) and has institutional order significance. The sweep event confirms that institutions actively used the liquidity pool below the level to fill their buy positions — the same sweep-and-reclaim dynamic that underlies MAGNET, but now occurring specifically at a pre-qualified lattice level with known strength.
The SWEEP playbook carries a confluence bonus (+1 layer point) because of this elevated institutional evidence.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RETEST — Break Then Hold (S/R Flip)
The classic support-becomes-resistance and resistance-becomes-support interaction. Price previously broke through the level from the other side, and is now returning to test the flipped level.
Long conditions (support RETEST):
Within the lookback window (default: 12 bars), the close was below the zone bottom — a genuine prior breakdown
The current bar's low is within the zone and the close is above the zone midline — the retest from above is holding
The current bar closes bullish
The RETEST signal captures: The moment when a broken resistance becomes confirmed new support. When a level that previously acted as resistance is broken, retail traders who were long above the level are stopped out or become sellers. When price returns to test the level from above — and the close holds above the midline — the same institutional level that attracted sellers is now attracting buyers who missed the initial breakout. This is the "second chance" entry that offers excellent risk/reward relative to the original breakout candle.
The RETEST playbook also carries a confluence bonus (+1 layer point).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COIL — Compression into Level
The pre-breakout compression interaction. Price has been ranging with narrow ATR bars approaching the level — a coiling squeeze that frequently precedes an explosive directional move.
Long conditions (support COIL):
The last N bars (default: 4) each have an ATR of less than 0.75× the overall ATR — the market is compressing with below-average volatility
The close is within the proxAtr distance of the support level — the compression is occurring directly at the lattice level
The close is above the zone midline — the compression is occurring on the correct side of the level
The COIL signal captures: The energy-building phase at a defended level. When price approaches a lattice level with declining volatility over multiple bars, it indicates the institutional response to that level is suppressing price movement — buyers and sellers are in equilibrium at the level, but the institutional bias (toward defending it as support or resistance) creates a coiled spring. The first decisive bar after the coil frequently produces a large directional move.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Level-to-Level Target System — The Bastion's Unique Approach
Every other entry system in the AlphaX suite uses ATR multiples, Fibonacci measured moves, or pattern heights to compute take profit targets. BASTION uses none of these. The target for every BASTION signal is the next Bastion level in the direction of the trade.
For a long signal at support: The target is the nearest resistance level above the entry price in the current lattice. This is the next defended wall — the level where sellers are expected to step in and potentially cap the move.
For a short signal at resistance: The target is the nearest support level below the entry price — the next defended wall where buyers are expected to step in.
Why level-to-level targeting is superior to measured moves for S/R trading: The market does not move from support to an arbitrary ATR multiple above. It moves from support to resistance — from one institutional wall to the next. Using the actual lattice level as the target ensures the trade is exited at the next genuine institutional interaction point rather than at an arbitrary mathematical distance. This aligns the trade's exit with the same institutional framework that generated the entry.
NEXT WALL TGT on dashboard and chart: The target level is displayed on the dashboard as NEXT WALL TGT and plotted as a yellow-green dashed line on the chart labeled "NEXT WALL." When no opposing lattice level is currently qualified (the target would be beyond the available lattice), the system shows — rather than fabricating a target.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The 7-Layer Confluence Engine
Every playbook signal is evaluated through a 7-layer scoring system. Signals below the minimum layer count (default: 4) are suppressed.
Layer 1 — Level Strength (1 point):
The interacted level meets the minimum strength threshold (touch count + HTF bonus + recency bonus ≥ minimum). Levels that do not meet this floor cannot produce signals regardless of playbook quality.
Layer 2 — HTF Trend Bias (1 point):
The higher timeframe EMA structure (default: 60-minute, 21/55 EMA) agrees with the signal direction. Bull signals require HTF bull, bear signals require HTF bear. When HTF bias is disabled, this layer is neutral (0 points). Note that the HTF bias is also enforced as a hard condition in the signal firing logic — signals opposing the HTF are blocked entirely when useHtfBias is on.
Layer 3 — Volume Expansion (1 point):
Current bar volume exceeds the volume moving average by the configured multiplier (default: 1.08×). Confirms institutional participation on the interaction bar.
Layer 4 — Non-Chop Market (1 point):
Choppiness Index is below the configured threshold (default: 62). Also enforced as a hard gate — extreme chop blocks all signals. S/R interactions during extreme chop frequently produce false breakouts and fake rejections.
Layer 5 — Playbook Bonus (1 point):
SWEEP and RETEST playbooks receive 1 additional point reflecting their elevated institutional evidence. DEFEND and COIL do not receive this bonus — they are valid but carry less structural confirmation than a sweep reclaim or S/R flip.
Layer 6 — Bar Range Quality (1 point):
The current bar's range is at least 0.35× ATR — the interaction bar has sufficient price action to produce a genuine signal. Doji and near-doji bars in critical zones do not score this point.
Layer 7 — Session Active (1 point):
The current bar is within the configured active session window when the session filter is enabled. When the filter is off, this layer always contributes its point.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 14-row real-time dashboard displays the complete state of the lattice and the current signal context.
LATTICE
Nearest Sup — the price of the nearest support level below current price, with its strength score in brackets (e.g., "2450.50 "). Yellow-green color
Nearest Res — the price of the nearest resistance level above current price with strength score. Red color
Zone Count — the total number of active support and resistance levels in the lattice (e.g., "3 sup · 4 res"). Provides awareness of how populated the current lattice is
PLAYBOOK
State — the current playbook state: the active playbook name (DEFEND, SWEEP, RETEST, COIL) when a signal just fired; WATCH WALLS during the inter-signal period
Bias — ▲ LONG or ▼ SHORT when a signal fired; NEAR RES, NEAR SUP, or MID-RANGE based on current price position relative to the lattice when idle
Next Wall Tgt — the price of the next opposing lattice level — the level-to-level target for the current trade
FILTERS
HTF Bias — ▲ BULL, ▼ BEAR, or — FLAT
Chop — live Choppiness Index value. Orange when above the stand-aside threshold
Volume — EXPAND (above threshold) or QUIET
Playbooks On — abbreviations of all currently enabled playbooks (DEF SWP RET COIL) for quick reference
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Resistance Zone Boxes (purple / slateblue) — semi-transparent boxes spanning each resistance level from its birth bar to 15 bars beyond current. Standard purple for current timeframe levels, slateblue for HTF-blended levels
Resistance Midlines (purple dashed) — the exact midpoint of each resistance zone. Width 1 for standard, width 2 for HTF levels
Support Zone Boxes (yellow-green) — semi-transparent yellow-green boxes for all active support levels
Support Midlines (yellow-green dashed) — support zone midpoints. Width 2 for HTF levels
⬡ Diamond (below bar, bright yellow-green) — BASTION long signal. Playbook fired at a support level with qualifying confluence
⬡ Diamond (above bar, bright red) — BASTION short signal
Playbook Label — appears above or below the signal diamond showing "BASTION LONG/SHORT" + playbook name + level price
SL Guide (red dotted) — stop loss below the zone bottom plus ATR buffer (long) or above zone top plus ATR buffer (short), extending 30 bars forward with "SL" label
NEXT WALL Guide (yellow-green dashed) — the level-to-level target extending 30 bars forward with "NEXT WALL" label
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX BASTION — Step by Step
Step 1 — Read the Lattice
Check the NEAREST SUP and NEAREST RES rows on the dashboard. Note the strength scores in brackets. Levels with strength 4+ are the most defended — prioritize interactions at these levels
Look at the Zone Count row — a lattice with 3–4 levels on each side represents a well-populated market map. A sparse lattice (1–2 levels per side) means fewer reference points and potentially lower signal quality
Check whether the nearest support or resistance has HTF origin — the slateblue color on the chart or the higher strength score indicates institutional level significance
Step 2 — Monitor Price Approaching a Level
When the dashboard Bias row shows NEAR RES or NEAR SUP, price is approaching a lattice level within the proximity threshold. Watch for a playbook interaction to develop
Identify which playbook is most likely: Is price approaching with narrow bars (COIL)? Did price recently spike below (SWEEP potential)? Has the level previously been broken (RETEST setup)? Is price arriving with a clear wick forming (DEFEND setup)?
Check HTF Bias and Chop on the dashboard — both must be favorable before a signal can fire
Step 3 — Enter on the Diamond Signal
A ⬡ diamond below the bar confirms a qualifying long interaction. The playbook label shows which of the four setups fired and at which exact level
The SL guide shows the stop level — placed below the zone bottom plus ATR buffer (long) or above zone top plus buffer (short). This is the structural invalidation point: if price closes through the zone boundary in the wrong direction, the level has failed to defend
The NEXT WALL guide shows the target level — the next opposing lattice wall
SWEEP and RETEST signals carry the highest confluence (extra playbook layer point) — size these entries at full allocation. DEFEND and COIL at standard allocation
Step 4 — Manage to the Next Wall
The trade targets the NEXT WALL level shown on the chart. As price approaches that level, watch for rejection signals in the opposing direction — if BASTION fires a signal at the target level against your trade, this is a natural exit point
Monitor the lattice continuously — new levels may form during the trade that become relevant intermediate targets or stop adjustment points
If the lattice map shifts significantly (a level is pruned by decay or a strong new level forms), reassess the trade's target
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
Chop Index is orange on the dashboard — the hard gate is active. No signals fire in extreme chop. S/R levels lose their predictive power when the market is oscillating — every touch becomes ambiguous
Zone Count shows 1–2 levels per side — a sparse lattice means the system has insufficient structural reference. The market may be trending strongly through all levels or may be too early in the session to have built meaningful clusters. Wait for the lattice to populate
Nearest level strength is 1 — the minimum strength gate will block signals at untested levels, but if the nearest levels all show , the lattice is populated with fresh, unproven levels. Increase the minimum level strength in settings to require at least 2–3 touches
HTF Bias shows FLAT — no higher timeframe directional conviction. Counter-trend S/R interactions in a flat HTF environment fail at a higher rate because neither institutional buyers nor sellers have committed to a directional view
NEXT WALL TGT shows — — no opposing qualified level exists in the lattice above (for longs) or below (for shorts). Without a level-to-level target, the trade lacks a natural exit framework. Consider skipping signals when no next wall target is available
Playbook is COIL at a level with strength 2 — a coil at a weak, lightly-tested level carries the lowest probability of the signal matrix. COIL at high-strength (4+) levels with HTF backing is a quality setup; COIL at minimum-strength levels is marginal
The ideal BASTION setup:
Support or resistance level with strength 4+ (multiple touches, ideally HTF-blended)
HTF Bias aligned with the trade direction
SWEEP or RETEST playbook (highest confluence bonus)
Volume expanding on the interaction bar
Chop Index well below threshold
Clear NEXT WALL target on the opposing side of the lattice
Signal layers at 6–7 out of 7
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🏰 Dynamic S/R lattice — self-building, self-pruning grid of touch-clustered support and resistance zones. New pivots merge into existing levels, incrementing touch counts and adjusting zone boundaries automatically
📡 HTF level blending — H4 (or any configurable HTF) pivot levels fed into the same lattice with a strength bonus, producing a multi-timeframe S/R map in a single indicator
💪 Level strength scoring — touch count + HTF bonus + recency bonus produces a composite strength score for every level. Minimum strength gate blocks signals at untested levels
⏱ Level decay — zones older than the configurable decay period are automatically pruned, keeping the lattice relevant to current institutional market memory
🎮 Four interaction playbooks — DEFEND (wick rejection), SWEEP (liquidity grab + reclaim), RETEST (S/R flip), COIL (compression) — each detecting a different institutional level interaction scenario
🎯 Level-to-level target system — take profit targets the next opposing lattice wall rather than an arbitrary ATR multiple or measured move. The most institutionally grounded target method available
🛡 Zone-anchored stop loss — stop placed beyond the zone boundary plus configurable ATR buffer, at the structural invalidation point for each interaction type
🧠 7-layer confluence engine — Level Strength, HTF Trend Bias, Volume, Non-Chop, Playbook Bonus, Bar Range Quality, Session Active
📊 Live lattice dashboard — Nearest Support/Resistance with strength scores, Zone Count, active Playbook, Bias, Next Wall Target, and all filter states
🎨 Phase-coded zone visualization — resistance zones in purple/slateblue, support zones in yellow-green. HTF levels distinguished by color shade and line width
🔔 2 alert conditions + runtime alerts — Bastion Long and Bastion Short with level price and target in the alert message
⚙ Fully configurable — pivot length, zone merge and half-height tolerances, max levels per side, level decay, HTF timeframe for levels, all four playbook enables, proximity, wick minimum, sweep depth, retest lookback, coil bars, minimum level strength, confluence minimum, HTF bias timeframe and EMAs, volume filter, chop gate, session, cooldown, SL buffer, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
S/R Lattice
Swing Pivot Length — fractal sensitivity for pivot detection (default: 5)
Zone Merge (xATR) — ATR distance within which new pivots merge into existing levels (default: 0.22)
Zone Half-Height (xATR) — ATR distance above and below each level midpoint defining the zone boundaries (default: 0.18)
Max Levels per Side — maximum active resistance and support levels maintained simultaneously (default: 4 each)
Level Decay (bars) — bars since last touch after which a level is pruned from the lattice (default: 250)
ATR Length — ATR calculation lookback (default: 14)
Show S/R Zones — toggle lattice boxes and midlines
Blend HTF Swing Levels — toggle higher timeframe level incorporation
HTF for Levels — the higher timeframe from which pivot levels are imported (default: H4)
HTF Pivot Length — pivot length for HTF level detection (default: 5)
Interaction Playbooks
DEFEND — Wick Rejection at Level — toggle the rejection wick playbook
SWEEP — Liquidity Grab + Reclaim — toggle the sweep and reclaim playbook
RETEST — Break then Hold — toggle the S/R flip retest playbook
COIL — Compression into Level — toggle the narrow-bar compression playbook
Max Distance to Level (xATR) — ATR distance from level within which an interaction is considered proximate (default: 0.35)
Min Rejection Wick % — minimum wick fraction of bar range for DEFEND (default: 0.52)
Min Sweep Depth (xATR) — minimum extension below/above zone boundary for SWEEP (default: 0.12)
RETEST Lookback (bars) — bars to scan for the prior breakout in RETEST detection (default: 12)
COIL Min Narrow Bars — consecutive narrow-ATR bars required for COIL (default: 4)
Min Level Strength (touches) — minimum composite strength for a level to generate signals (default: 2)
Confluence
Min Layers (of 7) — minimum confluence score to fire a signal (default: 4)
HTF Trend Bias / HTF Bias TF / HTF Fast / Slow EMA — trend bias filter parameters
Volume Expansion / Volume vs Avg / Volume Avg Length — volume layer parameters
Block Extreme Chop / Choppiness Length / Chop Block Above — chop gate parameters
Session Filter / Active Session — trading hours restriction
Signal Cooldown (bars) — minimum bars between signals (default: 6)
Level-to-Level Guidance
Show SL + Next Level Target — toggle the stop and target guide lines
SL Beyond Sweep/Zone (xATR) — ATR buffer beyond the zone boundary for stop placement (default: 0.35)
Show Playbook Label — toggle the signal label showing playbook name and level price
Display
Show Entry Markers — toggle the ⬡ diamond signal shapes
Show Dashboard — toggle the full dashboard
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Support — yellow-green for support zones and bullish signal elements
Bear / Resistance — red for resistance zones and bearish signal elements
S/R Lattice — purple for standard lattice zones and midlines
HTF Level — slateblue for HTF-blended level zones and midlines
Sweep Accent — orange for SWEEP playbook accents and chop warnings
Stop Guide / Next Level Target — stop and target line colors
Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (2 total + runtime)
Entry Alerts
Bastion Long — qualifying long interaction fired at a support level. Alert message includes playbook name, level price, and next wall target
Bastion Short — qualifying short interaction fired at a resistance level
Runtime alerts (via the alert() function) fire simultaneously with the chart signals, also containing the playbook, level price, and target in the message for immediate actionability.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M5–H1 :
Pivot Length at 5 — balanced sensitivity for intraday lattice construction
Zone Merge at 0.22× ATR — appropriate for gold's tick structure; tighter than typical forex parameters
Level Decay at 250 bars — approximately 20 hours on M5; sufficient to maintain intraday relevance without accumulating ancient levels
HTF for Levels at H4 — the most widely respected swing timeframe for gold and forex institutional structure
Minimum Level Strength at 2 — requires at least two confirmed touches before a level can generate signals
For other instruments or timeframes, adjust:
M1–M3 scalping — reduce Pivot Length to 3, reduce Zone Merge to 0.15, reduce Level Decay to 100–150 bars, reduce Cooldown to 3, reduce COIL Min Narrow Bars to 2–3
H4–Daily swing trading — increase Pivot Length to 8–10, increase Zone Merge to 0.35, increase Level Decay to 500+, set HTF for Levels to Weekly, increase Min Level Strength to 3
Crypto (BTC, ETH) — increase Zone Merge to 0.28–0.35 for wider tick structure, increase Min Sweep Depth to 0.18, increase Level Decay to 300
Indices (NAS100, US30) — use session filter for cash market hours, increase Zone Merge to 0.25, increase Min Level Strength to 3 for index structure
More signals — lower Min Layers to 3, reduce Min Level Strength to 1, increase Max Distance to Level to 0.50
Highest-quality only — raise Min Layers to 5–6, increase Min Level Strength to 3+, enable only SWEEP and RETEST playbooks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🏰 Support and resistance traders — BASTION is the most complete and systematic S/R implementation in the AlphaX suite. Every aspect of the S/R trading approach — level identification, strength scoring, interaction detection, stop placement, target identification — is automated and quantified
📡 Multi-timeframe S/R traders — the HTF level blending system automatically incorporates H4 (or any configurable timeframe) swing levels into the same lattice, producing a multi-timeframe S/R map without requiring manual level drawing across timeframes
💧 Liquidity sweep traders — the SWEEP playbook at lattice levels is the highest-conviction signal type in BASTION, combining the stop-hunt reversal concept from MAGNET with the pre-qualified, strength-scored level framework of the lattice
🎯 Traders who want structurally meaningful targets — the level-to-level target system is the most institutionally grounded TP approach available — targeting the next defended wall rather than an arbitrary distance
🧠 Systematic traders who want quantified S/R — touch counts, strength scores, decay parameters, and confluence layers replace entirely subjective level identification with objective, repeatable criteria
📈 Traders across all asset classes — the ATR-normalized zone parameters adapt naturally to gold, forex, crypto, and indices without manual recalibration between instruments
⚠ Traders who draw too many or too few S/R levels manually — BASTION manages level count automatically through the Max Levels per Side setting and the decay system — always showing the most current and most relevant levels without chart clutter
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. Lattice construction, level strength, playbook detection, and confluence scoring all finalize on confirmed bars only
The lattice is built incrementally from the first bar of chart history. On initial chart loads, the lattice will be sparse for the first 50–100 bars as pivots begin to form and levels begin to cluster. Signal quality improves as the lattice populates
The level decay mechanism (default: 250 bars) means that on very active instruments with frequent pivots, the lattice refreshes relatively quickly. On slower instruments or higher timeframes, levels persist longer. Adjust the decay period to match your instrument's typical S/R memory window
HTF level blending uses Pine Script's request.security — HTF pivots are confirmed on the HTF's own bar close schedule, not the current timeframe. This is non-repainting and consistent with all standard security requests
When multiple playbooks fire at the same level on the same bar, the signal with the highest layer count is selected. The dashboard's playbook abbreviations show which playbooks are currently enabled
Maximum 500 lines, 500 labels, and 60 boxes are rendered. The lattice visualization uses boxes and lines for each level, the signal uses a label, and the guide uses lines and labels. On very active charts with maximum level counts, older elements may be removed by PulseWire rendering limits
The indicator does not track open positions or P&L; and does not connect to any broker or account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who understand that price does not move in a vacuum — it moves between walls, and the key to reading the market is knowing where those walls are, how strong they are, and exactly what price does when it arrives at them. Indicator

Three & Four Bar Reversal PatternThree & Four Bar Reversal Pattern identifies short-term reversal candlestick setups directly on your chart, based on a strict closing-price confirmation rather than just wick penetration — making signals more reliable for intraday and swing trading decisions.
WHAT IT DETECTS
3-Bar Reversal
A classic three-candle reversal:
Bullish: two consecutive bearish candles followed by a bullish candle that closes above the high of the first bearish candle.
Bearish: two consecutive bullish candles followed by a bearish candle that closes below the low of the first bullish candle.
Requiring the close (not just the wick) to break the reference level filters out weaker, unconfirmed reversal attempts.
4-Bar Reversal (optional)
An extended version of the pattern for setups where the reversal takes one extra candle to confirm:
Two small same-direction candles, followed by a transition candle in the opposite direction, followed by a large breakout candle whose body exceeds the combined body size of the previous three candles, and whose close breaks through the high/low of the first candle.
Built-in logic prevents a 4-bar signal from overlapping with an already-completed 3-bar signal on the same candles, so you don't get redundant markers on the chart.
FEATURES
Independent toggles for bullish and bearish signals
Customizable colors for bullish/bearish markers
Optional 4-bar pattern detection, clearly distinguished from 3-bar signals with on-chart labels ("3" / "4")
Configurable reference line (style: solid/dashed/dotted, adjustable width) marking the breakout level
Built-in alert conditions for all four signal types (bullish/bearish, 3-bar/4-bar)
HOW TO USE
Add the indicator to your chart.
Watch for triangle markers below/above candles — these mark confirmed reversal closes.
Enable "4-Bar Pattern Detection" in settings if you also want the extended 4-candle version.
Set alerts on any of the four conditions to get notified in real time.
NOTES
This tool is designed to highlight potential reversal setups, not to generate standalone buy/sell signals. Always combine it with your own risk management, trend context, and confluence factors (support/resistance, volume, higher-timeframe structure, etc.). Past patterns do not guarantee future results. Indicator

Indicator

Body vs Wick Filter**Body vs Wick Filter**
The Body vs Wick Filter is a candle analysis tool that identifies candles with a significant body relative to their total range. The core idea behind this indicator is that candles with a large body and small wicks represent strong, decisive price movement, while candles with small bodies and large wicks indicate indecision, rejection or failed attempts to move in a direction. By filtering for candles that meet a minimum body percentage, traders can visually separate high-conviction moves from noise.
**How it works**
For every candle on the chart, the indicator calculates three values: the total candle range from high to low, the body size from open to close, and the remaining wick size. It then expresses the body as a percentage of the total range. A candle where the body takes up 80% of the total range is a strong, directional candle. A candle where the body is only 20% of the range is mostly wick and represents uncertainty in the market.
**Coloring and visual output**
Candles that meet or exceed your minimum body percentage threshold are highlighted directly on the chart. Bullish candles that qualify receive one color and bearish candles that qualify receive a separate color, both fully customizable in the settings. Candles that do not meet the threshold are left in their original chart color, so your attention is naturally drawn to the qualifying candles only.
An optional percentage label is displayed above each candle within the lookback window, showing the exact body percentage so you can quickly assess the strength of any candle at a glance.
**How to use it**
1. Set your minimum body percentage in the settings, for example 60%, to only highlight candles where the body makes up at least 60% of the total range
2. Choose your preferred colors for bullish and bearish qualifying candles
3. Adjust the lookback window to control how many recent candles display the percentage label
4. Use the Data Window by hovering over any candle to see the exact body percentage, wick percentage, total candle size in pips and body size in pips
**Practical applications**
This indicator is particularly useful for traders who base entries on candlestick structure, such as identifying strong momentum candles, confirming breakouts, or filtering out indecisive price action around key levels. It works on any timeframe and any instrument. Indicator

Candle Pattern Forecast# Candle Pattern Forecast — Complete Guide
---
## What This Indicator Does
The Candle Pattern Forecast engine looks at the most recent candles on your chart and asks a simple question: **has the market made this same sequence of candles before, and if so, what happened next?**
Every candle tells a story beyond just where price closed. It reveals how decisive the move was (the body), whether buyers or sellers got rejected at the extremes (the wicks), and which side was in control (direction). This indicator reads those four characteristics on each of the last N candles, builds a structural fingerprint of that sequence, then scans back through history looking for every other time the market made a similar sequence.
Once it finds enough matching sequences, it looks at what price actually did in the bars that followed each match. It then plots the median of all those outcomes as a forecast midline, and draws confidence bands showing the range where the bulk of those historical outcomes actually landed.
In plain terms: **the last time the market made candles that looked like this, here is what typically happened next.**
---
## What It Is Not
This is not a crystal ball. It is not predicting the future with certainty. It is showing you a probability-weighted summary of historical behavior following similar candle patterns. The quality of that summary depends entirely on how many good matches exist in history and how consistently those matches behaved afterward. The info box tells you both of those things in real time.
---
## The Display
**Pattern Line** — a purple line tracing the closes of the Candle Lookback window. This shows you exactly which candles the engine read to build its fingerprint, ending at the anchor point where the forecast begins. When Historical Rewind is active, the pattern line shifts back with the rest of the indicator so you always see the sequence that generated the projection.
**Forecast Midline** — the median (or average, if you switch modes) of all the forward price paths observed after matched candle sequences. This is your central tendency line — where the market most commonly ended up after patterns like this.
**Confidence Bands** — the range between the 25th and 75th percentile of historical outcomes by default. The middle 50% of your matched sequences ended up inside these bands. Tight bands mean the matches behaved consistently. Wide bands mean outcomes were scattered and the pattern had no reliable follow-through.
The bands naturally widen as they extend further forward in time. This is correct behavior — the further out you project, the more historical paths diverge from each other.
---
## Inputs — Model Group
**Non-Repaint Mode** — when on, the indicator anchors itself to the last fully closed candle and never changes its projection mid-bar. This is the honest setting for real trading decisions. When off, it updates live on the current bar, which means the projection shifts as price moves.
**Candle Lookback** — how many candles back the engine reads to build its fingerprint. At 5, it reads the last 5 candles and uses their combined anatomy as the pattern it is trying to match in history. Shorter lookbacks find more matches because the fingerprint is simpler. Longer lookbacks find fewer but potentially more specific matches. For short-term intraday work, 3–7 is a practical range. Going much above 10–15 starts to starve the engine of good matches.
**Search Depth** — how far back in history the engine scans looking for matches, measured in bars. At 2000, it looks back 2000 bars. More depth gives more candidates to match against, which is generally better. The limit is how much data your chart actually has.
**Forecast Horizon** — how many bars forward the projection extends after the anchor point. At 10, you get a 10-bar forecast. Keep this in a sensible relationship to your Candle Lookback — projecting 50 bars forward on a 5-candle pattern will produce a technically valid but practically meaningless result as the historical outcomes diverge too much to average meaningfully.
**Pattern Matches** — the target number of historical matches the engine tries to collect. It starts with a very strict similarity requirement and automatically loosens it until it has found this many matches, stopping at the Similarity Floor. More matches produce a smoother, more stable midline but dilute the directional signal. Fewer matches are noisier but more specific. 15–30 is a practical range.
**Similarity Floor** — the absolute minimum similarity score the engine will accept for a match, expressed as a percentage. If it cannot find enough matches above this floor, it takes whatever it found and shows a warning in the info box. This prevents the engine from building a projection on essentially unrelated historical patterns. Raising this makes the engine more selective. Lowering it makes it more permissive.
---
## Inputs — Historical Rewind Group
**Enable Rewind** — when toggled on, the entire indicator shifts backward in time by the number of bars you specify. The fingerprint is read from that past point, the scan searches only history that existed at that time, and the projection extends forward from there — into what is now known history. This lets you visually compare what the indicator would have projected against what price actually did. The pattern line also shifts back to show the candle sequence that was read at that point in time. When off, the indicator runs live as normal.
**Bars Back** — how many bars back to anchor the rewind. At 50, the engine reads the candle sequence from 50 bars ago, finds matches from history prior to that point, and draws the projection forward from there. You can then see how closely the actual subsequent price action followed the forecast. Set to 0 when rewind is enabled but you want to temporarily pause without toggling it off.
The info box Rewind row shows **Live** when rewind is off and **⏪ N bars back** in orange when active, so it is always clear whether you are looking at a live projection or a historical replay.
---
## Inputs — Match Strictness Group
**Match Strictness** — a single dropdown from 1 (Weak) to 5 (Exact) that controls how the engine weighs the four candle anatomy dimensions against each other when measuring similarity.
- **1 — Weak** — all four dimensions (body, upper wick, lower wick, direction) matter equally. The engine is looking for a general structural resemblance. Finds the most matches.
- **2 — Relaxed** — slight emphasis on body conviction. Still broadly permissive.
- **3 — Balanced** — the default. Body size is the dominant signal but wicks and direction still contribute meaningfully.
- **4 — Strict** — strong body emphasis. The engine is primarily matching on how decisive each candle was. Fewer but structurally closer matches.
- **5 — Exact** — body conviction is the overwhelming signal. Only candle sequences with very similar body profiles will qualify. Hardest to match, fewest results.
Think of this as tuning what kind of candle similarity matters most to you. If you care primarily about whether candles were indecisive or committed, lean toward Strict or Exact. If you want a broader match that respects the full candle structure equally, use Weak or Relaxed.
---
## Inputs — Pattern Line Group
**Show Pattern Line** — toggles the pattern line on or off. Default is on.
**Color** — color of the pattern line. Default is purple.
**Width** — thickness of the pattern line. Default is 2.
---
## Inputs — Forecast Group
**Midline Mode** — controls how the central forecast line is calculated from the matched outcomes.
- **Median** (default) — takes the middle value when all outcomes are sorted. More robust to outliers. If one matched sequence had a massive move that was atypical, it gets pushed to the edge rather than pulling the midline toward it.
- **Average** — takes the arithmetic mean of all outcomes. More sensitive to outliers and extreme moves in either direction.
For most use cases Median is the more honest representation of what typically happened.
**Midline Color / Width / Style** — visual styling for the forecast midline.
**Show Confidence Bands** — toggles the upper and lower bands on or off.
**Confidence Band Mode** — controls how the bands are calculated.
- **Percentile** (default) — sorts all historical outcomes at each forecast step and draws the bands at the exact percentile you specify. No assumptions about the shape of the distribution. The bands directly show you where real historical outcomes clustered.
- **Std Deviation** — draws the bands at mean ± N standard deviations. Assumes outcomes are roughly bell-shaped. Can be distorted by outliers inflating the standard deviation even when most matches behaved similarly.
**Lower Percentile / Upper Percentile** — only active in Percentile mode. Default is 25 and 75, meaning the bands show where the middle 50% of historical outcomes landed. Moving to 10/90 widens the bands to capture 80% of outcomes. Moving to 5/95 captures 90%. The right setting depends on whether you want to see the typical range or the full plausible range.
**Band Std Deviation** — only active in Std Deviation mode. At 1.0, the bands cover approximately 68% of outcomes. At 2.0, approximately 95%.
**Upper / Lower Band Color, Width, Style** — visual styling for the confidence bands.
---
## Inputs — Info Box Group
The info box displays the engine's live diagnostic state so you always know what is actually running.
**Show Info Box** — toggles the info box on or off.
**Position** — where on the chart the info box appears.
**Text Size** — size of the info box text.
**Background / Border / Header colors** — visual styling.
---
## Reading the Info Box
**Candle Lookback** — confirms how many candles the fingerprint is built from.
**Forecast Horizon** — confirms how many bars forward the projection extends.
**Matches Used** — how many historical sequences qualified. If this is orange, no matches were found — the engine has nothing to project from. Try lowering the Similarity Floor, reducing the Candle Lookback, or increasing the Search Depth.
**Sim Floor / Fit** — two numbers. The left is the similarity threshold the engine actually settled on to reach your target match count. The right is the average similarity score of all the matches it found. Higher is better. A warning symbol next to the left number means the engine hit the Similarity Floor and could not find enough matches above it.
**Match Quality** — a composite score from Low to High that combines the average similarity of your matches, how close you got to your target match count, and whether the floor was hit. High means the engine found well-matched patterns. Low means the projection is built on weaker material and should be treated with more skepticism.
**Search Depth** — confirms the search depth setting currently active.
**Strictness** — confirms which Match Strictness level is active.
**Midline** — confirms whether you are running Median or Average.
**Bands** — confirms the active band mode and parameters. Shows either "Pctl 25/75" style or "StdDev ×1.0" style depending on your selection.
**Rewind** — shows Live when the indicator is running on the current bar, or ⏪ N bars back in orange when Historical Rewind is active.
---
## Practical Usage Tips
The forecast midline being relatively flat is not a failure — it often means the candle pattern genuinely did not predict a strong directional move historically. In that case the bands are the more useful signal, showing you the range of outcomes rather than pretending to know direction.
Tight bands with a flat midline means the pattern historically resolved with small moves in both directions — a low-conviction setup. Wide bands means the pattern was followed by large moves but in inconsistent directions. A midline with meaningful slope and tight bands is the highest-quality signal the engine can produce.
Treat Match Quality as your confidence filter. When it reads Low or Weak, reduce the weight you place on the projection. When it reads High, the engine found genuinely similar historical sequences and the projection has more structural basis behind it.
Use Historical Rewind to build intuition for the indicator before trusting it live. Step back 50 or 100 bars, observe how the projection compared to what actually happened, experiment with different Candle Lookback and Match Strictness settings, and develop a feel for when the indicator tends to be more or less reliable on your instrument and timeframe. The pattern line makes this especially useful — you can see exactly which candle sequence triggered the projection and compare it visually to where price went next. Indicator

Indicator

Macro Candle OverlayMacro Candle Overlay is a higher-timeframe candle visualization tool designed to display selected macro candles directly on the active chart.
The script draws candles from a selected higher timeframe, such as 15m, 30m, 1H, 2H, 4H, Daily, Weekly, or Monthly. Each higher-timeframe candle is represented with its own body and wick, allowing traders to view larger candle structure without switching away from the current chart timeframe.
This can help with visual analysis of broader market context, including higher-timeframe candle direction, wick behavior, candle body size, and developing macro candle structure.
Main features:
* Higher-timeframe candle overlay on the current chart;
* Selectable candle timeframe;
* Bullish and bearish body color settings;
* Wick and border color settings;
* Adjustable body transparency;
* Automatic candle updating while the current higher-timeframe candle is still developing;
* Clean chart-based visualization with no signal logic.
How it works:
The indicator uses the selected higher timeframe to define candle open, high, low, close, start time, and end time. It then draws each candle as a chart object, including a candle body and a wick. The active candle updates as new price data appears.
This script does not generate buy or sell signals. It does not include strategy logic, alerts, backtesting, win-rate calculations, or performance projections. It is intended only as a visual charting tool for reading higher-timeframe candle structure.
Traders can use it as an additional visual reference together with their own analysis, market structure, risk management, and trading plan.
Indicator

Iceberg Detector [JOAT]ICEBERG DETECTOR
A hidden-liquidity detector that infers iceberg orders from their footprint on the tape — without needing direct L2 data. The detection pattern is well-known to professional tape readers: the same price level being repeatedly tested by long wicks, with above-average volume, and price each time getting rejected back in the opposite direction. That repeated-rejection pattern is the visible signature of an iceberg — a large resting order broken into smaller slices to hide its true size. This script catches the pattern, clusters the tests, paints the zone, and tells you when the iceberg gets broken or eaten.
Detection — five gates, all required
A bar is a candidate iceberg test only when every one of these is true:
Long wick — wick-to-body ratio above the configurable threshold (default 0.75). The wick is the visible rejection; the body is the failed push.
Local extremum — the wick reached a local high or low over the configurable pivot lookback (default 5 bars). A wick that did not actually probe new territory does not count.
Above-average volume — bar volume must exceed volume average × multiplier (default 1.0×). Real absorption needs real size hitting the tape.
Wick rejection bias — the candle must close in the rejection direction (opposite of the wick).
Cluster within tolerance — at least N (default 2) of these qualifying tests must occur within ATR × tolerance of the same level inside the detection window (default 40 bars).
Only when all five gates pass does the script paint a zone. The wick rejection bias % input controls how strict the rejection-direction filter is; raising it to 70%+ makes the zone confirmation slower but cleaner.
Cluster-aware level building
When two or more qualifying tests fall within ATR-multiplier tolerance of each other, they are clustered into a single zone whose vertical extent (configurable in ATR units) covers the cluster. This means an iceberg sitting at 4382.50–4383.25 is rendered as a single horizontal band, not two separate ticks — which is how a real iceberg would actually appear on the tape.
Visual system
Iceberg zone — a horizontal band rendered in the cool-blue palette (deep void → pale violet gradient) with configurable opacity.
Glow layers — N (configurable, default 4) stacked transparent boxes behind the zone produce a soft glow border.
Pulse animation — for a configurable number of bars after a fresh test, the zone's transparency oscillates to highlight that the iceberg has just been re-tested. Toggleable.
Test ticks — small markers at each individual test bar inside the zone.
Test count badge — small number tag showing how many tests have hit the level.
Right extension — configurable bar count for forward zone projection.
A locked Void palette (cool violet gradient on a deep void ground) gives the chart a distinctive hidden-liquidity identity.
Lifecycle — persist, archive, break
Every iceberg has three life stages:
Active — currently in front of price and being honoured. New tests add ticks and trigger pulse animations.
Broken — price closed through the level by Break Distance × ATR (default 0.5 ATR). The zone moves to the muted broken-archive palette and stays on the chart for brokenStaleBars (default 150) bars so you can see where structure failed.
Stale — older than the archive lifetime, automatically removed.
A maximum-concurrent-icebergs cap (default 12 active) and a max-broken cap (default 8) keep the chart legible.
Dashboard
Monospaced table, positionable to any of nine corners, surfaces:
Active iceberg count, broken count.
Nearest iceberg level with side (resistance / support), distance in ticks or %.
Test count and age of the nearest iceberg.
Last broken event with bars-ago tag.
Alerts
Three alert conditions, each independently controllable:
New Iceberg Detected — fires the bar an iceberg is first confirmed (all five gates pass).
Iceberg Re-Tested — fires when an existing iceberg gets another qualifying test.
Iceberg Broken — fires when price closes through by the break-distance threshold.
How to read it
Two reads, in order of conviction:
Active iceberg in front of price is your immediate liquidity wall. Faded iceberg the market keeps probing without breaking = strong demand-side or supply-side hidden order. Use as a context level — fade touches if your bias is reversal, expect continuation through if your bias is breakout.
Iceberg Broken alert is your highest-conviction directional event. A hidden order has been eaten through, meaning the side that was holding it has either pulled it or been exhausted — either way, the resistance / support is gone, and the move that follows is unencumbered by the absorbed liquidity.
Suggested settings
Defaults (2 minimum tests, 40-bar detection window, 0.5 ATR cluster tolerance, 0.75 wick/body ratio) are tuned for 5m–1H on liquid markets. For lower-timeframe scalping, lower the wick/body ratio to 0.5 and raise the volume multiplier to 1.5×. For higher-timeframe macro reads, raise minimum tests to 3 and widen the detection window to 100+ bars.
Originality
The implementation — the five-gate detection (wick + extremum + volume + rejection % + cluster tolerance), the ATR-cluster level-builder, the cool-palette glow layers, the post-test pulse animation, the break-distance lifecycle with archive, and the test-count badge rendering — is JOAT-original and tuned together. No third-party code reused. The hidden-liquidity / iceberg concept is well-known to tape readers; the detection pipeline here is built specifically for chart-based bar data without requiring L2 access.
Limitations
Pine indicators cannot read L2 order book data. Iceberg Detector infers iceberg presence from the visible tape footprint — long-wick rejection candles, clustered at a level, with above-average volume, all closing in the rejection direction. This is the accepted public-market inference pattern but it is by nature an inference, not a direct observation. The script can produce false positives on instruments with naturally wicky candles and false negatives on instruments where icebergs are filled too quickly to show as multi-bar tests. On low-volume instruments the volume gate may need to be raised to compensate.
—
Open source- The five-gate detection pipeline, the ATR-cluster level-builder, the post-test pulse compositor, and the lifecycle-with-archive state machine are proprietary. Free to use; behaviour is fully described above.
—
-made with passion by jackofalltrades
Indicator

Indicator

Strong Candlestick Patterns | ProjectSyndicateStrong Candlestick Patterns automatically detects, scores, and highlights 25 classic Japanese candlestick patterns using an objective, non-repainting engine built on the teachings of Steve Nison. It confirms every pattern on the bar close, grades each setup 0–10 for quality, draws it as a clean color-coded zone with a name label and ★ star rating, and surfaces the most recent signal on every timeframe through a non-intrusive multi-timeframe scanner — turning subjective candle-reading into a quantifiable, repeatable process.
🕯️ 25-Pattern Detection — recognizes the full Nison family from raw geometry: Hammer, Hanging Man, Inverted Hammer, Shooting Star, Dragonfly / Gravestone / Long-Legged Doji, Bullish / Bearish Marubozu, Bullish / Bearish Engulfing, Bullish / Bearish Harami, Piercing Line, Dark Cloud Cover, Tweezer Top / Bottom, Bullish / Bearish Windows (gaps), Morning Star, Evening Star, Three White Soldiers, Three Black Crows, and Rising / Falling Three Methods.
🔒 Close-Confirmed, Non-Repainting — patterns are evaluated on confirmed candles only; the live bar waits for its close before committing, so signals, zones, and labels are stable and never redrawn after the fact.
⭐ 0–10 Quality Scoring — every setup is graded by blending five factors Nison stresses: textbook shape fit (40%), candle significance vs ATR (22%), trend-context strength (18%), volume confirmation (12%), and EMA confluence (8%). The result is shown as a ★ star meter with a numeric score and a WEAK / MODERATE / STRONG / ELITE tier, so you can instantly gauge conviction and filter for only the best.
🧭 Trend-Context Gating — reversal patterns fire only counter-trend and continuation patterns only with-trend (toggleable), enforcing the core rule that a pattern is meaningless without the right preceding trend.
🎨 Direction-Matched Zones & Labels — each pattern is boxed as a blue (bullish), orange-red (bearish), or gray (neutral) zone spanning its candles, with a clean name label and rating placed above bearish setups and below bullish ones for instant, clutter-free read.
📡 Multi-Timeframe Scanner Row — a non-repainting top dashboard shows the symbol plus eight fully configurable timeframes (M15 → D1 by default), each displaying the latest pattern and its bars-ago count, with fresh signals highlighted so you can spot multi-timeframe alignment at a glance.
✅ Advanced Quality-Control Filters — strong-only mode (default: ELITE 8+), direction filter, ATR-based minimum candle-size gate, per-pattern shape tolerances (doji body %, shadow multiple, engulfing/tweezer/star ratios), minimum bars between signals, and individual on/off toggles for all twelve pattern groups eliminate noise and over-signaling.
🔔 Comprehensive Alerts — a single rich alert() message (direction, pattern name, 0–10 score, symbol, timeframe, close) for automation, plus three individually selectable named conditions: Bullish Pattern, Bearish Pattern, and Elite Pattern (8+).
🔧 Fully Customizable — control trend EMA and lookback, volume average, zone padding and transparency, bullish/bearish/neutral colors, label and scanner text sizes, scanner position, and the per-timeframe set.
🎯 Why this is unique: Standard candlestick tools simply paint a name on a candle with no context or grading. This is an objective, fully-gated, non-repainting engine that recognizes 25 patterns from raw OHLC geometry, confirms each on the close, validates it against trend context and volume, grades its quality 0–10, and tracks it across eight timeframes — so you act only on the highest-conviction setups instead of every random wick.
🚀 Apply to Gold (XAUUSD), Forex, Crypto, Indices, and equities on any timeframe. The ATR-based, self-scaling logic adapts from M5 scalping to H4/Daily swing trading.
🎯 How to use this? Favor higher-star (STRONG/ELITE) setups that align with the higher-timeframe trend shown in the scanner row. Use the strong-only threshold to keep the chart sparse and focus on quality; loosen the shape tolerances if a pattern fires too rarely on a given asset, or tighten them to reduce noise.
⚠️ IMPORTANT NOTICE: This indicator identifies quality-graded candlestick signals; it should NOT be used as a standalone entry trigger. Always combine it with your own trading strategy, price-action analysis, key support/resistance levels, and sound risk management to confirm setups. Indicator

Strong FU Candle | ProjectSyndicateSTRONG FU CANDLE
Strong FU Candle marks the exact bars where the market sweeps liquidity and snaps back — the classic "follow-up" reversal candle that traps breakout traders and ignites the move the other way. It scans every bar for a liquidity grab beyond the prior candle's wick followed by an engulfing close back through it, grades each setup on candle anatomy, projects a full Entry / Stop / TP1-TP2-TP3 trade plan with live fill tracking, and stores the resulting liquidity zones so you can see — on the same chart — which FU types actually held and which failed.
🎯 0–10 QUALITY SCORE
Each FU candle earns a live grade from five sign-stable anatomy factors on the setup bar itself:body dominance — body-to-range ratio (a real FU closes near its extreme, not in the middle).Opposite wick — penalises any pullback from the close back into the body, since a clean FU has almost no opposite wick.Grab wick — rewards a meaningful sweep wick but punishes the oversized "all wick, no body" candle.Close position — how far into the bar's range the close lands (≥90% of range = full credit).Size & participation — bonus when the candle is normal-sized relative to ATR (not a micro-bar, not a freak spike) and volume is at or above its average.
🏷️ CALIBRATED TIERS — C / B / A / S
The raw 0–10 score maps to four tiers, calibrated on 8 H1 FX pairs (2024–2026) at 1:1 RR: C≈52%, B≈53%, A≈55%, S≈59% win rate (vs 54.6% unfiltered). Raise the minimum tier toward A/S for higher win rate and fewer signals; drop to C for maximum signal flow.
🕯️ FULL vs ATTEMPTED (ATT) FU
Full FU = close fully engulfs the prior candle's wick. Attempted FU = close engulfs the prior candle's body but not its wick — weaker, but often a valid early reversal. ATT can be toggled off entirely.
🧹 FILTERS
EMA filter (bull FUs only above EMA, bear FUs only below — keeps you trading with short-term momentum), rejection filter (drops candles where the opposite-side wick is larger than the body), fractal filter (requires the FU to actually sweep a recent swing high/low), and a configurable point-size system so every threshold — grab size, engulf depth, min/max body, min range — scales correctly across gold, FX, indices and crypto.
🧊 LIVE LIQUIDITY ZONES
Every qualifying FU is drawn as a zone anchored to the bar that created it, sourced from either the grab wick (default) or the full FU candle range, with an optional 50% midline. Zones never drift — they sit on the price action that formed them. A label above each zone shows timeframe, side, tier, score, BIW marker, and the live win rate of that side on this timeframe.
📜 HISTORIC ZONES & WINNER LEVELS
Old zones fade into a historic layer, colour-coded by outcome (green = TP1 hit, red = stopped out). Option to show winners only and clean the chart of losses. For the most recent N winners the indicator can re-draw the original Entry, Stop and TP1/TP2/TP3 lines on the historic zone, so you can visually audit exactly how the playbook performed in past conditions.
📐 PROJECTED TRADE PLAN — ENTRY / SL / TP1-TP2-TP3
Every new FU prints a complete trade plan on the chart: Entry (at 50% body, 50% wick, or FU close — your pick), Stop with adjustable buffer beyond the candle, and TP1 / TP2 / TP3 at user-defined R multiples. Reversal mode treats bullish FU as a BUY; Fade mode flips it.
🎛️ LIVE TRADE PANEL
A side panel tracks the latest setup in real time: direction, exact Entry / SL / TP1 / TP2 / TP3 prices, and a live status line — PENDING → FILLED → TP1 hit → TP2 hit → TP3 HIT, or STOPPED OUT, or NO FILL (missed) if price ran without filling.
📊 STATS DASHBOARD
A separate leaderboard tracks per-side performance on the current timeframe and current tier filter: Win Rate, Probability of Touch (fill rate), Expected Value in R, configured R:R, average bars to win, average bars to loss, and a W / L • n • avg-score line. BUY and SELL columns are tracked independently so you can see if one side is dominating.
🌐 MULTI-TIMEFRAME OVERLAY
Up to three higher timeframes can be overlaid as drawn-only zones (15m / 1H / 4H by default, any TF), so a 5m chart can show 1H FU zones still in play. Higher-TF zones are draw-only and excluded from current-TF stats to keep the dashboard honest.
🔔 NATIVE ALERTS
Dedicated alerts for a BUY setup formed, a SELL setup formed, any bullish/bearish FU on any active TF, price touching an FU zone (entry filled), and price approaching a zone within a user-set tick proximity.
🔧 FULLY ADJUSTABLE
Detection thresholds in points (grab size, engulf depth, min range, min/max body); ATT FU on/off; EMA / rejection / fractal filter toggles and lengths; volume baseline length; minimum tier and minimum numeric score; direction logic (Reversal vs Fade); entry mode and stop buffer; TP1/TP2/TP3 multiples; zone source (grab wick vs full range), max active zones per side, historic cap, transparencies, midline on/off; full colour theme (bull, bear, win, loss, touched border); candle-colour toggle; label size; dashboard position and text size; up to three MTF channels; alert proximity.
🚀 Works on gold (XAUUSD), silver, forex, crypto and indices, on any timeframe.
────────────────────────
HOW TO TRADE IT — TWO APPROACHES
The tier chooses the playbook. High-tier FUs tend to reverse cleanly; low-tier FUs are coin flips that need extra confluence.
TRADE THE FU — reversal (A / S tier, score ≥ 6.5)
Use when a high-tier FU prints — calibrated to win ~55–59% at 1:1 with positive expectancy.
Wait for the FU to close and the trade plan to draw — Entry, SL, TP1/TP2/TP3.
Take the entry at your chosen level (50% body is the default — gives a pullback fill).
Stop just past the FU extreme with the buffer.
Scale at TP1, trail or hold for TP2 / TP3.
The trade panel tells you live whether you are PENDING, FILLED, in profit, or stopped.
FILTER & WAIT — selectivity (C / B tier)
Use C and B tier as context, not standalone signals — at the unfiltered ~54% baseline they need help.
Drop to C/B only when stacked with: a strong S/R level, an HTF FU in the same direction, an EMA reclaim/loss, or a fractal sweep.
Otherwise raise the minimum tier to A or S and accept fewer signals for a higher hit rate.
Use the live dashboard — if BUY WR on this TF is sitting at 45% over a decent n, that's a signal to either flip to Fade mode or sit out longs entirely on this instrument.
Rule of thumb: S/A tier → take the trade as drawn. B/C tier → needs confluence, or skip. Watch the live dashboard — let the actual win rate on this instrument tell you which side is paying.
────────────────────────
⚠️ This tool identifies high-probability liquidity-grab reversal candles and frames a full trade plan around each one. It is NOT a standalone buy/sell signal. Always combine it with your own strategy, price-action analysis and risk management to confirm setups. Past statistical behaviour does not guarantee future results. Indicator

Indicator

Normalized Candles RSI [Jamallo]🔹 Intro
The Normalized Candles RSI is a quantitative momentum and volatility indicator designed to transform raw, trending price action into a stationary 0-100 oscillator. By passing price data through a Fractional Differencing engine and a dynamic Z-Score normalization layer, it strips away market drift and presents pure, bounded candlestick momentum. This stationary price structure is then directly overlaid with a traditional RSI and Divergence engine for highly confluent signals.
🔹 Break down
Fractional Differencing (FFD): Transforms non-stationary price data into a stationary series while retaining deep historical memory (controlled by the "d" parameter). This prevents the data loss associated with standard period-to-period differencing.
Normalization Engine: Applies a rolling Z-Score to the differenced data, which is then passed through a Sigmoid compression function. This mathematically forces the resulting candlesticks into a strict 0-100 range without repainting.
RSI & Divergence Engine: Overlays a classic RSI with optional smoothing moving averages and Bollinger Bands. Built-in regular bullish and bearish divergence detection algorithms automatically scan for momentum exhaustion relative to the price.
🔹 Visual Guide: Indicator Anatomy
The true power of this indicator lies in its visual mapping. As shown in the snapshot, the indicator pane perfectly merges the structure of raw price action directly with a classic RSI oscillator.
1:1 Structural Mapping: Notice how the normalized candles in the middle pane mirror the raw price action in the main chart exactly (highlighted by the "1:1 with overlay candle sticks" annotation). You get the exact same highs, lows, and structural candlestick patterns, but stripped of drift and mathematically squashed into a stationary box.
Normalized Candles + Standard RSI: If you look at a standard RSI (bottom pane), you only see a floating line. By overlaying the normalized candles (middle pane), you can see exactly how the physical candlestick bodies and wicks behave relative to the RSI's 0-100 bounds and its smoothing moving average (the yellow line).
Actionable Context: When a localized top or bottom forms, you aren't just guessing based on a purple line peaking. You can see the actual candlestick structure exhausting itself, forming wicks and reversal patterns right against the upper (70+) or lower (30-) overextended boundaries.
🔹 Settings Parameters
- Diff Order (d) (0.01 - 0.99): The fractional differencing order. Higher values make the series more stationary but remove more historical memory.
- Z-Score Lookback: The rolling window used to calculate the mean and standard deviation for the 0-100 normalization engine.
- Sigmoid Compression Scale: Controls the elasticity of the 0-100 bounds. A higher value results in softer compression at the extremes, while a lower value makes it compress faster.
- RSI Settings & Smoothing: Standard parameters for the RSI length, smoothing moving averages (SMA, EMA, VWMA, etc.), Bollinger Bands, and the divergence lookback constraints.
🔹 Credits & Acknowledgements
The core RSI and Divergence engine utilized in this script is adapted from PulseWire's built-in Relative Strength Index indicator code. Indicator

Phantom ChartPhantom Chart — Overlay Any Chart Style While Keeping Real Prices
Phantom Chart draws an alternative chart visualization on top of your existing chart — without changing the real prices your other indicators depend on. Most indicators and drawing tools read the chart's Open, High, Low, and Close, so switching your base chart to Heikin Ashi or another modified style quietly feeds them altered values instead of real ones.
Phantom Chart solves this: keep your base chart on Bars or standard Candles so everything else still reads true prices, then let Phantom Chart render whatever view you actually want to look at on top — Heikin Ashi, a clean line, an area, a baseline, a histogram, and more. You get the visual you read best, and your stops, targets, Fib tools, and other indicators all keep working off real prices.
Available Chart Styles
Candles
Bars
Heikin Ashi
Line
Step Line
Area
Baseline
Line with Markers
Columns
Histogram
Heikin Ashi Enhancements
HA is the headline use, so it gets dedicated tools:
Double Smooth — runs the Heikin Ashi calculation a second time for an even cleaner trend read with almost no noise. Flips are rarer but more reliable.
Strong Candles — highlights candles with no lower wick (strong bullish) or no upper wick (strong bearish), the candles that mark the heart of a trending move.
Flip Markers — a triangle whenever the candle color changes direction, so you never miss a turn.
Streak Counter — a live count of consecutive same-direction candles for gauging trend strength at a glance.
Candle Patterns (Candles / Bars)
Inside Bars — marks compression bars sitting fully inside the prior bar's range, which often precede an expansion.
Engulfing — marks bars whose body fully engulfs the previous bar in the opposite direction. Bull engulfing below the bar, bear engulfing above.
Baseline Tools
Crossover Markers — triangles at each cross of the baseline reference, the core baseline signal.
Fill To Baseline — shades green above the baseline, red below, so price position is obvious instantly.
Coloring Modes
Direction — each bar colored by close versus its own open.
Momentum — each bar colored by close versus the previous close, regardless of the bar's own direction.
Trend — colored by whether price is above or below its moving average, with an optional trend line.
Single Color — one color everywhere.
More Controls
Multi-Timeframe — render any higher timeframe on your chart, with an optional setting to show only fully-closed bars.
Volume-Weighted Opacity — fades low-volume bars and keeps high-volume bars solid so the heavy bars stand out.
Source Smoothing — optional moving average on the line-style sources.
Inverse Chart — flip the chart vertically for an objectivity check: would you take this trade if it moved the other way?
OHLC Labels — optional last-bar price labels.
Fully customizable colors, widths, wick visibility, and label styling throughout. Every enhancement is an independent toggle, off-by-default where it adds clutter.
Recommended Setup
For accurate visuals, keep your base chart on a standard type (Candles or Bars) and use Phantom Chart for the alternative view. If your base chart itself is set to Heikin Ashi or another transformed type, the overlay will reflect those transformed values rather than real prices — a built-in warning label appears when this is detected.
Tip
You can add Phantom Chart more than once to layer multiple views — for example a Heikin Ashi read alongside a clean line of real closes — each instance with its own settings.
This script is open-source under the Mozilla Public License 2.0.
Indicator

Candle Pressure Flip Engine [trade_w_samet]🎯 Candle Pressure Flip Engine
Candle Pressure Flip Engine is a professional candle-pressure reversal and trade-visualization indicator designed to help traders study potential pressure-shift conditions directly on the price chart.
This script combines:
🔥 candle pressure analysis
⚡ exhaustion move detection
🕯️ rejection wick logic
📍 close-location pressure
📊 volume burst confirmation
🧭 RSI momentum flip confirmation
🧠 Auto Best optimizer logic
🎯 target / risk projection boxes
🏷️ BULLISH / BEARISH flip labels
🏁 WIN / LOSS result stamps
🩸 Crimson Spine + Echo + Fill visual system
🚨 professional alert messages
🎨 multiple visual themes
📦 historical target/risk visual tracking
The goal of Candle Pressure Flip Engine is not to predict the future or provide guaranteed buy/sell instructions.
Its purpose is to help users visually study:
⚡ exhaustion after aggressive moves
🕯️ candle rejection behavior
📍 where price closes inside the candle range
📊 whether volume expanded during the reaction
🧭 whether RSI momentum started turning
🎯 projected target and risk areas
🏁 visual target/risk outcomes
🩸 price-following pressure visuals
🚨 alert-based chart monitoring
Candle Pressure Flip Engine should be treated as a structured chart-analysis and educational decision-support tool.
It is not financial advice.
It is not an automated trading system.
It does not guarantee profitable results.
It does not place broker orders.
It does not remove the need for personal analysis, risk management, or trade validation.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, Candle Pressure Flip Engine does the following:
🔥 Measures the size of the prior price move using ATR-based exhaustion logic.
🕯️ Checks whether the signal candle shows meaningful rejection wick pressure.
📍 Evaluates where the candle closes inside its own range.
📊 Optionally confirms the move with volume expansion.
🧭 Optionally confirms momentum change using RSI behavior.
🧠 Runs a background optimizer to compare internal setup combinations.
🎯 Draws a single target zone and risk zone after confirmed signals.
📦 Keeps historical target/risk boxes on the chart.
🏁 Tracks whether target or risk was reached first.
🏷️ Prints clean BULLISH FLIP ▲ and BEARISH FLIP ▼ labels.
🩸 Displays a premium Crimson Spine + Echo + Fill visual trail around price.
🚨 Provides professional human-readable and JSON-style dynamic alerts.
This makes the script more than a simple signal-label indicator.
It is designed as a complete candle-pressure review environment that combines candle behavior, exhaustion context, rejection, momentum, volume, visual planning, and alerts.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
The core idea behind Candle Pressure Flip Engine is that a potential reversal should not be judged from a single isolated condition.
A candle can look strong, but without context it may not mean much.
For that reason, this script combines several layers:
🔥 exhaustion move context
🕯️ rejection wick behavior
📍 close-position pressure
📊 volume burst confirmation
🧭 RSI momentum turn
🧠 optimizer-based internal comparison
🎯 target/risk visualization
🩸 visual price-following pressure trail
The script does not attempt to catch every reversal.
It attempts to highlight moments where the internal candle-pressure model detects a possible shift after price has already moved aggressively in one direction.
The purpose is not to create more signals.
The purpose is to make potential pressure-flip conditions easier to identify, review, and compare on the chart.
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS SCRIPT IS NOT A SIMPLE BUY/SELL INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine is not intended to behave like a basic “buy here / sell here” script.
It is built as a structured workflow:
Exhaustion Move
→ Candle Rejection
→ Close Pressure
→ Volume Burst
→ Momentum Flip
→ Score Requirement
→ Optional Auto Best Selection
→ BULLISH / BEARISH Flip Label
→ Target / Risk Projection
→ Result Tracking
→ Crimson Spine Visual Context
→ Alerts
Each part has a specific role.
🔥 The exhaustion engine checks whether price has moved enough before a flip is considered.
🕯️ The wick engine checks whether the candle rejected a level strongly enough.
📍 The close-pressure engine checks where the candle closed inside its range.
📊 The volume module checks whether the signal candle has volume expansion.
🧭 The momentum module checks whether RSI is turning in the expected direction.
🧠 The optimizer compares internal parameter combinations in the background.
🎯 The target/risk module draws visual planning zones.
🩸 The Crimson Spine module adds a premium price-following visual layer.
🚨 The alert module helps monitor signals and results without constantly watching the chart.
This makes the script a complete visual review framework, not a one-condition signal tool.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
🔥 EXHAUSTION MOVE ENGINE
The script first checks whether price has made a meaningful move over a selected lookback period.
This is done using:
• Exhaustion Lookback
• Minimum Exhaustion Move ATR
• Minimum Directional Bars
• ATR-based move measurement
A bullish flip can only appear after bearish exhaustion conditions are detected.
A bearish flip can only appear after bullish exhaustion conditions are detected.
This means the script is designed to look for possible pressure flips after directional movement, not random candles in the middle of neutral price action.
For bullish setups, the script looks for prior downside pressure.
For bearish setups, the script looks for prior upside pressure.
This creates the first layer of context.
━━━━━━━━━━━━━━━━━━━━━━
🕯️ REJECTION WICK ENGINE
━━━━━━━━━━━━━━━━━━━━━━
After exhaustion is detected, the script checks the signal candle itself.
For a bullish flip, the script evaluates the lower wick.
For a bearish flip, the script evaluates the upper wick.
The purpose is to identify whether price rejected one side of the candle range.
The main setting is:
Minimum Rejection Wick %
A larger rejection wick requirement makes the script more selective.
A smaller rejection wick requirement allows more potential signals.
The wick condition does not guarantee that price will reverse.
It only means that the candle showed rejection behavior according to the script’s internal model.
━━━━━━━━━━━━━━━━━━━━━━
📍 CLOSE-PRESSURE ENGINE
━━━━━━━━━━━━━━━━━━━━━━
The script also evaluates where the candle closes inside its own range.
This is important because a rejection wick alone is not always enough.
For bullish flips, the script prefers candles that close closer to the upper part of the candle range.
For bearish flips, the script prefers candles that close closer to the lower part of the candle range.
This is controlled by:
Close Pressure Threshold %
Example:
If the threshold is 65%, a bullish candle must close relatively high in its candle range.
For bearish flips, the inverse logic is used.
This helps the script avoid weak candles that reject but fail to close with enough pressure.
━━━━━━━━━━━━━━━━━━━━━━
📏 BODY PRESSURE ENGINE
━━━━━━━━━━━━━━━━━━━━━━
The script also checks the body size of the signal candle.
This is controlled by:
Minimum Reversal Body %
The candle body is measured as a percentage of the full candle range.
This helps avoid extremely weak candles where the wick may be large but the body does not show enough directional pressure.
A higher value makes the script more selective.
A lower value allows more signals.
This does not mean a larger candle body is always better.
It simply gives the model a minimum candle-strength requirement.
━━━━━━━━━━━━━━━━━━━━━━
📊 VOLUME BURST CONFIRMATION
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine includes an optional Volume Burst filter.
When enabled, the script compares current volume to its moving average.
The main settings are:
📊 Use Volume Burst
📊 Volume MA Length
📊 Minimum Volume Multiplier
Example:
A Minimum Volume Multiplier of 1.10 means the current volume must be at least 10% above its average.
The purpose is to check whether the pressure-flip candle appeared with above-average participation.
This can be useful on markets where volume data is meaningful.
Important note:
Some symbols, brokers, CFDs, forex feeds, or synthetic markets may have limited or less reliable volume data.
Users can disable this filter if volume is not useful for their selected market.
━━━━━━━━━━━━━━━━━━━━━━
🧭 RSI MOMENTUM FLIP CONFIRMATION
━━━━━━━━━━━━━━━━━━━━━━
The script includes an optional RSI Momentum Flip module.
This does not use RSI as a classic overbought/oversold signal.
Instead, the script checks whether RSI is turning in the expected direction.
Main settings:
🧭 Use Momentum Flip
🧭 RSI Length
🧭 RSI Turn Lookback
🧭 Bullish RSI Max After Flip
🧭 Bearish RSI Min After Flip
For bullish flips, RSI should start turning upward without already being too extended.
For bearish flips, RSI should start turning downward without already being too extended.
This is designed to help filter signals where candle pressure appears but momentum has not started shifting yet.
RSI confirmation is only one part of the model.
It does not guarantee future price movement.
━━━━━━━━━━━━━━━━━━━━━━
🧠 AUTO BEST OPTIMIZER
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine includes a background optimizer.
The optimizer compares controlled internal combinations of:
• Exhaustion move requirement
• Rejection wick requirement
• Signal score requirement
• Risk/reward target
The optimizer can be set to:
Light 27
Full 81
Light mode tests fewer combinations.
Full mode tests a deeper combination set.
The script can automatically use the best internal combination after enough closed virtual outcomes are collected.
This is controlled by:
🧠 Use Background Optimizer
🧠 Auto Use Best Optimizer Combo
🧠 Optimizer Grid Depth
🧠 Best Combination Ranking
🧠 Minimum Trades For Best Combo
Important note:
The optimizer is an internal visual-analysis feature.
It is not the same as PulseWire Strategy Tester.
It does not include broker execution, spread, slippage, commissions, order delay, partial fills, or real trade management.
It should be treated as a chart-based adaptive review tool, not as a guarantee of improved future performance.
━━━━━━━━━━━━━━━━━━━━━━
🎯 TARGET / RISK VISUAL SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
When a valid candle pressure flip appears, the script can draw a projected trade plan.
The chart can show:
🎯 Target Zone
⚠️ Risk Zone
📍 Entry Zone
📈 Target line
🛑 Risk line
🏁 WIN / LOSS result stamp
The system uses a single target model.
There are no TP1 / TP2 / TP3 levels in this script.
The default target is based on the selected Risk Reward value.
Default:
Target Risk Reward = 2.0R
The risk distance can be calculated using:
Signal Wick
ATR
Hybrid
The current default risk mode is ATR.
The ATR multiplier used in the model is fixed internally at 4.0.
This creates a consistent risk projection structure.
Important note:
The target and risk boxes are visual projections only.
They are not broker orders.
They do not execute trades.
They do not guarantee that the displayed target or risk will be reached in a profitable way.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ RISK MODE EXPLANATION
━━━━━━━━━━━━━━━━━━━━━━
The script includes three risk modes:
Signal Wick
ATR
Hybrid
Signal Wick mode uses the candle wick area as the risk reference.
ATR mode uses ATR-based distance.
Hybrid mode uses a wider protective logic between wick-based and ATR-based risk.
The purpose of these modes is to give users flexibility in how projected risk zones are visually drawn.
Risk settings affect the chart projection.
They should not be treated as trade recommendations.
Users should always apply their own risk management and validation.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ SAME-CANDLE TARGET/RISK HANDLING
━━━━━━━━━━━━━━━━━━━━━━
If both target and risk are touched on the same candle, the true intrabar sequence cannot be known from standard OHLC chart data.
The script includes a setting for this situation:
If Target and Risk Hit Same Bar
Available options:
SL First
TP First
The default is SL First.
This is a conservative assumption.
It helps avoid overly optimistic historical visual results when the true intrabar order is unknown.
Users should understand that this is still an assumption based on available bar data.
━━━━━━━━━━━━━━━━━━━━━━
🏁 RESULT TRACKING
━━━━━━━━━━━━━━━━━━━━━━
The script can track whether a projected setup reaches target or risk first.
Possible result labels:
WIN | TARGET HIT
LOSS | RISK HIT
A WIN label means the projected target zone was reached first according to the script’s bar-based logic.
A LOSS label means the projected risk zone was reached first according to the script’s bar-based logic.
These labels are visual summaries only.
They do not represent broker execution.
They do not include slippage, spread, commissions, order delay, partial fills, liquidity issues, or real entry conditions.
━━━━━━━━━━━━━━━━━━━━━━
🗂️ HISTORICAL TARGET / RISK BOXES
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine can keep previous target and risk boxes on the chart.
This helps users visually review past projected setups.
The script includes a maximum historical trade-plan limit.
This is important because PulseWire has object limits.
Historical visuals may include:
🎯 previous target boxes
⚠️ previous risk boxes
📍 previous entry lines
🏁 previous result labels
🏷️ previous target/risk price tags
Users can reduce the historical object limit if the chart becomes crowded or performance slows down.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ SIGNAL LABELS
━━━━━━━━━━━━━━━━━━━━━━
The script displays professional signal labels:
BULLISH FLIP ▲
BEARISH FLIP ▼
A BULLISH FLIP label appears when the script detects a possible bullish candle-pressure shift.
A BEARISH FLIP label appears when the script detects a possible bearish candle-pressure shift.
The arrow icon is included to make direction easier to identify visually.
These labels do not mean the future outcome is guaranteed.
They only mean the script’s internal conditions aligned at that candle.
━━━━━━━━━━━━━━━━━━━━━━
🩸 CRIMSON SPINE + ECHO + FILL
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine includes a premium visual system called:
Crimson Spine + Echo + Fill
This is not a signal by itself.
It is a visual price-following layer designed to create a clean pressure-aura effect around price.
The system includes:
🩸 one central Crimson Spine
🩸 multiple upper echo layers
🩸 multiple lower echo layers
🩸 soft crimson fill clouds
🩸 optional pulse effect
🩸 adaptive spread based on internal pressure intensity
The purpose of the Crimson Spine system is to enhance chart readability and create a premium visual structure around price.
It can help users visually track price flow, pressure compression, and expansion.
Important note:
The Crimson Spine visual is not a standalone entry signal.
It should not be used by itself as a buy/sell system.
It is a supporting visual layer.
━━━━━━━━━━━━━━━━━━━━━━
🎨 VISUAL THEME SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes multiple visual themes:
Midnight Pro
Ice Minimal
Black Gold
Red Carbon
The theme system affects:
🎨 BULLISH / BEARISH label colors
🎨 Target zone colors
🎨 Risk zone colors
🎨 Result stamp colors
🎨 Entry / target / risk tags
🎨 Candle highlight color
🎨 Glow effects
The script uses a modern chart-first visual style.
It does not include a classic dashboard.
It does not include a large statistics panel.
The goal is to keep the chart clean while still providing strong visual feedback.
━━━━━━━━━━━━━━━━━━━━━━
🚨 PROFESSIONAL ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine includes two alert layers:
1. Standard alertcondition() events
2. Dynamic alert() messages
Standard alert conditions are included for compatibility with PulseWire’s normal alert interface.
Dynamic alerts can include more detailed information such as:
🚨 symbol
🚨 timeframe
🚨 direction
🚨 score
🚨 entry
🚨 risk
🚨 target
🚨 RR
🚨 Auto Best state
🚨 result
🚨 Net R
The alert system can be configured using:
🚨 Enable Dynamic Alerts
🚨 Alert Bullish Flips
🚨 Alert Bearish Flips
🚨 Alert Trade Results
🚨 Alert Payload Format
🚨 Include Entry / Risk / Target
🚨 Include Auto Best State
🚨 Alert Tag
Available payload formats:
Human
JSON
Human format is easier to read.
JSON format is more suitable for webhook workflows.
Important note:
Alerts are monitoring tools only.
They are not trade execution instructions.
They do not place orders.
Users must confirm all alerts with their own analysis and risk management.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
A practical alert workflow:
1. Add Candle Pressure Flip Engine to your chart.
2. Open PulseWire’s alert window.
3. Select the indicator as the alert condition.
4. Choose the desired alert type.
5. For dynamic alert() messages, use “Any alert() function call” if needed.
6. Select alert frequency according to your preference.
7. Use alerts for monitoring only.
8. Confirm each alert manually before making any trading decision.
Alerts may behave differently depending on chart timeframe, symbol, session, and real-time bar updates.
━━━━━━━━━━━━━━━━━━━━━━
🧪 HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
A practical workflow:
1. Add Candle Pressure Flip Engine to your chart.
2. Start with the default settings.
3. Review whether the chart is trending, ranging, or highly volatile.
4. Wait for a BULLISH FLIP ▲ or BEARISH FLIP ▼ label.
5. Review the candle that created the signal.
6. Check whether the move before the signal was extended.
7. Check whether the rejection wick is meaningful.
8. Check whether the candle closed with pressure.
9. Review the target and risk boxes.
10. Review the Crimson Spine visual context.
11. Use alerts if you want automatic monitoring.
12. Validate the signal with your own market structure, liquidity, trend, session, and risk-management rules.
This indicator is best used as a structured visual review tool.
It should not be used as a blind execution system.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
⚙️ General
Signal Mode
Controls how selective the signal engine is.
Available modes:
Aggressive
Balanced
Conservative
Aggressive allows more signals.
Balanced is the default middle-ground profile.
Conservative requires stricter conditions.
Only One Active Trade
When enabled, the script waits until the active projection reaches target or risk before allowing a new signal.
Signal Cooldown Bars
Controls how many bars must pass between confirmed signals.
Show BULLISH / BEARISH Labels
Shows or hides the main signal labels.
Max Signal Labels
Limits how many signal labels remain visible on the chart.
━━━━━━━━━━━━━━━━━━━━━━
🔥 Candle Pressure Flip Engine
Exhaustion Lookback
Defines how many bars are used to evaluate the prior aggressive move.
Minimum Exhaustion Move ATR
Defines how large the prior move must be, measured in ATR.
Minimum Directional Bars
Requires a minimum number of bars inside the lookback to support the exhaustion direction.
Minimum Reversal Body %
Controls the minimum candle body size of the signal candle.
Minimum Rejection Wick %
Controls the minimum rejection wick percentage.
Close Pressure Threshold %
Controls where the candle must close inside its range.
Minimum Signal Score
Defines the minimum internal score required for a signal.
━━━━━━━━━━━━━━━━━━━━━━
📊 Volume Burst
Use Volume Burst
Enables or disables volume confirmation.
Volume MA Length
Defines the moving average length used for volume comparison.
Minimum Volume Multiplier
Defines how much larger current volume must be compared to average volume.
━━━━━━━━━━━━━━━━━━━━━━
🧭 Momentum Flip
Use Momentum Flip
Enables or disables RSI momentum confirmation.
RSI Length
Defines the RSI calculation length.
RSI Turn Lookback
Defines how many bars back RSI is compared.
Bullish RSI Max After Flip
Prevents bullish signals from appearing when RSI is already too extended upward.
Bearish RSI Min After Flip
Prevents bearish signals from appearing when RSI is already too extended downward.
━━━━━━━━━━━━━━━━━━━━━━
🎯 Target / Risk Result Engine
Show Target / Risk Boxes
Shows projected target and risk zones.
Show Entry / Risk / Target Lines
Shows entry, risk, and target lines.
Show Only Last Trade Plan
Removes older visual trade plans and keeps only the newest one.
Keep Historical Target / Risk Boxes
Keeps previous target/risk projections on the chart.
Max Historical Trade Plans
Controls the maximum number of historical visual plans.
Track Win / Loss Result
Enables visual result tracking.
Default Target Risk Reward
Defines the default projected RR value.
Risk Mode
Controls whether risk is based on signal wick, ATR, or hybrid logic.
ATR Length
Defines the ATR length used for risk calculations.
Risk Buffer Ticks
Adds a small tick buffer to wick-based risk calculations.
Trade Box Extend Bars
Controls how far target/risk boxes extend to the right.
If Target and Risk Hit Same Bar
Controls the same-candle assumption.
Max Result Stamps
Limits the number of WIN / LOSS result labels.
━━━━━━━━━━━━━━━━━━━━━━
🧠 Background Optimizer
Use Background Optimizer
Enables the internal optimizer engine.
Auto Use Best Optimizer Combo
Allows the script to automatically apply the best internal combination after enough closed virtual outcomes are collected.
Optimizer Grid Depth
Controls whether the optimizer uses Light 27 or Full 81 testing depth.
Best Combination Ranking
Controls whether combinations are ranked by wins first or win rate first.
Minimum Trades For Best Combo
Defines how many closed virtual trades are required before a combination can become eligible.
━━━━━━━━━━━━━━━━━━━━━━
🎨 Visual Pro Design
Visual Theme
Controls the main chart color theme.
Visual Intensity
Controls glow and line emphasis.
Label Size
Controls signal/result label size.
Target / Risk Box Transparency
Controls how transparent projected boxes appear.
Show Signal Glow
Shows or hides the signal candle glow.
Show WIN / LOSS Stamps
Shows or hides result labels.
Show Compact Price Tags
Shows or hides ENTRY ZONE, TARGET ZONE, and RISK ZONE tags.
Candle Highlight Mode
Controls candle coloring on signal/result bars.
Max Signal Glow Objects
Limits signal glow objects for chart performance.
━━━━━━━━━━━━━━━━━━━━━━
🚨 Professional Alerts
Enable Dynamic Alerts
Turns dynamic alert() messages on or off.
Alert Bullish Flips
Enables alerts for bullish flip signals.
Alert Bearish Flips
Enables alerts for bearish flip signals.
Alert Trade Results
Enables alerts for target/risk results.
Alert Payload Format
Choose Human or JSON.
Include Entry / Risk / Target
Adds projected price levels into alerts.
Include Auto Best State
Adds Auto Best status into signal alerts.
Alert Tag
Custom text tag included in alert messages.
━━━━━━━━━━━━━━━━━━━━━━
🩸 Crimson Spine + Echo
Show Crimson Spine System
Shows or hides the Crimson Spine visual layer.
Spine Source
Defines the source price used by the spine.
Spine EMA Length
Controls the central spine smoothing.
Echo Spacing ATR
Controls how far echo layers are spaced from the central spine.
Adaptive Echo Spread
Expands or compresses the echo cloud based on internal pressure intensity.
Spine Line Width
Controls line thickness.
Core Line Transparency
Controls the transparency of the central spine.
Echo Transparency Step
Controls how quickly outer echo layers become transparent.
Crimson Fill Transparency
Controls the fill cloud transparency.
Spine Pulse Effect
Adds a subtle pulsing visual effect.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine uses familiar concepts such as:
🔥 candle body analysis
🕯️ wick rejection
📍 close-location pressure
📊 volume comparison
🧭 RSI momentum
📏 ATR-based risk projection
🎯 target/risk boxes
🚨 alerts
These concepts are not unique by themselves.
The originality of the script lies in how they are organized into one workflow:
Exhaustion Move
→ Rejection Wick
→ Close Pressure
→ Volume Burst
→ Momentum Flip
→ Internal Score
→ Auto Best Optimizer
→ BULLISH / BEARISH Flip Label
→ Target / Risk Projection
→ Result Tracking
→ Crimson Spine Visual Layer
→ Professional Alerts
This structure is designed to give users a clearer way to review potential candle-pressure reversal conditions.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
The script’s behavior depends heavily on settings.
Signal frequency and visual output may change based on:
🎛️ signal mode
🔥 exhaustion lookback
📏 ATR settings
🕯️ wick requirement
📍 close-pressure threshold
📊 volume settings
🧭 RSI settings
🧠 optimizer settings
🎯 target/risk settings
⏱️ timeframe
📊 symbol volatility
🌐 market session
📚 available historical bars
A configuration that looks clean on one symbol may behave differently on another.
A setting that appears useful on one timeframe may not be useful on another.
Users should test the script on the exact markets and timeframes they personally study.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations:
❌ It does not guarantee profitable trades.
❌ It does not predict future price movement.
❌ It does not replace risk management.
❌ It does not execute trades.
❌ It does not place broker orders.
❌ It does not include broker slippage.
❌ It does not include commissions.
❌ It does not include spreads.
❌ It does not include order delay.
❌ It does not include partial fills.
❌ It uses bar-based chart data.
❌ Same-candle target/risk order cannot be known from standard OHLC data.
❌ Internal optimizer results are not official Strategy Tester results.
❌ Target/risk boxes are visual projections only.
❌ Result labels are visual outcomes only.
❌ Crimson Spine visuals are not standalone signals.
❌ Alerts are monitoring tools only.
❌ Historical behavior does not ensure future behavior.
For these reasons, Candle Pressure Flip Engine should be used as an educational decision-support and chart-analysis tool, not as a standalone trading strategy.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
✅ study candle-pressure behavior
✅ study reversal conditions after extended moves
✅ want structured candle rejection confirmation
✅ want volume and momentum context
✅ want clean target/risk visual planning
✅ want historical visual projection review
✅ want premium chart visuals without a large dashboard
✅ want alert-based monitoring
✅ want a structured educational analysis tool
✅ prefer chart-first visual design
It may be less suitable for users who:
❌ want guaranteed buy/sell signals
❌ want a fully automated trading bot
❌ do not use technical analysis
❌ do not want chart visuals
❌ expect one setting to work on every market
❌ expect alerts to execute trades
❌ expect visual projections to match broker execution
❌ want an indicator that replaces personal decision-making
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For cleaner review:
✅ Start with the default settings.
✅ Use Balanced mode first.
✅ Review signals together with market structure.
✅ Check whether the signal appears after a meaningful move.
✅ Review rejection wick quality.
✅ Review candle close position.
✅ Use target/risk boxes as visual planning tools only.
✅ Do not treat every signal as a trade.
✅ Review the Crimson Spine as a supporting visual layer, not as a standalone signal.
✅ Use alerts for monitoring, not automatic execution.
✅ Test the indicator on the symbols and timeframes you actually study.
✅ Combine the tool with independent analysis and risk management.
✅ Keep expectations realistic.
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine is published as an educational and visual market-analysis tool.
The purpose of this description is to explain:
✅ what the script does
✅ how the main logic works
✅ how signals are created
✅ how candle pressure is evaluated
✅ how target/risk boxes are drawn
✅ how result labels work
✅ what the Crimson Spine visual means
✅ what the alert system does
✅ what the limitations are
✅ how the indicator should and should not be used
The script is designed to support structured analysis.
It does not promise profitable results.
It does not remove market risk.
It does not execute trades.
It should not be used as a blind buy/sell system.
It is best used as a visual framework for reviewing candle-pressure reversal conditions, target/risk projection behavior, and alert-based monitoring.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
No indicator can guarantee future results.
Markets are uncertain, conditions change, and historical behavior does not ensure future performance.
Every user is responsible for their own analysis, validation, risk management, position sizing, and trading decisions.
The target/risk boxes, BULLISH / BEARISH labels, WIN / LOSS result stamps, Crimson Spine visuals, optimizer behavior, and alerts are visual analysis tools only.
Use this script as a structured decision-support and visual review framework, not as a promise of profitability.
Indicator

Candle Engine Educativecandle education engine is an educational visual tool designed to help traders study normal candles, heikin ashi candle behavior, reversal candles, and multi-candle pattern sequences directly on the chart.
this script is for education and market study only. it is not financial advice, not a trading strategy, not a signal service, and not a recommendation to buy or sell any asset. the goal is to help users understand candle structure, candle context, and pattern behavior. every label, panel note, score, and alert should be used as a learning reference only.
what this tool does
this indicator is built around three main study areas:
1. normal candle study
the normal candle engine reads standard chart candles and identifies candle structures such as doji, marubozu, engulfing candles, inside bars, hammers, shooting stars, tweezer tops, tweezer bottoms, rejection candles, sweep candles, displacement candles, imbalance candles, exhaustion candles, wide range candles, and compression candles.
this part is designed to be used on a normal candlestick chart.
2. heikin ashi candle study
the heikin ashi engine studies smoothed heikin ashi candle behavior. it can identify strong ha candles, weak ha candles, ha doji candles, ha continuation, ha pullback, ha acceleration, ha color flip, ha exhaustion, ha weakening, and ha reversal conditions.
for best learning, switch your chart to heikin ashi candles when studying the ha sections. this helps beginners compare the script labels with the actual ha candle shape.
3. pattern sequence study
the pattern engine studies one-candle, two-candle, three-candle, four-candle, and five-candle formations. it includes classic and modern patterns such as morning star, evening star, engulfing patterns, harami patterns, piercing line, dark cloud cover, three inside up, three inside down, three outside up, three outside down, three white soldiers, three black crows, rising three methods, falling three methods, traps, breakouts, kickers, and breakaway patterns.
the purpose is not to predict the future. the purpose is to learn how candles combine into structure.
why candles matter
candles show the battle between buyers and sellers during a specific period.
a candle can teach several things:
* the body shows who controlled the open-to-close move
* the wick shows where price was rejected
* the close shows where control finished
* the range shows how much activity happened
* repeated candles show pressure, hesitation, exhaustion, or continuation
* patterns show how control changes across several candles
a candle is not automatically bullish or bearish in every situation. the same candle can have different meaning depending on where it appears. for example, a hammer after a strong drop can be a bullish rejection clue, but a hammer in the middle of a range can simply be noise. a doji is not a buy or sell signal by itself. it teaches indecision and requires confirmation.
how beginners should use this indicator
start slowly. do not activate everything at once.
recommended learning path:
step 1: study normal candles first
use a regular candlestick chart. enable the normal candle engine and a few simple labels such as doji, hammer, shooting star, engulfing, inside bar, rejection, and sweep.
focus on the candle body, wick, close location, and where the candle appears.
step 2: study reversal candles separately
enable the reversal candle module if you want to focus only on candle structures that may teach rejection, exhaustion, liquidity sweep, or control transfer.
this is useful for beginners because it separates reversal education from general candle noise.
step 3: switch to heikin ashi for ha study
when studying the ha module, switch the chart type to heikin ashi. the script calculates ha behavior internally, but visually switching the chart helps you understand why a candle is classified as strong, weak, reversal, exhaustion, or continuation.
heikin ashi is useful for learning trend rhythm, but it smooths price, so it should not replace normal candle study.
step 4: study ha reversal separately
the reversal ha module is designed to focus on ha color flips, ha weakening, ha exhaustion, and possible smoothed reversal behavior.
use it to learn when trend rhythm begins to slow, not as an automatic entry tool.
step 5: study pattern sequences
after learning single candles, enable the pattern engine. start with one-candle and two-candle patterns before studying complex three, four, or five-candle patterns.
multi-candle patterns are easier to understand when you ask:
* what did the first candle show?
* did the second candle confirm or reject it?
* did the final candle close with buyer or seller control?
* did the pattern happen near a meaningful level?
* did the pattern appear in trend, range, pullback, or exhaustion?
step 6: read the panels
the panels are designed as an educational journal. they show recent candle or pattern events with a short educational note. the notes explain what the candle teaches, not what you must trade.
main settings explained
candle engine
enable candle engine turns the normal candle module on or off.
show candle type on chart displays candle names directly on the chart.
show candle panel displays the candle history panel.
candle panel position selects where the candle history panel appears.
max candle labels visible controls how many normal candle labels or panel rows are kept before cleanup.
scoring mode controls how the candle quality score is calculated. body mode focuses on candle body size. volume mode focuses on relative volume. hybrid mode combines both.
use global trend context adjusts the score using a simple trend context. beginners should treat this as context only, not a decision rule.
candle type filters
these settings enable or disable specific normal candle names. examples include doji, engulfing candles, inside bars, hammers, shooting stars, tweezer tops, tweezer bottoms, sweeps, rejection candles, imbalance candles, displacement candles, and exhaustion candles.
beginners should start with fewer candle types and add more later.
reversal candle
enable reversal candle turns on the reversal candle module.
show reversal candle labels displays reversal candle labels directly on the chart.
show reversal candle panel displays the reversal candle panel.
reversal candle position selects where the reversal candle panel appears.
max candle reversal label controls how many reversal candle labels or rows are kept.
this module is useful when you want to focus only on candle behavior linked to rejection, sweep, exhaustion, liquidity reaction, or possible control transfer.
candle ha
enable candle ha turns on the heikin ashi study module.
show ha candle labels displays ha labels on the chart.
show heikin ashi panel displays the ha history panel.
ha panel position selects where the ha panel appears.
show ha secondary tags controls whether extra ha structure details are shown. when off, the label stays cleaner and shows the main ha idea. when on, it can show additional details such as no wick, long body, continuation, or acceleration.
max ha labels visible controls how many ha labels or panel rows are kept.
use this module on a heikin ashi chart for best visual learning.
reversal ha
enable reversal ha candle turns on the ha reversal module.
show reversal ha labels displays reversal ha labels on the chart.
show reversal ha panel displays the reversal ha panel.
reversal ha position selects where the reversal ha panel appears.
show reversal ha secondary tags controls whether extra ha reversal details are shown.
max ha reversal label controls how many reversal ha labels or panel rows are kept.
reversal ha name lets users choose which ha reversal-related conditions are active, such as ha bull reversal, ha bear reversal, ha color flip, ha exhaustion, ha weakening, and ha doji reversal.
this section is useful for learning when a smoothed trend may be slowing or changing rhythm.
candle sequence engine
enable candle sequence engine turns on the pattern sequence module.
show detected sequence displays detected pattern labels on the chart.
show pattern panel displays the pattern history panel.
pattern panel position selects where the pattern panel appears.
detection sensitivity adjusts how strict the sequence detection is.
max pattern labels visible controls how many pattern labels or panel rows are kept.
pattern length filters allow users to enable or disable one-candle, two-candle, three-candle, four-candle, and five-candle pattern groups.
pattern name filters let users select individual patterns. beginners should start with fewer patterns, such as engulfing, harami, morning star, evening star, hammer, shooting star, inside bar break, and traps.
reversal pattern
enable reversal patterns only mode allows the script to focus only on reversal-related patterns without requiring the full pattern engine to be used in the same way.
show pattern reversal labels displays reversal pattern labels on the chart.
show pattern reversal panel displays the pattern reversal panel.
pattern reversal position selects where the reversal pattern panel appears.
max pattern reversal label controls how many reversal pattern labels or rows are kept.
this section is useful when the user wants to study only patterns that teach failed control, rejection, traps, transition, or possible reversal behavior.
ai context
the ai context section does not predict the future. it provides a visual context score based on internal trend, volume, and volatility calculations.
show ai context bull/bear gauge displays a small visual gauge.
gauge position moves the gauge between top center and bottom center.
gauge basis selects whether the gauge is based on trend, volume, volatility, or combined context.
gauge precision cells controls the visual resolution of the gauge.
bear, neutral, and bull colors control the gradient colors of the gauge.
the gauge should be used as a context tool, not as a trade entry tool.
educational history panels
the history panels show recent detected events. each row includes the candle or pattern name, score, and a short educational note.
the panels are designed to help beginners review what happened recently and learn the meaning of each structure.
panel position settings control where each panel appears.
panel colors and transparency control the visual style.
alerts
alerts can notify when selected candle, ha, or pattern events occur.
alerts are educational reminders only. they are not automatic trade signals.
beginners should create alerts only after understanding what each candle or pattern means.
how to interpret bull, bear, and neutral
bull means the candle or pattern teaches buyer pressure, recovery, demand, or bullish rejection.
bear means the candle or pattern teaches seller pressure, rejection, supply, or bearish control.
neutral means the candle or pattern teaches indecision, compression, balance, or a situation where direction is not yet confirmed.
neutral is not useless. neutral candles are important because they often teach patience.
important beginner lessons
do not read a candle alone.
a candle needs context:
* is price trending or ranging?
* did the candle appear near support or resistance?
* did the wick reject a meaningful level?
* did the close confirm control?
* did the next candle follow through?
* is the pattern forming after expansion, compression, or exhaustion?
a pattern is not a guarantee. it is a lesson about structure.
good candles usually have clear body, wick, and close behavior. weak candles are harder to read and need more confirmation.
reversal patterns need extra care. a reversal clue is not a confirmed reversal until price follows through.
continuation patterns need trend context. without trend, continuation patterns can become noise.
compression patterns teach patience. the direction is usually learned after the range breaks.
best beginner workflow
1. use normal candles first.
2. enable only a few basic candle labels.
3. study the educational notes.
4. add reversal candle only when you understand rejection and wick behavior.
5. switch to heikin ashi before studying ha modules.
6. keep ha secondary tags off at first for cleaner reading.
7. enable ha secondary tags later to study extra structure.
8. study pattern sequences after you understand single candles.
9. use the panels as a learning journal.
10. never use one label alone as a trading decision.
educational disclaimer
this script is provided for educational and informational purposes only. it does not provide financial advice, investment advice, trading advice, or a recommendation to buy or sell any financial instrument.
the indicator does not guarantee results and does not predict future market movement. users are responsible for their own research, risk management, and trading decisions.
the best use of this tool is to learn how candles, heikin ashi candles, and pattern sequences communicate market behavior.
Indicator

XMR Grid Bot - Long StrategyXMR Grid Bot — Long Strategy
🔷 What it does:
This is a long-only price-grid strategy that harvests volatility on XMR / USDT through repeated round-trips on a pre-defined ladder of price levels between two fixed bounds. Each level is an independent slot: when price crosses down through a level, the strategy opens one slot; when price subsequently crosses up through the level immediately above, that slot is closed for a fixed round-trip profit. The grid is generated geometrically by default, so spacing adapts to the price scale.
- Up to 37 simultaneous long slots at default settings, each sized as a fixed fraction of the configured Total Investment.
- No trailing exit, no stop loss — each slot's exit is the level above its entry.
- Per-slot exposure is approximately 2.70% of equity at default settings, comfortably inside the 5–10% per-trade risk band.
- Every fill and close emits a webhook-ready JSON alert payload tagged with the specific grid slot.
🔷 Who is it for:
- Swing traders harvesting volatility on XMR in range-bound regimes.
- Bot operators looking for a chart-driven signal source with per-slot webhook JSON ready to drive a DCA Bot configured for grid execution.
- Traders running a portfolio of low-correlation strategies who want a high-trade-count contributor with bounded per-trade risk.
- Range traders who prefer mechanical execution over discretionary entries.
🔷 How does it work:
Grid Construction: On script load, the strategy computes N price levels between the configured High and Low bounds. In Geometric mode (default), level k is at High × (Low/High)^(k/(N-1)), giving constant percent spacing — approximately 1.0% per step at default settings. In Arithmetic mode, levels are linearly spaced by absolute price.
Per-Slot Logic: Each grid level is an independent slot tracked by a boolean ownership flag. When bar close moves price down through an empty slot's level, a long is opened at that level for one slot's worth of capital (Investment / N). When bar close moves price up through the level immediately above an owned slot, that slot is closed, locking the round-trip profit between the two adjacent levels.
No Trailing, No Stop Loss: By design, each slot has a fixed exit (the level above). The strategy never trails the exit and never stops a slot out for a loss — slots whose entry price is below current market simply wait until price comes back. This is the canonical grid-bot behavior.
Capital Bounds: Total deployed capital cannot exceed the configured Investment. When all 37 slots are filled, no new orders are opened until price rises and starts closing slots. This structural cap is the strategy's primary risk control.
🔷 Why it's unique:
- Per-Level Webhook Ledger: Every fill and close emits a fully-formed JSON alert payload tagged with the specific grid slot ("Grid_BUY_L5" / "Grid_TP_L5"). The strategy can drive a DCA Bot configured for grid emulation without any glue layer.
- Pre-Allocated State: All up to 200 slot ledgers live in fixed-size arrays, so state lookups are constant-time and the chart can render every active slot with no performance overhead.
- Honest Backtest Surface: The avg entry line plotted on the chart and the open PnL displayed in the status table both reflect the actual broker-equivalent position state — derived from fill-by-fill bookkeeping, not synthetic averaging.
- Calibrated for XMR 15m: Default bounds, level count, and step size are set against XMR's recent observed range. The 37-level geometric ladder gives roughly 1.0% per step — wide enough to clear perpetual taker fees on each round-trip, granular enough to keep catching 15m swings inside the range.
🔷 Considerations Before Using the Strategy:
Market Selection & Range Validity: Grid strategies are most profitable in range-bound, mean-reverting markets. On strong directional trends below the configured Low, slots will keep loading as price falls and won't close until price reverses. The default High/Low (415 / 290) was set against XMR's recent observed range; update both whenever the regime changes.
Capital Deployment & Drawdown: The default Investment of 10,000 USDT equals 100% of starting capital — high-conviction setting that assumes the configured range holds. Per-slot risk remains low (~2.70% of equity), but if price collapses below the Low bound, aggregate unrealized loss can grow further. Scale the Investment input down to match the worst-case drawdown you are willing to absorb in a range-break scenario.
No Stop Loss Justification: There is no exit on adverse moves below the lowest grid level. The strategy's per-trade risk is structurally capped by the per-slot allocation (Investment / N levels) — at defaults that is ~270 USDT per slot, well inside the conventional 5–10% per-trade band. The aggregate unrealized exposure is controlled separately via the Investment input.
Trade Volume & Fees: Grid bots on 15m generate a high number of round-trips. The ~1.0% step is deliberately wider than a tight scalp grid so each round-trip comfortably clears the perpetual taker fee. The default commission (0.06% per trade) is calibrated for Bybit perpetual taker conditions; any mismatch with your exchange's actual fees will materially shift the results.
Demo Testing: Always demo-test before going live. Past results do not guarantee future performance, especially on a strategy whose profitability is bounded by the chosen High/Low range remaining valid.
🔷 STRATEGY PROPERTIES
Symbol: BYBIT:XMRUSDT.P (Perpetual) — strategy is portable to any XMR / USDT pair.
Timeframe: 15M
Test Period: February 22, 2026 — May 30, 2026 (~3.2 months).
Initial Capital: 10,000 USDT.
Total Investment: 10,000 USDT (100% of capital, high-conviction setting).
Order Size per Slot: Investment / 37 ≈ 270 USDT (~2.70% of equity).
Commission: 0.06% per trade.
Slippage: 3 ticks.
Margin for Long Positions: 100%.
Indicator Settings: Default Configuration.
Grid Bounds: High 415 / Low 290 (range −30.12%).
Grid Levels: 37 (Geometric spacing, ~1.0% per step).
Stop Loss: None — per-slot allocation is the structural risk cap.
Trailing: None.
Strategy: Long Only.
🔷 STRATEGY RESULTS
⚠️ Remember, past results do not guarantee future performance.
Net Profit: +1,418.07 USDT (+14.18%)
Max Equity Drawdown: 375.32 USDT (3.59%)
Total Closed Trades: 733
Percent Profitable: 72.71% (533 / 733)
Profit Factor: 2.48
🔷 How to Use It:
🔸 Adjust Settings: Open the strategy inputs and set the High and Low bounds to a range you expect XMR to respect. Pick Geometric for percent-spaced levels (default, recommended) or Arithmetic. Set Grid Levels (7–200) and Total Investment to match your risk profile.
🔸 Results Review: Run a full-period backtest and confirm Max Drawdown stays within your personal risk band. Validate that the trade count is high enough to be statistically meaningful (≥ 100 closed trades is a reasonable floor — at default settings the strategy typically generates several hundred round-trips per 3-month window on XMR 15m).
🔸 Create alerts to trigger the DCA Bot: Add one alert on the strategy using "Any alert() function call". Paste your DCA Bot's webhook URL into the alert's Webhook field, and fill the Bot ID, Email Token, and Pair inputs on the script. Every grid-level buy and grid-level close will emit a dedicated JSON payload tagged with the slot index, so each level can be tracked independently downstream.
🔷 INDICATOR SETTINGS
High Price: Top of the grid. The highest level a slot can be created from.
Low Price: Bottom of the grid. The lowest level a slot can be created from.
Grid Levels: Number of price levels between High and Low (default 37, range 7–200).
Spacing Mode: Geometric (constant percent step) or Arithmetic (constant absolute step).
Total Investment (USDT): Total capital allocated across all slots. Per-slot size = Investment / Grid Levels.
Bot ID / Email Token / Pair: Webhook fields injected into every alert payload.
Visualization: Toggle grid lines, range box, HIGH/LOW labels, avg entry plot, fill labels, status table.
Brand Watermark: Configurable text, position, size, and transparency.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
__
The information and publications within the 3Commas PulseWire account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc. Strategy
