Bastion Execution Protocol [JOAT]Bastion Execution Protocol
Introduction
The Bastion Execution Protocol is an open-source automated trading strategy built in Pine Script v6. It combines regime detection, market structure analysis, dual momentum confirmation (RSI + Stochastic Momentum Index), order flow validation (CVD), candle pattern recognition, session filtering, and dynamic risk management into a single institutional-grade execution framework. The strategy is designed to take high-confluence directional trades only when multiple independent factors align — regime, structure, momentum, volume flow, and session — while managing risk through ATR-based stop losses, configurable reward-to-risk ratios, trailing stops, regime-adaptive position sizing, daily trade limits, and end-of-day forced closes.
This is not a "set and forget" black box. It is a transparent, fully configurable framework where every entry condition, risk parameter, and filter can be adjusted. The strategy is published open-source so traders can study the logic, understand why each trade is taken, and adapt the parameters to their instruments and timeframes.
Why This Strategy Exists
Most published strategies on PulseWire fall into two categories: overly simple (single indicator crossover) or overly complex (dozens of conditions that overfit to historical data). This strategy occupies the middle ground — it requires meaningful confluence from independent analytical dimensions without over-optimizing to specific historical patterns:
Multi-Factor Entry Gate: Every trade requires agreement from regime detection, market structure, momentum oscillators, and optionally CVD order flow and candle patterns. No single factor can trigger a trade alone.
Regime-Aware Execution: The strategy only trades in trending regimes by default. It avoids squeeze conditions and can be configured to require specific regime states. Position sizing automatically reduces in volatile or uncertain regimes.
Session Intelligence: Trades are filtered by session (London, New York, Kill Zones) and day of week. The strategy avoids low-quality periods and forces position closure at end of day.
Dynamic Risk Management: ATR-based stop losses adapt to current volatility. Trailing stops activate after a configurable profit threshold. Position sizing is calculated from account equity and risk percentage, then adjusted by regime conditions.
Performance Tracking: Real-time HUD displays win rate, profit factor, max drawdown, daily trade count, and current position status.
Strategy Architecture — 9 Modules
The strategy is organized into 9 sequential modules, each responsible for a specific aspect of the trading process:
Module 1: Regime Detection
The regime engine classifies the market into four states using SMA alignment and VWAP slope:
Trend Up: SMA 20 > 50 > 200 (bull alignment) AND positive VWAP slope — clear upward momentum
Trend Down: SMA 20 < 50 < 200 (bear alignment) AND negative VWAP slope — clear downward momentum
Squeeze: Bollinger Band width in the bottom 10th percentile — volatility compression
Range: No SMA alignment and flat VWAP slope — sideways conditions
The VWAP slope is normalized by ATR to make it comparable across instruments with different price scales. The regime state directly controls whether trading is allowed — by default, the strategy requires a trending regime.
Module 2: Market Structure
Swing-based structure tracking identifies the directional bias:
Pivot highs and lows are detected using configurable lookback
When price closes above the last swing high while structure was bearish or neutral, structure flips bullish
When price closes below the last swing low while structure was bullish or neutral, structure flips bearish
Structure must agree with the regime for entries — regime bullish + structure bullish = long allowed
Displacement candle detection identifies aggressive institutional order flow — candles with body >= 70% of range and body >= 1.8x the 20-bar average body. These serve as entry triggers when all other conditions are met.
Module 3: Momentum Confirmation
Dual momentum confirmation requires both RSI and SMI to agree:
RSI: Must be above the bull threshold (default 55) for longs, below the bear threshold (default 45) for shorts
Stochastic Momentum Index: Must be positive for longs, negative for shorts. The SMI measures where price sits relative to the midpoint of its recent range, double-smoothed for noise reduction.
Both must agree — RSI bullish AND SMI bullish = momentum confirmed for longs
Module 3B: CVD Order Flow Confirmation
When enabled, Cumulative Volume Delta must support the trade direction:
Buy volume is estimated from bullish candles (close > open = full volume, otherwise proportional)
Sell volume = total volume minus buy volume
CVD = cumulative sum of (buy volume - sell volume)
CVD must be above its moving average for longs, below for shorts
This ensures that actual volume flow supports the intended trade direction
Module 3C: Candle Pattern Detection
When enabled, the strategy detects institutional candle patterns as entry triggers:
Bullish Engulfing: Current bullish candle fully engulfs the prior bearish candle's body, with volume above average
Bearish Engulfing: Current bearish candle fully engulfs the prior bullish candle's body, with volume above average
Bullish Pin Bar: Lower wick > 2x body, upper wick < 0.5x body — rejection of lower prices
Bearish Pin Bar: Upper wick > 2x body, lower wick < 0.5x body — rejection of higher prices
Patterns serve as alternative entry triggers alongside displacement candles. Either a displacement candle, a pattern, or price above SMA20 + VWAP can trigger entry when all other conditions are met.
Module 4: Session Filter
The session filter controls when trading is allowed:
Four session windows: NY Kill Zone (7-10am), London Kill Zone (2-5am), NY Session (9:30am-4pm), London Session (3am-9:30am)
Each session can be individually enabled/disabled
Day of week filter allows disabling specific days (e.g., avoid Mondays or Fridays)
Configurable timezone (default: America/New_York)
End-of-day forced close at configurable time (default: 3:45pm)
Module 5: Daily Trade Counter
A daily trade counter prevents overtrading:
Resets at the start of each new day
Configurable maximum trades per day (default: 3)
Combined with squeeze avoidance and regime filtering for comprehensive trade gating
Module 6: Entry Signal Generation
Entry signals require ALL of the following to be true simultaneously:
// Long entry requires full confluence:
// 1. Regime = Trend Up
// 2. Structure trend = Bullish (swing break confirmed)
// 3. RSI > bull threshold AND SMI > 0
// 4. CVD above its MA (if enabled)
// 5. Bar is confirmed (barstate.isconfirmed)
// 6. Trade is allowed (daily limit, session, no squeeze)
// 7. Trigger: displacement candle OR pattern OR price > SMA20 + VWAP
This multi-gate approach ensures that trades are only taken when regime, structure, momentum, volume flow, session, and a specific trigger all agree. The probability of a random signal passing all gates is very low, which is by design.
Module 7: Risk Calculations
Risk is calculated dynamically for each trade:
Stop Loss: ATR * configurable multiplier (default 1.5x) below entry for longs, above for shorts
Take Profit: SL distance * reward-to-risk ratio (default 2.0x)
Position Size: (Account Equity * Risk Percentage * Regime Multiplier) / SL Distance
Regime-Adaptive Sizing: When enabled, position size is reduced to 50% during squeeze conditions and 70% during non-trending conditions. Full size is used only in trending regimes.
Module 8: Trade Execution
Entries are executed using strategy.entry() with calculated position size. The strategy tracks active trade parameters (entry price, SL, TP) for trailing stop management.
Module 9: Exit Management
Three exit mechanisms operate simultaneously:
Fixed SL/TP: strategy.exit() with the calculated stop loss and take profit levels
Trailing Stop: When enabled, activates after price moves a configurable multiple of R in profit (default 1.0R). The trail distance is ATR * configurable multiplier (default 1.0x). The trailing stop only moves in the favorable direction and replaces the fixed SL when it is tighter.
End-of-Day Close: All positions are closed at the configured time to avoid overnight risk
Performance Tracking
The strategy tracks and displays real-time performance metrics:
Win Rate: Wins / (Wins + Losses) as a percentage
Profit Factor: Gross Profit / Gross Loss — values above 1.5 indicate a healthy edge
Max Drawdown: Peak-to-trough equity decline as a percentage
Net P&L: Total net profit/loss
Daily Trade Count: Current day's trades vs maximum allowed
Strategy Settings and Backtesting Notes
The strategy is configured with realistic default parameters:
Initial Capital: $100,000
Default Position Size: 2% of equity
Risk Per Trade: 1.5% (configurable)
Commission: Not included by default — users should add commission appropriate to their broker in the strategy settings
Slippage: Not included by default — users should add slippage appropriate to their instrument
calc_on_every_tick: false — the strategy only evaluates on confirmed bar closes to prevent repainting
calc_on_order_fills: true — allows trailing stop updates on fill events
Important: Before evaluating backtest results, users should:
Add realistic commission for their broker (e.g., $5 per trade for stocks, 0.1% for crypto)
Add realistic slippage (e.g., 1-2 ticks for liquid instruments)
Verify that the backtest period includes different market conditions (trending, ranging, volatile)
Check that the number of trades is sufficient for statistical significance (100+ trades recommended)
Understand that past performance does not guarantee future results
Input Parameters
Risk Management:
Risk Per Trade %: Percentage of equity risked per trade (default: 1.5%)
Reward:Risk Ratio: TP distance as multiple of SL distance (default: 2.0)
SL ATR Multiplier: Stop loss distance as ATR multiple (default: 1.5)
ATR Length: Period for ATR calculation (default: 14)
Use Trailing Stop: Enable/disable trailing (default: true)
Trail After X R Profit: Profit threshold to activate trail (default: 1.0R)
Trail ATR Multiplier: Trail distance as ATR multiple (default: 1.0)
Max Trades Per Day: Daily trade limit (default: 3)
Regime-Adaptive Sizing: Reduce size in non-trending conditions (default: true)
Regime Filter:
VWAP Slope Lookback: Period for slope calculation (default: 20)
Slope Threshold: Normalized threshold for trend detection (default: 0.12)
Bollinger Length/Multiplier: BB parameters for squeeze detection (default: 20/2.0)
Avoid Squeeze Entries: Skip entries during squeeze (default: true)
Require Trend Regime: Only trade in trending conditions (default: true)
Structure:
Swing Lookback: Pivot detection length (default: 5)
Displacement Min Body Ratio: Minimum body/range for displacement (default: 0.7)
Displacement Body Multiplier: Minimum body vs average for displacement (default: 1.8)
Momentum:
RSI Length/Thresholds: RSI parameters (default: 14, bull 55, bear 45)
SMI Lookback/Smoothing: SMI parameters (default: 13/25/2)
Session Filter:
Enable Session Filter: Toggle session-based trade gating
Individual session toggles: NY KZ, London KZ, NY, London
Day of week toggles: Monday through Friday
Force Close End of Day: Toggle EOD position closure
Close Hour/Minute: EOD close time (default: 15:45)
Order Flow:
CVD Confirmation: Require delta direction to match entry (default: true)
CVD Lookback: Period for CVD moving average (default: 10)
Candle Patterns:
Use Pattern Confirmation: Enable pattern detection as entry trigger (default: true)
Pattern Volume Multiplier: Minimum volume for pattern confirmation (default: 1.3x)
How to Use This Strategy
Step 1: Configure for Your Instrument
Adjust the ATR multiplier and displacement thresholds for your instrument's volatility. Add realistic commission and slippage in PulseWire's strategy settings.
Step 2: Set Your Risk Parameters
Choose a risk percentage that matches your risk tolerance. The default 1.5% with 2:1 R:R is conservative. Adjust the trailing stop parameters based on your preference for locking in profits vs giving trades room.
Step 3: Configure Sessions
Enable the sessions relevant to your instrument. For US equities, NY KZ and NY Session are most relevant. For forex, both London and NY Kill Zones are important. Disable days you prefer not to trade.
Step 4: Run the Backtest
Apply the strategy to your chart and review the backtest results. Check win rate, profit factor, max drawdown, and number of trades. Ensure results are realistic and not the product of overfitting.
Step 5: Forward Test
Before trading live, run the strategy in paper trading mode for at least 2-4 weeks to verify that live performance matches backtest expectations.
Best Practices
Always add commission and slippage before evaluating backtest results
The strategy works best on liquid instruments with reliable volume data
Higher timeframes (15m+) produce fewer but higher-quality trades
The multi-gate entry system means trades are infrequent by design — this is a feature, not a bug
Regime-adaptive sizing is recommended — it automatically reduces exposure in uncertain conditions
The daily trade limit prevents revenge trading and overexposure
End-of-day forced close eliminates overnight gap risk for intraday strategies
Monitor the HUD during live trading for real-time regime, momentum, and session context
If win rate drops below 40% or profit factor drops below 1.0, re-evaluate parameters for current market conditions
Limitations
The strategy uses lagging indicators (SMAs, RSI, SMI) for entry conditions. Entries occur after the trend has started, not at the exact turn.
Regime detection can lag regime changes. The strategy may miss the first portion of a new trend or take a trade just as a trend is ending.
CVD is estimated from candle direction, not true order flow data. This is an approximation.
Backtest results are hypothetical and do not account for real-world execution issues (partial fills, requotes, connectivity).
The strategy is designed for intraday/swing trading. It is not optimized for scalping or long-term position trading.
Session filtering is based on EST timezone. Instruments traded primarily in other timezones may need different session definitions.
The multi-gate entry system can be too restrictive in some market conditions, producing very few trades. This is intentional — the strategy prioritizes quality over quantity.
Past performance in backtesting does not guarantee future results. Market conditions change, and strategies that worked historically may not work in the future.
Technical Implementation
Built with Pine Script v6 using:
calc_on_every_tick=false for non-repainting execution
barstate.isconfirmed gating on all signal generation
9-module architecture with clear separation of concerns
ATR-based dynamic stop loss and take profit calculation
Trailing stop with configurable activation threshold and trail distance
Regime-adaptive position sizing with squeeze and non-trending penalties
Session detection with timezone support and day-of-week filtering
Daily trade counter with automatic reset
End-of-day forced close mechanism
Real-time performance tracking (win rate, profit factor, max drawdown)
Dual momentum confirmation (RSI + SMI)
CVD order flow validation
Candle pattern detection (engulfing, pin bar) with volume confirmation
6 alert conditions covering entries, regime changes, EOD close, patterns, and drawdown
Originality Statement
This strategy is original in its multi-dimensional confluence framework. While individual components (RSI, SMI, SMA alignment, session filtering) are established concepts, this strategy is justified because:
The 9-module architecture creates a clear, auditable decision pipeline where each module's contribution to the final trade decision is transparent
The multi-gate entry system (regime + structure + dual momentum + CVD + session + trigger) requires an unusually high level of confluence, reducing false signals
Regime-adaptive position sizing automatically adjusts exposure based on market conditions, a feature rarely seen in published strategies
The combination of trailing stops with regime-aware sizing creates a dynamic risk framework that adapts to changing conditions
Session filtering with Kill Zone preference and day-of-week controls provides institutional-grade time management
CVD order flow confirmation adds a volume-based validation layer that pure price-based strategies lack
The real-time HUD with performance tracking provides transparency into strategy behavior that most published strategies do not offer
The Volcanic theme provides a cohesive visual identity where every color choice carries meaning (lava = entry, amber = warning, teal = VWAP, crimson = bearish)
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Backtested results are hypothetical and do not represent actual trading. Past performance does not guarantee future results. The strategy involves risk of loss, including the potential loss of the entire investment. Commission, slippage, and other real-world execution costs are not included in the default configuration and must be added by the user for realistic evaluation. The author makes no claims about the profitability of this strategy and is not responsible for any losses incurred from its use. Always use proper risk management, trade with capital you can afford to lose, and consider consulting a qualified financial advisor before trading.
-Made with passion by officialjackofalltrades
Strategy

TPrecision MARKET PULSE Read the Energy, Not the DirectionHere's the full PulseWire description text, ready to paste:
MARKET PULSE — Read the Energy, Not the Direction
Every indicator you've ever used tells you the same thing: which way price might go. RSI, MACD, stochastics — they're all measuring direction in different ways. Market Pulse does something fundamentally different. It measures the energy state of the market — the rhythm underneath price that exists before any move happens.
The concept is simple: markets breathe. Before every significant move, price compresses — ranges tighten, candles shrink, volatility collapses inward. The market is inhaling. Then it exhales. Price erupts, ranges expand, energy releases. Market Pulse makes that cycle visible in real time across four components stacked in a single clean pane.
BREATH (top section — blue/amber line)
This is the core reading. True range normalized against its own long-term average, so 1.0 always means "normal." When the line drops below the blue band (0.7), the market is compressing — inhaling, coiling, building potential energy. When it rises above the amber band (1.3), the market is expanding — exhaling, releasing, moving with conviction. A breath line that stays flat and low for many consecutive bars is the most important signal this indicator produces. That is a spring being loaded.
RHYTHM (middle section — green/red histogram)
Rhythm measures the rate of change of breath. Are we expanding faster than we were, or compressing faster? Green bars above the midline mean expansion is accelerating — the exhale is gaining momentum. Red bars below mean compression is deepening — the coil is getting tighter. The most powerful moment is when rhythm crosses from red to green after a prolonged compression period. That is the first sign the exhale has begun.
TENSION (bottom section — gradient fill)
Every bar that breath spends below 1.0 (below-normal range) accumulates tension. The fill builds from blue to amber as pressure increases. High tension means the spring has been coiled for a long time and release is statistically overdue. Tension does not decay instantly — it bleeds out slowly on expansion bars, reflecting how energy releases gradually after a long coil. When tension is at its peak and breath is still compressed, you are looking at maximum potential energy in the market.
PULSE RATE (dotted circles — overlay on breath section)
This tracks the average interval between breath peaks — how fast energy cycles are completing. When the dots are high, cycles are churning quickly (active, volatile market). When dots drop, cycles are slowing down. A decelerating pulse rate often precedes market exhaustion, regime change, or a significant transition in character. It is the one component that operates on a longer timescale than the others.
BACKGROUND ALERTS
🔵Blue background tint — Tension above 75% AND breath compressed below 0.7. The coil is tight. Maximum potential energy. The market is wound up.
🟠Amber background tint — Breath above 1.3 AND rhythm positive. Active release in progress. Energy is being deployed.
HOW TO USE IT
This indicator does not tell you to buy or sell. It tells you what state the market is in so you can make better decisions with whatever strategy you already use.
Use it to avoid trading in the wrong state — entering a trend trade during deep compression usually means getting chopped. Entering a range trade during active expansion means getting run over.
Use it to time entries on your existing signals — a buy signal that fires while tension is at extreme highs and breath is turning up is a very different trade than the same signal firing in a neutral state.
Use it to identify when something is about to happen — not what, but when the energy conditions are right for a significant move.
Use it across timeframes — compression on the daily while expansion fires on the 4H often means a powerful intraday move within a larger coiling structure.
SETTINGS
Base Period (default 20) — The lookback for ATR and breath calculation. Higher values = smoother, slower readings. Lower = more reactive.
Smoothing (default 5) — Applied to all components. Increase to reduce noise on lower timeframes.
Tension Lookback (default 50) — How far back tension and rhythm normalize themselves. Higher = tension builds more slowly, more selective extremes.
Pulse Rate Period (default 10) — How many breath cycles to average for the pulse rate calculation.
WORKS ON
All markets (Forex, Crypto, Equities, Futures, Indices) — All timeframes — Pine Script v6
This is not a signal generator. It is a market state reader. Learn the rhythm before you trade the move.
👉 Join the community, ask questions, share setups: discord.gg/8H4qdBDaEu Indicator

AG Pro RSI Pressure Map [AGPro Series]AG Pro RSI Pressure Map
OVERVIEW
AG Pro RSI Pressure Map is an overlay indicator that interprets RSI behavior as directional pressure on price rather than presenting RSI as a standalone oscillator panel. The script maps bullish and bearish pressure conditions directly on the chart, highlights confirmed pressure builds, and separates those states from release conditions and internal weakening.
The goal is not to repeat standard RSI threshold usage such as simple overbought/oversold signals. Instead, this script translates RSI persistence, slope, trend alignment, and price response efficiency into a chart-based pressure model. The result is a structure-aware visual framework that helps users evaluate whether momentum is building, fading, or attempting to reassert itself.
This tool is designed for traders who prefer price-chart context over isolated oscillator readings. By keeping the logic on the main chart, it becomes easier to observe how directional pressure develops around swings, pullbacks, transitions, and continuation attempts.
UNIQUE EDGE
The distinctive idea behind this script is that RSI is not treated here as a one-line trigger engine. Instead, RSI is used as a pressure input inside a multi-step state model. A bullish or bearish condition is not activated by a single threshold alone. It requires a combination of persistence, slope, trend-side alignment, and minimum response quality.
That makes this script structurally different from conventional RSI overlays or threshold markers. It does not simply mark every move above or below a level. It attempts to identify whether price is actually behaving like a pressure phase, whether that phase lasts long enough to matter, and whether the move later transitions into a release or a weakening sequence.
Another important distinction is the use of zone persistence and signal spacing. Short-lived fluctuations are filtered by minimum zone duration, paint delay, cooldown spacing, and failure-lock logic. This helps reduce repetitive chart clutter and keeps the output more focused on pressure phases that remain contextually relevant for more than a single bar.
WHAT THE SCRIPT DOES
This indicator classifies chart behavior into a small number of practical states:
- Bullish Pressure
- Bearish Pressure
- Bullish Release
- Bearish Release
- Pressure Failure
- No Active Zone
Pressure zones are displayed as soft background states once a valid zone remains active long enough to pass the paint delay requirement. Signal markers and optional labels identify important transitions, including new pressure builds and release conditions. A panel summarizes the current state so users can quickly read the broader condition without scanning every marker.
The script is intended to help with context and organization. It is not limited to trend continuation use only. It can also help identify when an apparent move is weakening internally or when a previous stretch phase may be transitioning into a more constructive re-engagement.
METHODOLOGY
The script combines several components into a single state engine:
1. RSI baseline calculation
RSI is calculated from user-defined length and can optionally be smoothed. This creates the base momentum input for the pressure model.
2. RSI slope and persistence
The script evaluates whether RSI is rising or falling, and whether that direction persists across a configurable lookback window. This helps distinguish stable directional pressure from one-bar fluctuation.
3. Trend alignment
Price is compared against a trend EMA so the script can evaluate whether a pressure condition is aligned with the prevailing side of the market. This reduces cases where RSI alone may look strong while price structure remains inconsistent.
4. Price response efficiency
The model checks whether recent price movement is meaningful relative to ATR. This is used to filter low-quality pressure states where RSI movement exists but price response is weak.
5. Zone state logic
A bullish or bearish pressure state is only activated when the required conditions are present and remains active until exit logic invalidates it. Minimum zone duration and flat cooldown logic are used to reduce rapid state flipping.
6. Release logic
Release conditions are derived from pressure transitions that also satisfy contextual requirements such as recent stretch history and price-side confirmation. This is meant to make release signals more selective than ordinary threshold crosses.
7. Failure logic
The script can detect internal weakening inside an active zone when slope deteriorates and response quality drops. Failure-lock behavior is used to avoid excessive repetition inside the same pressure phase.
Because the model works through a state engine rather than isolated threshold events, the output is better understood as a pressure map than as a classical oscillator trigger set.
SIGNALS AND ALERTS
The script provides the following event types:
- Bullish Pressure Build
- Bearish Pressure Build
- Bullish Release Confirmed
- Bearish Release Confirmed
- Pressure Failure
These alerts are meant to notify users about state transitions, not to replace trade planning or execution rules. A pressure build does not automatically imply continuation. A release does not guarantee reversal or acceleration. A failure does not guarantee collapse. Each event is best interpreted in the context of structure, liquidity, volatility, and timeframe.
KEY INPUTS
RSI Length
Controls the base RSI period.
RSI Smoothing
Applies optional smoothing to RSI before state evaluation.
Trend EMA Length
Defines the trend alignment reference.
Persistence Lookback / Minimum Persistence Count
Control how stable RSI direction must be before a pressure state becomes valid.
Bull Entry RSI / Bear Entry RSI
Set the activation thresholds for bullish and bearish pressure.
Bull Exit RSI / Bear Exit RSI
Define when active pressure zones can terminate.
Minimum Push Efficiency
Filters low-quality states where RSI movement is not supported by sufficient price response.
Release Lookback
Controls how far back the script checks for recent stretch context before validating release behavior.
Minimum Zone Bars / Flat Cooldown Bars
Reduce rapid flip behavior and help pressure zones remain more stable.
Zone Paint Delay
Prevents immediate background painting on very early bars of a new zone.
Build Label Offset / Release Label Offset / Failure Label Offset
Allow spacing between labels and candles for cleaner presentation.
Build Label Minimum Gap Bars / Release Label Minimum Gap Bars
Reduce repeated labels on the same side and improve chart readability.
HOW TO READ IT
A bullish pressure zone means the script currently sees persistent bullish-side momentum that remains aligned with trend-side conditions and minimum response requirements. A bearish pressure zone means the same on the downside.
A bullish release is not simply “bullish RSI.” It represents a more selective re-engagement condition built on prior context. The bearish release follows the same idea in reverse.
A pressure failure suggests that the active zone may be weakening internally. This is not a standalone reversal call. It is a cautionary state that says the current pressure phase is losing quality.
The panel should be read as a summary layer:
- RSI State shows the active state classification
- Pressure Bias shows the normalized directional bias
- Stretch Status shows whether RSI is in an extreme region
- Structure Align shows whether price and RSI are aligned
- Signal State shows the latest meaningful state event
LIMITATIONS AND TRANSPARENCY
This script is not a prediction engine and should not be interpreted as one. It is a state-classification tool built from RSI behavior, EMA alignment, ATR-normalized response, and rule-based persistence logic.
Like all chart tools, it is sensitive to timeframe selection, volatility regime, and market structure. A setting combination that feels appropriate on one symbol or timeframe may be too loose or too strict on another.
The script also does not solve broader market context. It does not evaluate macro conditions, volume profile, order flow, news, or execution quality. Users should treat it as a chart-organization tool, not as a complete trading framework.
The output is intentionally selective, but any filter system involves trade-offs. More filtering may reduce noise while also delaying some transitions. Less filtering may make the script more responsive while increasing signal density.
This indicator should be used as a supporting layer for chart reading, not as a substitute for risk management, independent analysis, or confirmation from the user’s own process.
WHAT THIS SCRIPT IS NOT
- Not a basic RSI overbought/oversold marker set
- Not a simple RSI 50-line crossover script
- Not a buy/sell guarantee system
- Not a replacement for execution rules
- Not a full strategy with entries, exits, and sizing logic
It is a rule-based pressure mapping tool designed to help visualize directional momentum states on price.
RISK DISCLOSURE
This indicator is for analysis and chart interpretation only. It does not provide financial advice, investment advice, or guaranteed outcomes. All trading involves risk, including the risk of loss. Users should test settings, validate behavior on their own markets and timeframes, and make independent decisions based on their own methodology and risk tolerance. Indicator

AG Pro Structural Momentum Oscillator [AGPro Series]AG Pro Structural Momentum Oscillator
OVERVIEW
AG Pro Structural Momentum Oscillator evaluates momentum through price structure instead of relying on a standard oscillator formula alone. The goal is not to duplicate a classic RSI, MACD, or stochastic workflow, but to study how price behaves internally: where bars close within their own range, how upper and lower wicks are distributed, how efficiently directional travel develops, and whether pullbacks remain controlled or start to damage the underlying move.
This produces a structure-based momentum reading that is designed to help users distinguish between constructive directional pressure, weak or unstable movement, and transition phases. In practice, the oscillator is intended for traders who want more context than a simple overbought/oversold style reading, while still keeping the visual experience compact and readable in a separate pane.
The model is normalized into a clean oscillator format and supported by an optional panel that exposes the internal components behind the headline score. This makes the script easier to inspect without turning it into a crowded dashboard. The result is a momentum tool that remains chart-friendly while still offering transparency about what is driving the current state.
WHAT THIS SCRIPT DOES
This script builds a composite momentum score from structural price behavior. Instead of measuring momentum only through smoothed distance or rate-of-change logic, it examines whether bars are closing with quality, whether wick balance supports continuation or rejection, whether the move is advancing efficiently, whether counter-moves are being absorbed, and whether directional pressure is persisting across the selected lookback.
The oscillator is shown in a separate pane so that the price chart remains clean. Stronger bullish conditions push the reading toward the upper zone, stronger bearish conditions push it toward the lower zone, and transitional behavior tends to cluster around the middle band. Optional markers can highlight structural shifts, expansion entries, and midline events, while the panel can display both the current state and the underlying component scores.
UNIQUE EDGE
The core idea here is structure-based momentum assessment.
This script does not attempt to repackage a traditional oscillator with cosmetic changes. Its momentum reading is built from several structural observations working together:
- close quality within the bar range
- wick pressure balance
- impulse efficiency
- pullback control
- directional persistence
That combination is what makes the oscillator different. It is not asking only whether price moved. It is asking how price moved, whether that movement was internally supportive, and whether the recent sequence of bars reflects constructive continuation or unstable friction.
Because of that design, the oscillator can be useful in situations where traders want additional confirmation around trend continuation, weakening follow-through, or state transitions, without depending on a single legacy oscillator formula.
METHODOLOGY
The composite score is built from a weighted structural model.
1) Close Quality
This measures where the bar closes relative to its own range. Bars that close with directional conviction contribute more positively or negatively than bars that finish in weak or indecisive positions.
2) Wick Pressure
This evaluates the balance between upper and lower wick behavior. It helps estimate whether rejection pressure is supporting the current direction or working against it.
3) Impulse Efficiency
This compares net directional progress against recent travel. Large movement alone is not treated as strength if the structure is inefficient or overly noisy.
4) Pullback Control
This examines whether counter-direction movement remains contained or begins to undermine the active directional leg.
5) Persistence
This tracks whether structural bias has been holding together across the recent window instead of flipping constantly from bar to bar.
These components are normalized and combined into a structural momentum oscillator score. The separate panel allows users to inspect the same internal drivers individually, which can be helpful when the headline reading is near transition levels.
SIGNALS AND ALERTS
The oscillator can be used visually or through alerts.
Depending on settings, the script can monitor:
- bullish structural shifts
- bearish structural shifts
- bullish expansion entries
- bearish expansion entries
- midline events
Optional markers can be displayed directly in the oscillator pane. The legend row in the panel explains what each marker type represents. Users who prefer a cleaner presentation can disable markers or legend items from the settings.
As with most technical tools, signals are best interpreted in context. A structural shift is not the same thing as a trade command. It is an analytical event showing that the model detected a meaningful change in the balance of recent price behavior.
KEY INPUTS
The script includes the following input groups:
- structure length
- persistence window
- pullback window
- smoothing
- expansion thresholds
- panel visibility and font size
- signal marker mode
- marker legend visibility
- marker cooldown
These controls allow the user to keep the oscillator relatively clean by default, or expose more information when deeper inspection is needed.
HOW TO READ IT
A higher reading generally indicates stronger constructive bullish structure. A lower reading generally indicates stronger constructive bearish structure. Readings near the middle zone typically represent mixed or transitional behavior rather than strong directional consensus.
The panel state labels are designed to summarize that environment in plain language. The component rows below the headline score can help explain why the state is strong, weak, improving, or deteriorating.
In general, the oscillator is most useful when read together with price structure, trend context, and nearby technical levels, rather than in complete isolation.
LIMITATIONS AND TRANSPARENCY
This script is an analytical aid, not a predictive engine.
It does not know future price direction. It only evaluates the recent structural character of price action according to its own model. Like any momentum-based tool, it can react quickly during strong directional phases and become less reliable during noisy, event-driven, or highly erratic conditions.
Different symbols and timeframes can also produce different structural behavior. Users should expect to adjust settings where appropriate and validate how the oscillator behaves on the markets they follow.
The script is designed to provide a structured interpretation of momentum, but it should not be treated as a guarantee of continuation, reversal, or trade outcome.
RISK DISCLOSURE
This indicator is provided for chart analysis, research, and educational use only. It does not provide financial advice, investment advice, or guaranteed signals. All trading decisions remain the sole responsibility of the user. Technical indicators should be used with risk management and broader market context, not as standalone certainty tools. Indicator

Precision Edge System [JOAT]Precision Edge System
Introduction
The Precision Edge System is an advanced open-source multi-timeframe trading strategy that combines Opening Range Breakout, Fair Value Gap detection, Break of Structure analysis, Order Block identification, Fibonacci confluence, volatility regime classification, multi-oscillator divergence, RSI-2 mean reversion, and adaptive risk management into a unified institutional-grade trading system. This strategy helps traders capture high-probability setups by requiring multiple independent confirmation signals before entering trades, significantly reducing false signals and improving win rates.
Unlike basic strategies that rely on single indicators, this system uses a confluence scoring approach where each component contributes points toward entry decisions. Opening Range provides context, Fair Value Gaps provide entry zones, Market Structure confirms direction, Order Blocks show institutional positioning, Fibonacci shows harmonic levels, Regime Detection filters conditions, Divergence warns of reversals, and RSI-2 catches pullbacks. The strategy is designed for traders who understand that the best setups occur when multiple institutional concepts align simultaneously.
Why This Strategy Exists
This strategy addresses the fundamental challenge of trading: most single-indicator strategies produce too many false signals or miss too many opportunities. By combining multiple institutional concepts with flexible confluence requirements, this strategy reveals:
Opening Range Breakout: First 30 minutes establish institutional positioning - breakouts signal directional commitment
Fair Value Gap Retests: Price imbalances that get filled - optimal entry zones with defined risk
Break of Structure: Swing high/low breaks confirm trend direction and momentum
Order Blocks: Last opposing candle before strong moves - institutional accumulation/distribution zones
Premium/Discount Arrays: Value context showing whether price is expensive or cheap
Fibonacci Confluence: Golden Pocket and multi-wave alignment for reversal zones
Volatility Regime Detection: Trending/Ranging/Choppy classification to avoid bad conditions
Multi-Oscillator Divergence: RSI/MACD/Stochastic divergence for reversal signals
RSI-2 Mean Reversion: Extreme oversold/overbought in trends for pullback entries
Session-Based Timing: London/New York kill zones for highest liquidity
Adaptive Risk Management: Dynamic stop loss, take profit, and trailing stops based on volatility
Each component provides independent confirmation. The strategy's power comes from requiring multiple components to align before entering trades, creating high-probability setups with favorable risk-reward ratios.
Core Strategy Components
1. Opening Range Breakout (ORB) System
The Opening Range is established during the first 30 minutes of the trading session (9:30-10:00 AM by default):
// Track high/low during OR session
if inOR:
orHigh = max(high, orHigh)
orLow = min(low, orLow)
// Detect breakouts after OR established
orBreakoutUp = close > orHigh and close <= orHigh
orBreakoutDown = close < orLow and close >= orLow
Opening Range logic:
First 30 minutes = institutions establish positions
OR High/Low define the day's initial range
Breakouts above OR High = bullish bias
Breakouts below OR Low = bearish bias
OR levels used as stop loss reference points
The strategy can operate in two modes:
Breakout Required: Only trades after OR breakout (more selective)
Flexible: Trades inside OR if other confluence is strong (more frequent)
ORB contributes 2 points to confluence score when breakout occurs.
2. Fair Value Gap (FVG) Entry System
Fair Value Gaps are three-candle price imbalances that often get filled:
// Bullish FVG: Current low > 2 candles ago high
bullishFVG = low > high
fvgBullTop = low
fvgBullBottom = high
// Entry on retest
fvgBullRetest = low <= fvgBullTop and close >= fvgBullBottom
FVG entry logic:
Identifies imbalance zones where price moved too fast
Waits for price to return to the gap (retest)
Enters at gap high (bullish) or gap low (bearish)
Provides precise entry with tight stop below/above gap
FVG retest contributes 2 points to confluence score. The strategy tracks active FVGs and removes them when filled.
3. Market Structure (BOS/CHoCH) Confirmation
Break of Structure confirms trend direction:
// Detect swing highs/lows
swingPivotHigh = ta.pivothigh(high, 5, 5)
swingPivotLow = ta.pivotlow(low, 5, 5)
// BOS: Price breaks swing in trend direction
if swingPivotHigh > lastSwingHigh and bullishStructure:
bosOccurred = true // Bullish BOS
Structure logic:
Tracks swing highs and lows using pivot detection
BOS = break in trend direction (continuation)
CHoCH = break against trend (potential reversal)
Internal structure shows nested patterns for timing
The strategy can operate in two modes:
BOS Required: Only trades after structure break (more selective)
Flexible: Trades without BOS if other confluence is strong (more frequent)
BOS contributes 2 points to confluence score when it occurs.
4. Order Block Detection and Mitigation
Order Blocks mark institutional positioning zones:
// Bullish OB: Last bearish candle before strong bullish move
bullishOB = close < open and close > open and
(high - low) > atr * 1.2 and
volume > avgVol * 1.1
Order Block logic:
Identifies last opposing candle before momentum shift
Requires volume and ATR confirmation
Strength classification (Strong = 4+ points, Normal = 2-3 points)
Tracks active blocks until mitigated (price closes through)
Active Order Blocks contribute 1 point to confluence score. Strong Order Blocks (high volume + high ATR) contribute an additional 1 point.
5. Premium/Discount Array Context
Premium/Discount Arrays show value context:
rangeHigh = ta.highest(high, 50)
rangeLow = ta.lowest(low, 50)
rangeEQ = (rangeHigh + rangeLow) / 2
inPremium = close > rangeEQ and close > (rangeEQ + (rangeHigh - rangeEQ) * 0.5)
inDiscount = close < rangeEQ and close < (rangeEQ - (rangeEQ - rangeLow) * 0.5)
Value Array logic:
Calculates 50-period range high/low
Equilibrium = 50% level (fair value)
Premium = upper 50% of range (expensive)
Discount = lower 50% of range (cheap)
Institutional bias: Buy discount, sell premium
Being in discount zone contributes 1 point to long confluence. Being in premium zone contributes 1 point to short confluence.
6. Fibonacci Confluence and Golden Pocket
Fibonacci analysis identifies harmonic reversal zones:
// Calculate Fibonacci levels from swing
fib618 = swingLow + (swingHigh - swingLow) * 0.618
fib650 = fib618 * 1.052
// Golden Pocket = 0.618 to 0.65 zone
inGoldenZone = close >= min(fib618, fib650) and close <= max(fib618, fib650)
Fibonacci logic:
Calculates Fibonacci retracements from multiple swing lengths
Golden Pocket (0.618-0.65) = highest probability reversal zone
Extensions (1.272, 1.414, 1.618) used for profit targets
Confluence zones where multiple Fib levels align
Being in Golden Pocket contributes 1 point to both long and short confluence (reversal zone).
7. Volatility Regime Filter
Regime detection classifies market conditions:
atr = ta.atr(14)
atrSma = ta.sma(atr, 50)
volRatio = atr / atrSma
// Trending: EMAs aligned + normal volatility
trendStrength = (ema9 > ema21 and ema21 > ema50) or
(ema9 < ema21 and ema21 < ema50)
regime = volRatio > 1.5 ? 0 : // Choppy
trendStrength ? 2 : // Trending
1 // Ranging
Regime logic:
Trending (2): Directional market, use breakout strategies
Ranging (1): Oscillating market, use mean reversion
Choppy (0): Erratic market, avoid trading
The strategy can operate in two modes:
Avoid Choppy: No trades in choppy regime (more selective)
Trade All: Trades in all regimes if confluence is strong (more frequent)
Regime filter prevents trading in unfavorable conditions.
8. Multi-Oscillator Divergence Detection
Divergence analysis identifies momentum exhaustion:
// Bullish divergence: Price LL, RSI HL
if pricePivotLow < lastPriceLow and rsiPivotLow > lastRsiLow:
bullish_divergence = true
Divergence logic:
Regular divergence = potential reversal signal
Hidden divergence = trend continuation signal
Requires extreme zones (RSI >70 or <30) for best setups
Multi-oscillator confluence increases reliability
Bullish divergence contributes 2 points to long confluence. Bearish divergence contributes 2 points to short confluence.
9. RSI-2 Mean Reversion System
RSI-2 catches extreme pullbacks in trends:
rsi2 = ta.rsi(close, 2)
ema200 = ta.ema(close, 200)
// Long: RSI-2 oversold in uptrend
rsi2_oversold = rsi2 < 10 and close > ema200
// Short: RSI-2 overbought in downtrend
rsi2_overbought = rsi2 > 90 and close < ema200
RSI-2 logic:
2-period RSI is extremely sensitive to pullbacks
Oversold (<10) in uptrend = buy the dip
Overbought (>90) in downtrend = sell the rally
Requires 200 EMA trend filter for context
RSI-2 signals contribute 2 points to confluence score.
10. Candlestick Pattern Recognition
The strategy detects reversal patterns:
Hammer: Long lower wick, small body, bullish reversal
Shooting Star: Long upper wick, small body, bearish reversal
Bullish Engulfing: Bullish candle engulfs previous bearish candle
Bearish Engulfing: Bearish candle engulfs previous bullish candle
Morning Star: Three-candle bullish reversal pattern
Evening Star: Three-candle bearish reversal pattern
Strong patterns (with volume confirmation) contribute 2 points to confluence score.
11. Session-Based Timing (Kill Zones)
The strategy focuses on high-liquidity sessions:
London Session: 2:00-5:00 AM EST (default)
New York Session: 8:30-11:00 AM EST (default)
Silver Bullet: 9:00-10:00 AM EST (default)
Session logic:
Highest volume and volatility during these periods
Institutional participation is strongest
Better follow-through on breakouts
Can be disabled for 24-hour trading
Confluence Scoring System
The strategy uses a point-based confluence system where each component contributes points:
Long Confluence Points:
OR Breakout Up: +2 points
BOS Bullish: +2 points
FVG Bull Retest: +2 points
Active Bullish OB: +1 point
Strong Bullish OB: +1 point (bonus)
In Discount Zone: +1 point
In Golden Pocket: +1 point
RSI-2 Oversold: +2 points
Bullish Divergence: +2 points
Liquidity Below: +1 point
Volume Spike: +1 point
Bullish Momentum: +1 point
Bullish Pattern: +2 points
Entry Modes (Configurable):
Strict Mode: Requires 8+ points (very selective, highest quality)
Moderate Mode: Requires 6+ points (balanced approach)
Flexible Mode: Requires 4+ points (more frequent trades)
Aggressive Mode: Requires 3+ points (highest frequency)
This flexible system allows traders to adjust trade frequency based on their preference and market conditions.
Risk Management System
1. Stop Loss Placement:
The strategy uses intelligent stop loss placement:
OR-Based Stops: If OR is active, stop = OR Low (long) or OR High (short)
ATR-Based Stops: If no OR, stop = Entry ± (2 × ATR)
Structure-Based Stops: Can use swing lows/highs for stops
2. Position Sizing:
Risk-based position sizing:
accountRisk = strategy.equity * (riskPercent / 100) // Default 1%
riskPerShare = entry - stopLoss
positionSize = accountRisk / riskPerShare
This ensures consistent risk per trade regardless of stop distance.
3. Take Profit Targets:
Adaptive take profit based on volatility:
// Base reward multiple (default 2R)
tpMultiplier = rewardMultiple
// Increase in high volatility
if volatility_high:
tpMultiplier = rewardMultiple * 1.5
takeProfit = entry + (riskPerShare * tpMultiplier)
Default 2R target (2x risk) provides favorable risk-reward. High volatility increases target to 3R.
4. Trailing Stop System:
Adaptive trailing stop activates after profit threshold:
Activates after 1R profit (default)
Trails at breakeven + 0.5R
Locks in profits while allowing trend to run
Adjusts trail distance based on ATR
5. Time-Based Exits:
End-of-day exit prevents overnight risk:
Closes all positions at 3:55 PM EST (default)
Prevents gap risk and overnight exposure
Can be disabled for swing trading
6. Daily Trade Limit:
Maximum trades per day prevents overtrading:
Default: 10 trades per day maximum
Resets at start of each trading day
Prevents revenge trading and overexposure
Strategy Performance Metrics
The strategy displays real-time performance in the dashboard:
Confluence Scores: Current long/short confluence (0-20 scale)
OR Status: Active/Forming
Structure: Bullish/Bearish
BOS Signal: Confirmed/Pending
Regime: Trending/Ranging/Choppy
Value Zone: Premium/Discount/Equilibrium
RSI State: Overbought/Oversold/Neutral
Volatility: High/Normal/Low
Volume: Spike/High/Dry/Normal
Position: Long/Short/Flat
Net P/L: Current profit/loss
Win Rate: Percentage of winning trades
Total Trades: Number of closed trades
Profit Factor: Gross profit / Gross loss
Input Parameters
Trade Frequency:
Entry Mode: Strict/Moderate/Flexible/Aggressive
Min Confluence Score: 1-10 (lower = more trades)
Allow Partial Setups: Trade with 2/3 conditions met
Opening Range:
OR Session: Time range for OR (default 9:30-10:00)
ORB Filter: Enable/disable OR requirement
Fibonacci Extensions: Show extension levels
Breakout Required: Must break OR to trade
Market Structure:
Fractal Period: Swing detection length (default 5)
Require BOS/CHoCH: Must have structure break
Multi-TF Confluence: Check higher timeframe
Internal Structure: Show nested patterns
Order Blocks:
OB Filter: Enable/disable OB requirement
Volatility Threshold: ATR multiplier (default 1.2)
Volume Threshold: Volume multiplier (default 1.1)
Block Quality: All/Strong/Extreme
Fair Value Gaps:
FVG Entry: Enable/disable FVG entries
Min Imbalance: Percentage threshold (default 0.2%)
Zone Quality: All/Strong/Extreme
Auto-Fill Detection: Remove filled gaps
Risk Management:
Risk Per Trade: Percentage of equity (default 1%)
Reward Multiple: R multiple for TP (default 2.0)
Adaptive Take Profit: Adjust TP for volatility
EOD Exit: Close positions at end of day
Adaptive Trailing Stop: Enable trailing stops
Trail Activation: R multiple to activate (default 1.0)
Max Daily Trades: Limit trades per day (default 10)
How to Use This Strategy
Step 1: Configure Entry Mode
Choose entry mode based on desired trade frequency. Strict = fewer high-quality trades. Flexible = more frequent trades. Start with Moderate.
Step 2: Set Risk Parameters
Configure risk per trade (1% recommended), reward multiple (2R recommended), and position sizing. Never risk more than you can afford to lose.
Step 3: Enable Desired Components
Turn on/off components based on your trading style. All components enabled = most selective. Fewer components = more frequent trades.
Step 4: Monitor Dashboard
Watch confluence scores in real-time. Long score >6 = potential long setup. Short score >6 = potential short setup. Higher scores = better setups.
Step 5: Review Entry Labels
When strategy enters, it displays label with entry price, stop loss, take profit, and confluence score. Review to understand why trade was taken.
Step 6: Let Strategy Manage Exits
Strategy handles stop loss, take profit, trailing stops, and EOD exits automatically. Don't interfere with exits unless necessary.
Step 7: Analyze Performance
Review dashboard metrics regularly. Win rate >50%, profit factor >1.5, and positive net P/L indicate good performance.
Best Practices
Start with Moderate mode and adjust based on results
Higher confluence scores = higher win rates but fewer trades
Backtest thoroughly before live trading
Use realistic commission (0.075%) and slippage
Respect regime filter - avoid choppy markets
Session filter improves quality - trade kill zones
EOD exit prevents overnight risk for day traders
Daily trade limit prevents overtrading
Monitor dashboard for real-time confluence
Adjust parameters for different instruments and timeframes
Strategy Limitations
Confluence system can miss trades when components don't align
Multiple filters reduce trade frequency significantly
Backtesting results may not reflect live performance
Slippage and commission impact profitability
News events can invalidate technical setups
Regime detection may lag at transitions
Opening Range less reliable on low-volume days
Fair Value Gaps may not fill immediately
Order Blocks can fail in strong trends
Divergences can persist before reversing
The strategy shows high-probability setups, not guaranteed winners
Technical Implementation
Built with Pine Script v6 using:
Opening Range tracking with session detection
Fair Value Gap detection and retest monitoring
Market structure analysis with BOS/CHoCH detection
Order Block identification with strength classification
Premium/Discount Array calculations
Fibonacci confluence and Golden Pocket detection
Volatility regime classification system
Multi-oscillator divergence detection
RSI-2 mean reversion signals
Candlestick pattern recognition
Session-based timing filters
Confluence scoring algorithm
Adaptive risk management system
Real-time performance dashboard
The code is fully open-source and can be modified to suit individual trading styles and preferences.
Originality Statement
This strategy is original in its comprehensive institutional integration approach. While individual components (ORB, FVG, BOS, OB, Fibonacci, RSI, MACD) are established concepts, this strategy is justified because:
It synthesizes 11 distinct institutional concepts into unified confluence scoring system
The flexible entry mode system allows traders to adjust selectivity vs frequency
Adaptive risk management adjusts stops and targets based on volatility
Multi-component confluence significantly reduces false signals vs single-indicator strategies
Session-based timing focuses on high-liquidity periods for better execution
Regime filter prevents trading in unfavorable market conditions
Candlestick pattern integration adds reversal confirmation layer
Real-time dashboard presents 15 metrics simultaneously for complete strategy visibility
The strategy combines trend-following (BOS, ORB) with mean-reversion (RSI-2, Divergence) for versatility
Each component contributes independent confirmation: ORB shows context, FVG shows entry, BOS shows direction, OB shows positioning, Arrays show value, Fibonacci shows harmonics, Regime shows conditions, Divergence shows exhaustion, RSI-2 shows pullbacks, Patterns show reversals, and Sessions show timing. The strategy's value lies in requiring multiple components to align before entering trades, creating high-probability setups with favorable risk-reward ratios.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Past performance does not guarantee future results. Backtesting results are hypothetical and may not reflect actual trading performance. Actual results will vary due to slippage, commission, market conditions, and execution differences. The strategy may experience periods of drawdown and losing trades.
High confluence scores do not guarantee profitable trades. Market conditions change, and strategies that worked historically may not work in the future. News events, market shocks, and fundamental factors can override technical setups.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this tool.
Recommended Settings for Backtesting
Initial Capital: $10,000 (realistic for average trader)
Commission: 0.075% per trade (realistic for most brokers)
Slippage: 1-2 ticks (depends on instrument liquidity)
Risk Per Trade: 1% of equity
Reward Multiple: 2R (2:1 risk-reward)
Entry Mode: Moderate (6+ confluence)
Timeframe: 5-minute or 15-minute chart
Instruments: Liquid stocks, forex majors, or major crypto
Sample Size: Minimum 100 trades for statistical significance
-Made with passion by officialjackofalltrades Strategy

PathOverDest (By Vahid.Jz) Second🎁 This script is released for free in celebration of the birth of my daughters:
Athena, born during the COVID era,
and Avina, born during times of war.
"PathOverDest" represents a simple philosophy:
There is no destination — only the journey.
Second
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Overview:
PathOverDest is a fully customizable trading strategy designed for traders who focus on process, structure, and flexibility rather than fixed systems.
This strategy allows you to build your own logic step-by-step using multiple conditions for entries and exits, combined with advanced risk management tools.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ Key Features:
• Multi-step Entry System (Long & Short)
Define up to 6 customizable conditions for entries using:
- Price sources (close, open, indicators, etc.)
- Logical operators (AND / OR)
- Crossovers, comparisons, and custom values
• Advanced Risk Management:
- Fixed Stop Loss
- Risk-Free (Break-even) system
- Trailing Stop Loss
• Multi Take-Profit System:
- Up to 3 Take-Profit levels
- Partial position closing
- Fully adjustable pip targets
• Position Management:
- Control position size using cash per trade
- Ability to open multiple positions per signal
• Smart Alerts:
- Custom alert messages with dynamic placeholders:
{{close}}, {{time}}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 Philosophy:
This strategy is not designed to predict the market —
it is designed to help you build and follow your own trading process.
Focus on consistency, not prediction.
Focus on execution, not outcome.
Because in trading, just like in life:
There is no destination… only the path.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Disclaimer:
This script is for educational and research purposes only.
Trading involves risk. Use proper risk management and test before live trading.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👤 Author:
Vahid Jz Strategy

PathOverDest (By Vahid.Jz) First🎁 This script is released for free in celebration of the birth of my daughters:
Athena, born during the COVID era,
and Avina, born during times of war.
"PathOverDest" represents a simple philosophy:
There is no destination — only the journey.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Overview:
PathOverDest is a fully customizable trading strategy designed for traders who focus on process, structure, and flexibility rather than fixed systems.
This strategy allows you to build your own logic step-by-step using multiple conditions for entries and exits, combined with advanced risk management tools.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ Key Features:
• Multi-step Entry System (Long & Short)
Define up to 4 customizable conditions for entries using:
- Price sources (close, open, indicators, etc.)
- Logical operators (AND / OR)
- Crossovers, comparisons, and custom values
• Multi-step Exit Conditions
Flexible exit logic with up to 2 conditions for both long and short positions
• Advanced Risk Management:
- Fixed Stop Loss
- Risk-Free (Break-even) system
- Trailing Stop Loss
• Multi Take-Profit System:
- Up to 3 Take-Profit levels
- Partial position closing
- Fully adjustable pip targets
• Position Management:
- Control position size using cash per trade
- Ability to open multiple positions per signal
• Smart Alerts:
- Custom alert messages with dynamic placeholders:
{{close}}, {{time}}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 Philosophy:
This strategy is not designed to predict the market —
it is designed to help you build and follow your own trading process.
Focus on consistency, not prediction.
Focus on execution, not outcome.
Because in trading, just like in life:
There is no destination… only the path.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Disclaimer:
This script is for educational and research purposes only.
Trading involves risk. Use proper risk management and test before live trading.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👤 Author:
Vahid Jz Strategy

Structural Flow Decoder [JOAT]Structural Flow Decoder
Introduction
The Structural Flow Decoder is an advanced open-source market structure analysis indicator that combines Break of Structure (BOS) detection, Change of Character (CHoCH) identification, nested pattern recognition, and multi-timeframe confluence into a unified structural analysis system. This indicator helps traders identify trend direction, structural shifts, and momentum changes by analyzing how price breaks through swing highs and lows across multiple timeframes.
Unlike basic trend indicators that use moving averages, this system analyzes actual market structure - the sequence of higher highs, higher lows, lower highs, and lower lows that define trends. Break of Structure signals trend continuation, Change of Character signals potential reversals, nested patterns reveal internal structure, and multi-timeframe alignment confirms institutional conviction. The indicator is designed for traders who understand that market structure precedes price and that structural breaks reveal directional intent.
Why This Indicator Exists
This indicator addresses a critical need in technical analysis: the ability to identify trend changes before they're obvious. Market structure analysis reveals when institutions are shifting positioning. By combining multiple structural methodologies, this indicator reveals:
Break of Structure (BOS): Price breaks swing high/low in trend direction - confirms continuation and momentum
Change of Character (CHoCH): Price breaks swing high/low against trend - signals potential reversal or consolidation
Nested Structure: Internal patterns within larger structure - reveals micro-trends and entry timing
Multi-Timeframe Confluence: Higher timeframe structure alignment - confirms institutional participation
Momentum Shifts: RSI and MACD crossovers at structure breaks - adds confirmation layer
Trend Strength Analysis: Quantifies structural conviction - distinguishes strong from weak trends
Each component provides a different lens on market structure. BOS shows continuation, CHoCH shows reversals, nested structure shows timing, MTF alignment shows conviction, and momentum shows acceleration. Together, they create a comprehensive view of structural flow.
Core Components Explained
1. Break of Structure (BOS) Detection
Break of Structure occurs when price breaks a swing high in an uptrend or swing low in a downtrend. It confirms trend continuation:
// Bullish BOS: Price breaks above previous swing high
if pivotHigh > lastSwingHigh and bullishStructure:
line.new(lastSwingHighBar, lastSwingHigh, bar_index, pivotHigh,
color=COLOR_BULL_STRUCTURE, width=3, style=line.style_solid)
label.new(bar_index, pivotHigh, "BOS ↑")
The indicator identifies BOS using swing detection:
Detects swing highs and lows using pivot lookback (default 5 periods)
Compares current swing to previous swing in same direction
Draws solid lines connecting swings when BOS occurs
Labels breaks with "BOS ↑" or "BOS ↓" for clarity
BOS signals that the trend is intact and institutions are pushing price in the established direction. Multiple consecutive BOS indicate strong trending conditions.
2. Change of Character (CHoCH) Detection
Change of Character occurs when price breaks a swing high in a downtrend or swing low in an uptrend. It signals potential trend reversal:
// Bullish CHoCH: Price breaks above swing high while in downtrend
if pivotHigh > lastSwingHigh and not bullishStructure:
line.new(lastSwingHighBar, lastSwingHigh, bar_index, pivotHigh,
color=COLOR_CHOCH_BULL, width=3, style=line.style_dashed)
label.new(bar_index, pivotHigh, "CHoCH ↑")
bullishStructure := true
CHoCH is more significant than BOS because it represents structural shift:
Breaks counter-trend swing points
Signals potential trend reversal or major consolidation
Drawn with dashed lines to distinguish from BOS
Flips internal trend state when detected
CHoCH doesn't guarantee reversal, but it warns that the previous trend is weakening. Confirmation from other factors (volume, momentum, higher timeframe) increases reliability.
3. Nested Structure Analysis
Nested structure reveals internal patterns within the larger trend. It uses shorter lookback periods to detect micro-structure:
The indicator tracks internal swings using a separate period (default 3 bars vs 5 for main structure). This reveals:
Internal BOS within larger trends - shows momentum acceleration
Internal CHoCH before main CHoCH - early warning of reversals
Pullback structure in trends - identifies entry opportunities
Consolidation patterns - shows when to wait
Nested structure is drawn with thinner dashed lines to distinguish from main structure. It provides entry timing within the larger trend context.
4. Multi-Timeframe Confluence
The indicator requests structure data from a higher timeframe (default 60-minute) and compares it to current timeframe:
= request.security(syminfo.tickerid, "60",
)
Multi-timeframe analysis reveals:
Whether current timeframe structure aligns with higher timeframe
Institutional conviction (HTF structure = larger positions)
Confluence zones where both timeframes show same direction
Divergence warnings when timeframes conflict
The dashboard displays HTF alignment status (Bullish/Bearish) and confluence state (Synced/Divergent). Trading in direction of HTF structure with current timeframe confirmation produces highest win rates.
5. Momentum Shift Detection
The indicator integrates RSI and MACD to detect momentum shifts at structural breaks:
rsi = ta.rsi(close, 14)
= ta.macd(close, 12, 26, 9)
momentum_bull = ta.crossover(rsi, 50) and macdHist > 0
momentum_bear = ta.crossunder(rsi, 50) and macdHist < 0
Momentum shifts are marked with "M+" (bullish) or "M-" (bearish) labels. When momentum shifts align with structural breaks, it confirms the move. Momentum divergence from structure warns of potential failures.
6. Trend Strength Classification
The indicator quantifies trend strength based on consecutive structural breaks:
Explosive: 3+ consecutive BOS in same direction
Active: 1-2 consecutive BOS
Weak: No recent BOS or mixed signals
Strength classification appears in the dashboard and influences background gradient intensity. Strong trends show vibrant colors, weak trends show muted colors.
Visual Elements
BOS Lines: Solid thick lines (cyan for bullish, magenta for bearish)
CHoCH Lines: Dashed thick lines (cyan for bullish, magenta for bearish)
Internal Structure: Thin dashed lines showing nested patterns
Swing Point Labels: "H" and "L" markers at pivot highs/lows
Momentum Labels: "M+" and "M-" at momentum shifts
Gradient Background: Color intensity based on trend strength
Gradient Candles: Strong moves in bright colors, weak moves in muted colors
Dashboard: Real-time structure state and confluence metrics
The dashboard displays 8 key metrics:
1. Structure Flow (Bullish/Bearish)
2. Flow Strength (Explosive/Active/Weak)
3. HTF Alignment (Bullish/Bearish/Off)
4. Confluence (Synced/Divergent)
5. Momentum (Strong/Neutral/Weak)
6. MACD Signal (Bullish/Bearish)
7. Last Pivot price level
Input Parameters
Structure Analysis:
Detection Period: Swing lookback for main structure (default: 5)
Break of Structure: Enable/disable BOS detection
Change of Character: Enable/disable CHoCH detection
Nested Patterns: Enable/disable internal structure
Nested Period: Swing lookback for internal structure (default: 3)
Momentum Shifts: Enable/disable RSI/MACD labels
Higher Timeframe:
Multi-Timeframe Sync: Enable/disable HTF analysis
HTF Period: Higher timeframe to analyze (default: 60 minutes)
Confluence Filter: Require HTF alignment for signals
Visualization:
Directional Zones: Show gradient backgrounds
Pivot Markers: Show H/L labels at swings
Strength Histogram: Show trend strength bars
How to Use This Indicator
Step 1: Identify Current Structure
Check the dashboard for Structure Flow. Bullish structure = look for longs, Bearish structure = look for shorts. This is your directional bias.
Step 2: Wait for Structural Confirmation
In bullish structure, wait for BOS (break above swing high) to confirm continuation. In bearish structure, wait for BOS (break below swing low). Don't trade against structure.
Step 3: Watch for Change of Character
CHoCH signals potential reversal. When CHoCH occurs, structure flips. Wait for confirmation BOS in new direction before entering. Don't trade immediately on CHoCH.
Step 4: Use Nested Structure for Timing
Internal structure shows pullback completion. Enter when internal BOS occurs in direction of main structure. This provides precise entry timing.
Step 5: Confirm with Higher Timeframe
Check HTF Alignment in dashboard. "Synced" = both timeframes agree (best setups). "Divergent" = conflict (avoid or reduce size).
Step 6: Add Momentum Confirmation
Look for M+ labels in bullish structure or M- labels in bearish structure. Momentum + Structure = highest probability setups.
Best Practices
Trade in direction of structure - don't fight it
BOS confirms trend, CHoCH warns of change - respect both
Multiple BOS in same direction = strong trend, ride it
CHoCH requires confirmation - don't reverse immediately
Nested structure provides entries within larger trend
HTF alignment is critical - always check confluence
Momentum divergence from structure = warning sign
Explosive strength = trending conditions, use breakout strategies
Weak strength = ranging conditions, use mean reversion
Structure works on all timeframes - scale appropriately
Indicator Limitations
Structure analysis works best on trending markets with clear swings
Choppy, sideways markets produce frequent false CHoCH signals
Swing detection requires sufficient volatility - low volatility reduces reliability
CHoCH doesn't guarantee reversal - it signals potential change
Multiple CHoCH in short period indicates consolidation, not trend
HTF data may repaint on lower timeframes - use confirmed bars
Nested structure can be noisy in ranging markets
The indicator shows structure state, not future direction
Momentum shifts can occur without structural confirmation
Technical Implementation
Built with Pine Script v6 using:
Pivot-based swing detection with configurable lookback
State machine tracking for bullish/bearish structure
Nested structure analysis with separate period
Multi-timeframe security requests with proper gap handling
RSI and MACD momentum calculations
Trend strength quantification system
Dynamic gradient backgrounds based on strength
Real-time dashboard with 8 structural metrics
The code is fully open-source and can be modified to suit individual trading styles and preferences.
Originality Statement
This indicator is original in its comprehensive structural integration approach. While individual components (BOS, CHoCH, swing detection) are established concepts, this indicator is justified because:
It synthesizes BOS and CHoCH detection with nested pattern analysis in a unified system
The multi-timeframe confluence detection provides institutional conviction measurement
Momentum shift integration (RSI + MACD) adds confirmation layer to structural breaks
Trend strength quantification distinguishes explosive from weak structural flows
Nested structure analysis reveals micro-patterns within macro-trends for entry timing
The gradient visualization system shows structural conviction through color intensity
Real-time dashboard presents 8 metrics simultaneously for holistic structural analysis
Each component contributes unique information: BOS shows continuation, CHoCH shows reversals, nested structure shows timing, HTF shows conviction, momentum shows acceleration, and strength shows quality. The indicator's value lies in presenting these complementary perspectives simultaneously with unified classification and visual hierarchy.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Market structure analysis is a tool for understanding price behavior, not a crystal ball for predicting future movement. BOS does not guarantee continuation. CHoCH does not guarantee reversal. Past structural patterns do not guarantee future structural patterns. Market conditions change, and strategies that worked historically may not work in the future.
The structural states displayed are analytical constructs based on current market data, not predictions of future price movement. Structure alignment does not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicator

Scalp Signal Bot - 5 min v3.0.1A precision-built intraday trading system designed for fast-moving markets like crypto and metals, optimized for 5-minute charts. This strategy focuses on capturing high-probability liquidity-driven moves while minimizing exposure to noise and false breakouts.
Core Concept
Scalp Signal Bot combines market structure, liquidity sweeps, and confirmation logic to identify actionable trade setups. It is engineered to enter after key levels are reclaimed and structure is confirmed, helping avoid common traps during volatile conditions.
Key Features
Market Structure Engine
Detects swing highs/lows and triggers entries on confirmed structure breaks.
Liquidity Sweep Detection
Identifies stop-hunt behavior and uses it as context for higher-probability reversals or continuations.
Reclaim Confirmation Logic
Ensures price reclaims key levels before entering, filtering out weak or premature signals.
Anti-Fakeout Entry Delay
Optional candle delay reduces entries during impulsive spikes and false breakouts.
Volume Filtering (Optional)
Uses relative volume conditions to validate participation and reduce low-liquidity signals.
Trend & Chop Modes
Flexible regime detection allows the bot to adapt between trending and ranging environments.
Configurable Risk Model
Supports R-based take profit and dynamic stop logic aligned with structure and volatility.
Live Trade HUD
Displays real-time signal state, entry, TP/SL levels, and system context directly on chart.
Designed For
5-minute scalping strategies
High-volatility assets (e.g., BTC, ETH, XAU, XAG)
Traders seeking structured, rule-based entries without emotional bias
Strengths
Avoids chasing moves with confirmation-based entries
Filters noise in choppy markets
Adapts to multiple market conditions with configurable logic
Important Notes
Performance varies by market regime (trend vs range)
Works best when tuned to the current volatility environment
Not intended for passive buy-and-hold strategies
Best Use
Run on 5-minute charts with proper parameter tuning. Ideal for traders who want consistent, rule-driven setups and are comfortable optimizing settings for current market conditions.
Disclaimer
This script is for educational and informational purposes only and does not constitute financial advice. The creator is not a registered financial advisor.
Trading financial markets involves significant risk. Past performance is not indicative of future results. This strategy does not guarantee profits and may result in losses, including the loss of principal.
Users are solely responsible for their own trading decisions. Always conduct your own research and risk management before using this script in live markets.
This script is a tool designed to assist in decision-making and should not be used as a standalone system without proper understanding and testing.
No representation is being made that any account will or is likely to achieve profits or losses similar to those shown.
If you want stricter (sometimes helps approval faster), use this slightly heavier version:
Risk Disclosure
This script is provided “as is” without any guarantees or warranties. The developer assumes no responsibility for any trading losses incurred.
All trading involves risk, and you should only trade with capital you can afford to lose. Hypothetical or backtested results have inherent limitations and do not reflect actual trading performance.
By using this script, you acknowledge that you are fully responsible for your trading decisions and outcomes. Strategy

Integrated Execution System [JOAT]Integrated Execution Strategy System
Introduction
The Integrated Execution Strategy System is a comprehensive open-source trading strategy that combines regime detection, directional bias analysis, momentum filtering, and structural confluence into a unified adaptive trading framework. This strategy is designed for traders who understand that successful trading requires adapting to market conditions and waiting for high-probability setups with multiple layers of confirmation.
Unlike simple strategies that rely on single indicators, this system integrates six distinct analytical layers: Market Regime Classification to avoid unfavorable conditions, Directional Bias Aggregation across multiple timeframes, Momentum Pressure analysis to gauge institutional participation, Structural Analysis for key levels, Volatility Engine for adaptive sizing, and Signal Qualification to ensure only the highest probability setups are taken. The strategy is built on the principle that edges in trading come from the confluence of multiple factors, not from any single signal.
[image [https://www.pulsewire.com/x/NTfmwzgw/
Why This Strategy Exists
This strategy addresses the critical challenge most traders face: adapting to changing market conditions. Most strategies work well in specific market regimes but fail when conditions change. This system solves that problem by:
Regime-Adaptive Logic: Automatically detects trending, ranging, and volatile market conditions and adjusts trading behavior accordingly
Multi-Layer Filtering: Requires confluence across trend, momentum, structure, and volume before entering trades
Institutional-Grade Risk Management: Dynamic position sizing, adaptive stops, and multi-target scaling based on market volatility
Multi-Timeframe Alignment: Confirms signals across higher timeframes to trade with the dominant market flow
Pressure and Flow Analysis: Measures buying/selling pressure to detect institutional participation
Structural Confluence: Identifies key swing levels and liquidity zones for optimal entry positioning
Each component addresses a specific aspect of trading: Regime detection tells us WHEN to trade, bias analysis tells us WHICH direction, momentum confirms the STRENGTH, structure provides the LEVEL, volatility determines the SIZE, and qualification ensures the QUALITY of the setup.
Core Components Explained
1. Market Regime Detection
The strategy classifies markets into four distinct regimes using ADX and ATR analysis:
// Regime classification
if vol_ratio >= i_vol_exp and adx < i_adx_trend
regime := 3 // Volatile
else if adx >= i_adx_trend
regime := 1 // Trending
else if vol_ratio <= i_vol_con
regime := 2 // Ranging
Regime types:
Trending (ADX > 25): Strong directional markets with momentum
Ranging (Low volatility, ADX < 25): Sideways markets suitable for range-bound strategies
Volatile (High volatility, ADX < 25): Chaotic markets where trading is reduced or avoided
Neutral: Transition periods between defined regimes
The strategy automatically reduces position sizing and tightens stops in volatile regimes while increasing size and allowing wider stops in trending regimes.
2. Directional Bias Aggregation
Bias is calculated using multiple indicators weighted by their reliability:
// Composite bias calculation
float bias_score = 0.0
if ma_bullish
bias_score += 30
if price_above_structure
bias_score += 20
if close > ma_trend
bias_score += 20
if plus_di > minus_di
bias_score += 30
Bias components:
Moving Average Relationships: Fast/slow MA alignment for trend direction
Price Position: Where price sits relative to key moving averages
ADX Directional Indicators: +DI vs -DI for momentum confirmation
Multi-Timeframe Alignment: Higher timeframe bias for trend confirmation
A bias score above the threshold (default 30) indicates directional conviction worth trading.
3. Momentum Pressure Analysis
Momentum is evaluated through multiple oscillators to ensure entry timing:
// Momentum scoring
int momentum_bull_score = 0
if rsi_bullish
momentum_bull_score += 1
if rsi_momentum_up
momentum_bull_score += 1
if macd_bullish
momentum_bull_score += 1
Momentum filters:
RSI Analysis: Momentum direction and overbought/oversold conditions
MACD Histogram: Trend acceleration and deceleration
Stochastic Oscillator: Entry timing and momentum strength
Volume Confirmation: Above-average volume for signal validity
Only when momentum aligns with directional bias do we consider entries.
4. Structural Market Analysis
Structure identifies key levels where institutions place orders:
// Structure analysis
bool above_swing_low = close > nz(last_swing_low, low)
bool below_swing_high = close < nz(last_swing_high, high)
bool sweep_high = not na(last_swing_high) and high > last_swing_high and close < last_swing_high
bool sweep_low = not na(last_swing_low) and low < last_swing_low and close > last_swing_low
Structural elements:
Swing Points: Key highs and lows that define market structure
Liquidity Sweeps: Price moves beyond swing levels that quickly reverse
Break of Structure: Confirmation of trend changes
Support/Resistance Zones: Areas of high probability reaction
Entries are favored when price aligns with structural levels and sweeps indicate institutional activity.
5. Volatility-Adaptive Risk Management
Risk management dynamically adjusts based on market conditions:
// Adaptive stop multiplier based on regime
float adaptive_stop_mult = i_atr_stop_mult
if i_adapt_stops
if volatile_regime
adaptive_stop_mult := i_atr_stop_mult * i_vol_stop_mult
else if ranging_regime
adaptive_stop_mult := i_atr_stop_mult * 0.85
else if trending_regime
adaptive_stop_mult := i_atr_stop_mult * 1.1
Risk features:
Adaptive Position Sizing: Larger sizes in high-conviction trends, smaller in volatile conditions
Dynamic Stop Losses: Wider in trending markets, tighter in ranging/volatile conditions
Multi-Target Scaling: Partial profits at predefined levels to reduce risk
Trailing Stops: Lock in profits when moves reach predefined thresholds
Volatility-Adjusted Targets: Larger profit targets in high-volatility environments
6. Signal Qualification System
The strategy uses a 14-point qualification system to ensure only high-quality setups:
// Total scores (max 14)
int bull_total = (
(bullish_bias ? 3 : 0) + momentum_bull_score + struct_bull_score + (trending_regime ? 2 : 0) +
(pressure_bull ? 1 : 0) + (sweep_low ? 1 : 0) + (squeeze_release ? 1 : 0) + (mtf_bias_long ? 1 : 0)
)
Qualification criteria:
Bias Strength (3 points): Strong directional conviction
Momentum (3 points): Multiple momentum indicators aligned
Structure (2 points): Price respecting key levels
Regime (2 points): Favorable market conditions
Pressure (1 point): Buying/selling pressure confirmation
Sweeps (1 point): Liquidity sweep patterns
Squeeze Release (1 point): Volatility breakout patterns
MTF Alignment (1 point): Higher timeframe confirmation
Only setups scoring 5+ (adjustable) are considered for trading.
Visual Elements
Directional Cloud: Dynamic cloud showing trend direction and strength
Signal Markers: Clear entry signals with quality grades (A-D)
Risk Levels: Visual stop loss and target levels
Structure Points: Marked swing highs and lows
Background Colors: Regime-based background shading
Dashboard: Real-time metrics including regime, bias, momentum, and signal quality
The dashboard displays:
1. Current market regime and strength
2. Directional bias score and alignment
3. Momentum state and pressure readings
4. Structural analysis and proximity to levels
5. Signal qualification score and grade
6. Active position sizing and risk metrics
7. Multi-timeframe alignment status
Input Parameters
Regime Detection:
ADX Period: Trend strength calculation period (default: 14)
Trend Threshold: Minimum ADX for trend regime (default: 25)
ATR Period: Volatility calculation period (default: 14)
Volatility Expansion/Contraction: Multipliers for regime detection (default: 1.4/0.6)
Bias Calculation:
Fast/Slow/Anchor MAs: Trend calculation periods (default: 21/55/200)
Bias Threshold: Minimum score for directional bias (default: 30)
Multi-Timeframe Settings: Higher timeframes for confirmation (default: 60m/240m/1D)
Risk Management:
Risk Per Trade %: Percentage of equity to risk (default: 1.0%)
ATR Stop Multiplier: Stop distance in ATR units (default: 2.0)
R:R Targets: Profit target multiples (default: 1.5x/2.5x)
Adaptive Sizing: Enable regime-based position sizing (default: true)
Signal Filters:
Minimum Qualification Score: Required confluence score (default: 5)
Signal Cooldown: Bars between signals (default: 1)
Volume Filter: Require above-average volume (default: true)
Bar Confirmation: Wait for bar close (default: true)
How to Use This Strategy
Step 1: Understand Market Regime
Check the dashboard for current market regime. Avoid trading in volatile regimes (red background) unless you have specific volatility-based strategies. Trending regimes (green) are optimal for directional trading, while ranging regimes (purple) suit mean-reversion approaches.
Step 2: Assess Directional Bias
Look for strong bias scores (60+) with multi-timeframe alignment. The bias should be clear across multiple timeframes before considering entries. Weak or conflicting bias suggests waiting for clarity.
Step 3: Confirm Momentum
Ensure momentum indicators support the directional bias. Look for RSI momentum in the direction of the trade, MACD histogram expanding, and stochastic crossovers aligned with the bias.
Step 4: Identify Structural Levels
Entries near structural levels (swing highs/lows) have higher probability. Look for liquidity sweeps that indicate institutional participation before entering in the opposite direction.
Step 5: Check Signal Qualification
Only take trades with qualification scores of 5 or higher. Premium signals (grade A, 75+ quality) offer the highest probability and can be sized more aggressively.
Step 6: Manage Risk Dynamically
Let the strategy's adaptive risk management adjust position sizes and stops based on market conditions. Don't override the system's risk calculations without strong reason.
Best Practices
Trade liquid instruments (major forex pairs, indices, large-cap stocks, major crypto) for reliable signals
Start with the default parameters and only adjust after understanding their impact
Pay attention to regime changes - they often signal strategy adjustments
Use the qualification score as your primary filter - higher scores mean higher probability
Be patient for A-grade setups rather than forcing mediocre trades
Monitor the multi-timeframe alignment - trades against higher timeframes have lower success rates
Let winners run to the second target when momentum is strong
Reduce size during volatile regimes or take a break entirely
Keep a trade journal to note which regime/bias combinations work best for each instrument
Consider economic news events that might trigger regime changes
Strategy Limitations
Like all strategies, performance varies across different market instruments and timeframes
Regime detection may lag during rapid market transitions
Multi-timeframe analysis requires sufficient historical data on all timeframes
The strategy is designed for swing trading and may not be optimal for scalping
Highly correlated instruments may produce similar signals across different pairs
Extreme market events (black swans) can overwhelm any risk management system
Backtested performance does not guarantee future results
The strategy requires discipline to follow all signals, including losing ones
Commissions and slippage can significantly impact performance on smaller timeframes
Success requires understanding the system's logic rather than blind execution
Technical Implementation
Built with Pine Script v6 featuring:
Modular architecture with separate calculation modules for each component
Advanced regime detection using ADX and ATR combinations
Multi-timeframe security requests with proper lookahead management
Dynamic risk management with adaptive position sizing
Comprehensive signal qualification scoring system
Real-time dashboard with 12 key metrics
Visual elements including directional cloud and risk levels
Export functions for integration with other indicators
Alert conditions for all major signal types
The code is fully open-source and can be modified to suit individual trading styles and preferences. All calculations use confirmed bars to prevent repainting.
Originality Statement
This strategy is original in its comprehensive integration of multiple analytical layers into a unified adaptive system. While individual components (ADX, moving averages, RSI, MACD, etc.) are established tools, this strategy is justified because:
It synthesizes six distinct analytical approaches into a cohesive decision framework
The regime-adaptive logic automatically adjusts strategy behavior based on market conditions
The qualification scoring system provides objective criteria for signal selection
Multi-timeframe bias aggregation ensures alignment with the dominant market trend
Structural analysis integration provides context for market microstructure
Volatility-adaptive risk management dynamically adjusts to market conditions
The comprehensive dashboard presents all critical metrics for informed decision-making
Each component contributes unique information: regime tells us when to trade, bias tells us direction, momentum provides timing, structure gives levels, volatility determines sizing, and qualification ensures quality
The strategy's value lies not in any single component but in how these elements work together to create a robust, adaptive trading system that can navigate different market environments while maintaining disciplined risk management.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Past performance does not guarantee future results. The backtested results shown are based on historical data and do not account for real-world factors such as slippage, liquidity issues, or psychological pressures that can affect trading performance.
The strategy's signals are mathematical calculations based on historical patterns and technical indicators. They do not predict future price movements with certainty. Market conditions can change rapidly, rendering previously successful patterns ineffective.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this system.
-Made with passion by officialjackofalltrades
Strategy

APEX V2 [JOAT]APEX V2
Introduction
APEX V2 Enhanced is an advanced open-source algorithmic trading strategy that synthesizes 9 proprietary analytical concepts through a sophisticated confluence system to generate high-probability trade signals. This strategy integrates Flow Absorption Module (FAM), Directional Bias Engine (DBE), Structure Mapping System (SMS), Volatility Classification (VCL), Momentum Divergence Module (MDM), Statistical Reversion Zones (SRZ), Order Flow Analysis (OFA), Anchor Deviation Bands, and Trend Momentum Signals into a unified trading framework with comprehensive risk management.
Unlike single-indicator strategies that produce frequent false signals, APEX V2 requires multi-dimensional confluence before executing trades. This confluence-based approach dramatically reduces false positives while capturing high-conviction institutional moves. The strategy includes adaptive position sizing based on risk percentage, dynamic stop loss and take profit levels, trailing stops, and real-time performance tracking through a comprehensive dashboard.
Why This Strategy Exists
This strategy addresses the fundamental challenge of trading: distinguishing high-probability setups from market noise. Individual analytical methods often produce conflicting signals, leading to whipsaws and losses. APEX V2 solves this by requiring multiple independent confirmation signals before entering trades, ensuring that:
Institutional Activity is Confirmed: FAM and OFA detect when large players are positioning
Directional Bias is Established: DBE quantifies market sentiment through probabilistic analysis
Structural Context is Validated: SMS identifies key support/resistance levels
Volatility Regime is Appropriate: VCL ensures trades occur in favorable volatility conditions
Momentum Divergence is Present: MDM confirms smart money positioning through multi-oscillator divergence
Mean Reversion Opportunity Exists: SRZ identifies statistical extremes for reversal trades
Order Flow is Toxic: OFA detects aggressive institutional buying/selling
Anchor Deviation is Extreme: Multi-timeframe VWAP deviation signals absorption zones
Trend Momentum Confirmation: Trend-following signals with minimal lag
Each analytical module provides a unique perspective on market structure. By requiring confluence across multiple dimensions, APEX V2 captures only the highest-quality setups where institutional activity, technical structure, momentum, volatility, and order flow all align.
Strategy Components Explained
1. Flow Absorption Module (FAM)
FAM analyzes VWAP deviation across 2-minute, 5-minute, and 15-minute timeframes to identify institutional liquidity absorption zones. When price deviates significantly from VWAP (default: 8.0 sigma on 2m/5m, 4.0 sigma on 15m) combined with volume surges (2.25x average) and sufficient relative volume (0.6+), FAM signals institutional absorption.
The strategy requires 2+ timeframe confirmation for FAM signals. Buy signals occur when price is below VWAP with volume surge across multiple timeframes (institutions absorbing at lows). Sell signals occur when price is above VWAP with volume surge (institutions distributing at highs).
FAM contributes 1 point to the confluence score when absorption is detected, indicating institutional players are actively positioning at price extremes.
2. Directional Bias Engine (DBE)
DBE calculates directional bias by analyzing the ratio of bullish vs bearish bars over a lookback period (default: 100 bars) combined with momentum analysis. The engine weights directional bias (60%) and momentum bias (40%) to produce a combined bias score ranging from -1.0 (extreme bearish) to +1.0 (extreme bullish).
When combined bias exceeds the threshold (default: 0.65), DBE signals bullish bias. When below -0.65, it signals bearish bias. This probabilistic approach quantifies market sentiment and filters trades against the prevailing bias.
DBE contributes 1 point to confluence when bias aligns with trade direction, ensuring trades flow with statistical probability rather than against it.
3. Structure Mapping System (SMS)
SMS detects structural pivot highs and pivot lows using configurable left/right bar parameters (default: 10 bars each). The system maintains arrays of the 10 most recent resistance and support levels, then checks if current price is within 1% of any tracked level.
When price approaches support (within 1% of recent pivot lows), SMS signals potential bounce. When price approaches resistance (within 1% of recent pivot highs), SMS signals potential rejection. These structural levels represent areas where price previously reversed, making them high-probability zones for future reversals.
SMS contributes 1 point to confluence when price is near support (for longs) or resistance (for shorts), providing structural context for entries.
4. Volatility Classification (VCL)
VCL classifies current volatility regime using ATR percentile ranking over a lookback period (default: 100 bars). The system calculates normalized ATR (ATR / price * 100) and determines its percentile rank. High volatility is defined as 70th percentile or above, low volatility as 30th percentile or below.
While VCL doesn't directly contribute to confluence scoring, it provides critical context displayed in the dashboard. High volatility regimes may require wider stops, while low volatility regimes may produce more reliable mean reversion signals.
The strategy adapts to volatility by using ATR-based position sizing and stop loss placement, ensuring risk management scales with market conditions.
5. Momentum Divergence Module (MDM)
MDM detects multi-oscillator divergences by comparing price pivots with RSI pivots. Bullish divergence occurs when price makes lower lows but RSI makes higher lows (indicating weakening selling pressure). Bearish divergence occurs when price makes higher highs but RSI makes lower highs (indicating weakening buying pressure).
The system tracks divergence counts and requires a minimum number of divergences (default: 2) before signaling. This prevents single-divergence false signals and ensures sustained divergence patterns.
MDM contributes 1 point to confluence when divergence aligns with trade direction, confirming that smart money is positioning against the prevailing price trend.
6. Statistical Reversion Zones (SRZ)
SRZ combines Bollinger Bands with RSI to identify statistical extremes for mean reversion trades. The system calculates Bollinger Bands (default: 20-period, 2.0 standard deviations) and RSI (default: 14-period) to detect oversold and overbought conditions.
Oversold signals occur when price is below the lower Bollinger Band AND RSI is below 30. Overbought signals occur when price is above the upper Bollinger Band AND RSI is above 70. These dual conditions ensure both price and momentum are at extremes.
SRZ contributes 1 point to confluence when statistical extremes align with trade direction, identifying high-probability mean reversion opportunities.
7. Order Flow Analysis (OFA)
OFA detects institutional order flow through toxicity analysis and absorption coefficient calculation. The toxicity index measures aggressive vs passive order flow by analyzing candle position and volume. When toxicity exceeds threshold (default: 0.7), it indicates institutions are aggressively taking liquidity.
The absorption coefficient quantifies institutional absorption by measuring volume intensity relative to price movement. High absorption (default: 0.75+) with minimal price movement indicates institutions are positioning without moving price significantly.
OFA calculates a confidence score (0-100%) based on absorption strength and toxicity. When confidence exceeds minimum threshold (default: 75%), OFA signals high-probability institutional activity.
OFA contributes 1 point to confluence when institutional footprints are detected with high confidence, confirming large players are actively positioning.
8. Anchor Deviation Bands
Anchor Deviation analyzes multi-timeframe VWAP deviation (2m, 5m, 15m) combined with oscillator sigma gap confirmation. The system calculates VWAP deviation using configurable methods (Price Volatility, Z-Score, or Spread StDev) and measures the gap between VWAP deviation and oscillator z-scores.
Buy signals occur when 2+ timeframes show negative VWAP deviation (price below VWAP) with 2+ timeframes confirming oscillator gap. Sell signals occur when 2+ timeframes show positive VWAP deviation with gap confirmation.
Anchor Deviation contributes 1 point to confluence when multi-timeframe tension is detected, indicating price is at extreme deviation from institutional reference levels.
9. Trend Momentum Signals
Trend Momentum Signals use a zero-lag EMA combined with volatility bands and trend strength analysis. The system calculates a zero-lag EMA by compensating for lag (EMA of price + (price - price )), then applies volatility bands using ATR multiplier (default: 1.5x).
The trend strength score is calculated by comparing current zero-lag EMA with historical values over a loop range (default: 1-70 bars). Long signals occur when trend score exceeds uptrend threshold (default: 5) AND price is above the upper volatility band. Short signals occur when trend score is below downtrend threshold (default: -5) AND price is below the lower volatility band.
Trend Momentum contributes 1 point to confluence when trend signals align with trade direction, providing trend-following confirmation with minimal lag.
10. Deviation Reversion System Component
The Deviation Reversion System component calculates deviation levels from a moving average (configurable: WMA, SMA, RMA, EMA, HMA). Three deviation levels are defined (default: 1.3%, 7.5%, 13.3%) representing progressively extreme deviations from the mean.
Buy signals occur when price drops below the first deviation level (mean - 1.3%). Sell signals occur when price rises above the first deviation level (mean + 1.3%). This component identifies when price has deviated sufficiently from its mean to warrant mean reversion trades.
Deviation Reversion contributes 1 point to confluence when price is at deviation extremes, complementing the SRZ module with a simpler percentage-based approach.
Confluence System & Signal Aggregation
APEX V2's core innovation is its confluence system. The strategy counts bullish and bearish signals from all 9 analytical modules:
FAM: Absorption buy/sell (2+ timeframe confirmation)
DBE: Bullish/bearish bias (>0.65 or <-0.65)
SMS: Near support/resistance (within 1%)
MDM: Bullish/bearish divergence (2+ divergences)
SRZ: Oversold/overbought (BB + RSI extremes)
OFA: Institutional buy/sell (75%+ confidence)
Anchor Deviation: Tension buy/sell (2+ timeframe + gap confirmation)
Deviation Reversion: Buy/sell signal (price at deviation levels)
Trend Momentum: Long/short signal (trend score + volatility bands)
When confluence mode is enabled (default: ON), the strategy requires a minimum number of modules to agree (default: 3 out of 9) before executing trades. This dramatically reduces false signals by ensuring multiple independent perspectives confirm the setup.
If both long and short signals meet confluence requirements simultaneously, the strategy selects the direction with more confirming modules. If tied, no trade is executed to avoid ambiguous setups.
Risk Management System
APEX V2 includes comprehensive risk management:
Position Sizing: Calculated based on risk per trade percentage (default: 2% of equity). The system calculates stop distance using ATR and sizes positions so that if stopped out, the loss equals exactly 2% of account equity.
Stop Loss: Set at a percentage below entry (default: 2% for longs, 2% above for shorts). Stops are placed immediately upon entry to limit maximum loss per trade.
Take Profit: Set at a percentage above entry (default: 4% for longs, 4% below for shorts). This provides a 2:1 reward-to-risk ratio.
Trailing Stop: Activates when take profit level is reached, then trails price by a percentage (default: 1.5%). This locks in profits while allowing winners to run.
Reversal Exits: If an opposite signal meets confluence requirements while in a position, the strategy immediately closes the current position. This prevents holding losing positions when market structure shifts.
Strategy Properties & Backtesting Parameters
The strategy uses realistic backtesting parameters to avoid misleading results:
Initial Capital: $10,000 (realistic for average retail trader)
Position Size: 100% of equity (controlled by risk-based position sizing)
Pyramiding: 3 (allows up to 3 positions in same direction)
Commission: Should be set to realistic levels (0.1% for crypto, 0.05% for forex, $1-5 per trade for stocks)
Slippage: Should be set to realistic levels (5-10 ticks for liquid markets)
Risk Per Trade: 2% (sustainable risk level)
Stop Loss: 2% (prevents catastrophic losses)
Take Profit: 4% (2:1 reward-to-risk ratio)
These parameters ensure backtesting results reflect realistic trading conditions. The strategy is designed to generate 100+ trades over a sufficient dataset to produce statistically significant results.
Visual Elements
FAM Gradient Ribbon: 5-layer cyan/magenta ribbon showing liquidity absorption intensity around VWAP
OFA Gradient Ribbon: 5-layer gold/indigo ribbon showing institutional order flow intensity
Anchor Deviation Ribbon: 5-layer teal/purple ribbon showing multi-timeframe VWAP tension
Entry Signals: Green triangle up for LONG entries, red triangle down for SHORT entries
Position Markers: Small circles below/above bars indicating active positions
Stop Loss Lines: Red lines showing stop loss levels for active positions
Take Profit Lines: Green lines showing take profit targets for active positions
Average Entry Price: White line showing average entry price for active positions
Comprehensive Dashboard: Real-time metrics including position status, P&L, signal confluence, individual module status, and performance metrics
Dashboard Metrics
The dashboard displays 20+ real-time metrics:
Position Status:
Status: LONG, SHORT, or FLAT
Position Size: Current position quantity
P&L: Open profit/loss in currency and percentage
Signal Confluence:
Bull Signals: Count of bullish indicators (X/9) with checkmark if confluence met
Bear Signals: Count of bearish indicators (X/9) with checkmark if confluence met
Individual Indicator Status:
FAM: BUY/SELL with deviation value
DBE: BULL/BEAR with bias score
SMS: SUP/RES (support/resistance proximity)
VCL: HIGH/LOW/NORM with percentile
MDM: BULL/BEAR with RSI value
SRZ: OS/OB (oversold/overbought) with RSI value
OFA: INST+/INST-/TOX+/TOX- with confidence percentage
ADB: BUY/SELL with deviation value
TMS: LONG/SHORT with trend score
Performance Metrics:
Win Rate: Percentage and win/loss ratio
Net Profit: Currency and percentage return
Equity: Current equity and percentage change from initial capital
Input Parameters
Strategy Settings:
Enable LONG/SHORT Trades: Toggle trade directions
Require Multi-Module Confluence: Enable/disable confluence requirement
Minimum Confluence Count: Number of modules that must agree (1-7, default: 3)
FAM Settings:
Enable FAM, VWAP Mode, Deviation Method, Volume Lookback, Volume Surge Multiplier, RVOL Threshold, 2m/5m/15m Thresholds, Show Gradient Ribbon
DBE Settings:
Enable DBE, Bias Lookback, Bias Threshold, Momentum Weight
SMS Settings:
Enable SMS, Pivot Left/Right Bars, Structure Lookback
VCL Settings:
Enable VCL, ATR Length, Regime Lookback, High/Low Vol Thresholds
MDM Settings:
Enable MDM, RSI Length, Pivot Lookback, Min Divergences
SRZ Settings:
Enable SRZ, Bollinger Length/Multiplier, RSI Length, RSI Overbought/Oversold
OFA Settings:
Enable OFA, Toxicity Lookback/Threshold, Min Absorption Coefficient, Minimum Confidence %, Show Gradient Ribbon
Anchor Deviation Settings:
Enable Anchor Deviation, VWAP Dev Mode, 2m/5m/15m VWAP Thresholds, 2m/5m/15m Osc σ-Gap Thresholds, Show Gradient Ribbon
Deviation Reversion Settings:
Enable Deviation Reversion System, MA Type, MA Period, Deviation 1/2/3 percentages
Trend Momentum Settings:
Enable Trend Momentum Signals, Zero Lag Length, Volatility Multiplier, Loop Start/End, Threshold Uptrend/Downtrend
Risk Management Settings:
Enable Stop Loss, Stop Loss %, Enable Take Profit, Take Profit %, Enable Trailing Stop, Trailing Stop %, Risk Per Trade %
Visualization Settings:
Show Entry/Exit Signals, Show Dashboard, Show All Gradient Ribbons, Ribbon Brightness Adjust
How to Use This Strategy
Step 1: Configure Backtesting Parameters
Set realistic commission and slippage in Strategy Properties. For crypto: 0.1% commission, 10 ticks slippage. For forex: 0.05% commission, 5 ticks slippage. For stocks: $1-5 per trade commission, 5 ticks slippage.
Step 2: Set Risk Parameters
Configure Risk Per Trade (default: 2%), Stop Loss (default: 2%), and Take Profit (default: 4%). These provide sustainable risk management with 2:1 reward-to-risk ratio.
Step 3: Choose Confluence Level
Set Minimum Confluence Count based on your risk tolerance. Higher confluence (4-5 indicators) produces fewer but higher-quality signals. Lower confluence (2-3 indicators) produces more signals but with more false positives.
Step 4: Enable/Disable Indicators
Toggle individual modules based on market conditions and your trading style. For trending markets, emphasize DBE, Trend Momentum, and Anchor Deviation. For ranging markets, emphasize SRZ, MDM, and Deviation Reversion.
Step 5: Monitor Dashboard
Watch the dashboard for signal confluence. When Bull Signals shows 3+/9 with checkmark, the strategy is ready to enter long. When Bear Signals shows 3+/9 with checkmark, ready to enter short.
Step 6: Review Individual Indicators
Check which specific modules are signaling. High-quality setups show alignment across multiple module types (institutional + technical + momentum + volatility).
Step 7: Backtest on Sufficient Data
Run backtests on datasets that generate 100+ trades for statistical significance. Review win rate, net profit, maximum drawdown, and profit factor.
Step 8: Optimize Parameters
Adjust module parameters for your specific instrument and timeframe. Avoid over-optimization - parameters should work across multiple instruments and time periods.
Step 9: Forward Test
After backtesting, forward test on paper trading or small live positions to validate strategy performance in real market conditions.
Step 10: Monitor Performance
Track Win Rate, Net Profit, and Equity metrics in the dashboard. If performance degrades, re-evaluate parameters or market conditions.
Best Practices
Use on liquid instruments with sufficient volume for reliable signals
Higher confluence (4-5 modules) is recommended for beginners to reduce false signals
Lower confluence (2-3 modules) can be used by experienced traders who can filter signals manually
Backtest on multiple timeframes (5m, 15m, 1h, 4h) to find optimal timeframe for your instrument
Use realistic commission and slippage - overly optimistic parameters produce misleading results
Risk no more than 2% per trade to ensure account survival during drawdown periods
Monitor VCL (Volatility Classification) - high volatility may require wider stops or reduced position size
Combine with higher timeframe trend analysis - trading with the trend improves win rate
Review individual module signals to understand why confluence was met
Disable modules that consistently produce false signals for your specific instrument
Enable trailing stops to lock in profits on winning trades
Use pyramiding (default: 3) to add to winning positions when additional confluence signals appear
Avoid trading during major news events - volatility spikes can invalidate technical signals
Backtest over multiple market conditions (trending, ranging, high volatility, low volatility)
Forward test for at least 100 trades before committing significant capital
Strategy Limitations
Requires sufficient historical data for all modules - may not work well on newly listed instruments
Multi-timeframe analysis (FAM, Anchor Deviation) requires data availability on 2m, 5m, 15m timeframes
Confluence requirement reduces trade frequency - may produce few signals on some instruments/timeframes
Backtesting results are historical and do not guarantee future performance
Strategy performance degrades during extreme volatility events (flash crashes, circuit breakers)
Commission and slippage significantly impact profitability - must use realistic values
Pyramiding can amplify losses if market reverses after adding to position
Stop loss placement using fixed percentage may be suboptimal during volatility regime changes
Module parameters optimized for one instrument may not work on others
Requires regular monitoring and parameter adjustment as market conditions evolve
Dashboard metrics are real-time snapshots and can change rapidly during volatile periods
Strategy assumes sufficient liquidity to execute at desired prices - may not work on illiquid instruments
Trailing stops can be triggered by normal volatility, closing winning trades prematurely
Reversal exits may close positions too early if opposite signal is temporary
Technical Implementation
Built with Pine Script v6 using:
9 independent analytical modules with individual enable/disable controls
Multi-timeframe security requests for FAM and Anchor Deviation (2m, 5m, 15m)
Confluence-based signal aggregation with configurable minimum threshold
Risk-based position sizing using ATR and account equity
Dynamic stop loss, take profit, and trailing stop management
Strategy.entry and strategy.exit functions for automated trade execution
Reversal exit logic to close positions when opposite confluence is met
Three 5-layer gradient ribbons (FAM, OFA, Anchor Deviation) with progressive transparency
Comprehensive dashboard with 20+ real-time metrics using table visualization
5 alert conditions for trade signals and position changes
Performance tracking (win rate, net profit, equity) displayed in dashboard
Pyramiding support (up to 3 positions) for scaling into winning trades
The code is fully open-source and can be modified to suit individual trading styles and risk tolerances.
Originality Statement
This strategy is original in its multi-confluence approach to algorithmic trading. The strategy synthesizes multiple analytical concepts into a unified framework:
It synthesizes 9 proprietary analytical concepts into a unified confluence system
The confluence requirement dramatically reduces false signals compared to single-method strategies
Each concept provides a unique perspective: institutional activity (FAM, OFA), directional bias (DBE), structural context (SMS), volatility regime (VCL), momentum divergence (MDM), mean reversion (SRZ), anchor deviation (multi-timeframe), and trend following (Trend Momentum)
Risk management system uses ATR-based position sizing to risk exactly 2% per trade regardless of stop distance
Reversal exit logic closes positions when opposite confluence is met, preventing holding losing positions during structure shifts
Comprehensive dashboard synthesizes 20+ metrics into actionable intelligence
Three gradient ribbons (FAM, OFA, Anchor Deviation) provide visual confirmation of institutional activity and order flow
Strategy is designed with realistic backtesting parameters (commission, slippage, position sizing) to avoid misleading results
Pyramiding support allows scaling into winning positions when additional confluence appears
Individual module enable/disable controls allow customization for different market conditions and trading styles
The strategy's value lies in its systematic approach to trade selection through multi-dimensional confluence. By requiring agreement across institutional activity, technical structure, momentum, volatility, and order flow, APEX V2 captures only the highest-quality setups where all factors align. This reduces emotional decision-making and provides a repeatable, testable framework for algorithmic trading.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Past performance does not guarantee future results. Backtesting results are hypothetical and may not reflect actual trading performance. Always use proper risk management, never risk more than you can afford to lose, and thoroughly test any strategy on paper before committing real capital. Commission, slippage, and market conditions significantly impact profitability. No strategy works in all market conditions. Regular monitoring and parameter adjustment are required.
-Made with passion by officialjackofalltrades
Strategy

[ A L P H A X ] Sniper - Tiered Entry + TP/SL LevelsAlphaX Sniper — Multi-Layer Confluence Scoring, Tiered Entry Grading, ATR-Based TP/SL Levels, Trailing Stop & Sniper Kill Zones
AlphaX Sniper is a precision entry system built around a multi-factor confluence scoring engine that evaluates trend strength, oscillator positioning, volume, session quality, and higher timeframe bias simultaneously — then grades every signal into one of three tiers: A, AA, or AAA. Designed for traders who want surgical, high-confidence entries rather than a constant stream of noise. Built for XAUUSD, forex majors, and indices across intraday timeframes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📸 Visual Overview
Full chart view showing trend ribbon, tiered signal labels, TP/SL levels, sniper kill zones, and trailing stop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The Trend Engine — How It Works
At the foundation of AlphaX Sniper is a four-EMA Trend Engine that scores the current market structure from -4 to +4 and classifies it into distinct trend states:
Fast EMA (8) — immediate momentum reference, most sensitive to price changes
Medium EMA (21) — intermediate trend confirmation layer
Slow EMA (55) — the trend backbone, filters short-term noise
Anchor EMA (200) — the macro structural divider; being above or below it determines the dominant bias
The engine scores four independent conditions each bar:
EMA ribbon alignment (Fast > Medium > Slow for bull, reverse for bear)
Fast EMA slope direction (accelerating up or down)
Medium EMA slope direction
Price position relative to the Anchor EMA
Each condition contributes ±1 to the Trend Score , producing a value from -4 to +4:
+4 / +3 — Strong Bull Trend
+2 — Moderate Bull Trend
+1 — Mild Bull
0 — Neutral / Ranging
-1 — Mild Bear
-2 — Moderate Bear Trend
-4 / -3 — Strong Bear Trend
The space between the Fast EMA and Slow EMA is filled with a Trend Ribbon — yellow-green during bull conditions, red during bear conditions, and gray when the market is neutral or transitioning. The ribbon visually communicates the current trend state at a glance without requiring you to read any values.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 The Confluence Scoring System
Every signal in AlphaX Sniper is produced by a real-time confluence scoring engine that evaluates six independent factors and produces a bull score and a bear score from 0 to 100 on every bar.
Trend Strength (up to 30 points)
Strong Bull/Bear Trend (score ±3 or ±4) — 30 points
Moderate Trend (score ±2) — 20 points
Mild Trend (score ±1) — 10 points
Neutral — 0 points
RSI Positioning (up to 20 points)
RSI recovering from pullback zone (crossing back above/below threshold) — 20 points
RSI sitting in pullback zone — 12 points
RSI already extended in the opposite direction — up to -15 points (penalty)
Stochastic Trigger (up to 15 points)
%K crossing %D while recovering from oversold/overbought territory — 15 points
%K/%D crossover alone — 12 points
%K exiting oversold or overbought zone — 8 points
MACD Alignment (up to 10 points)
When MACD filter is enabled: aligned and accelerating — 10 points; aligned but flat — 5 points
When MACD filter is disabled: full 10 points awarded by default (does not penalize)
Volume Quality (up to 10 points)
Volume spike (>1.5× the 20-SMA) — 10 points
Above-average volume (>1.0×) — 7 points
Meets minimum volume threshold — 4 points
Candle Structure, HTF Bias & Session (up to 10 points)
Strong directional candle with solid body — 5 points
Higher timeframe EMA alignment confirming the same direction — 5 points
London/NY overlap session — 5 points; London or NY solo — 3 points; Asia — 0 points
Penalty Deductions
RSI at extreme opposing level — up to -15 points
Low volatility (ATR filter active and failing) — -10 points
Asian session — -8 points
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Three-Tier Signal Grading (A / AA / AAA)
Tiered signal labels — AAA signals carry the highest confluence score and strongest setup quality
Once the confluence scores are calculated and all filters pass, signals are graded into three quality tiers:
AAA ▲ / ▼ — Score ≥ 65. Maximum confluence. All major factors aligned. Highest-conviction entries. Displayed with the brightest label color.
AA ▲ / ▼ — Score 45–64. Strong setup with multiple confirming factors. High-quality entry with most conditions in your favor.
A ▲ / ▼ — Score 30–44. Valid setup meeting all trigger and filter requirements, but fewer confirming factors. Still a filtered, quality signal — not noise.
Signals below 30 are never displayed regardless of trigger conditions. The tier label appears directly on the chart with the score printed in parentheses so you can see exactly how strong the confluence was: e.g. ▲ AAA (71) or ▼ AA (52) .
A cooldown window (default: 5 bars) prevents back-to-back signals from firing in quick succession during choppy conditions. Bull and bear cooldowns are tracked independently.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 ATR-Based TP/SL Levels
Automatically plotted TP1, TP2, TP3, and SL dashed lines extending forward from every signal bar
Every signal automatically generates a full set of Take Profit and Stop Loss levels based on the current ATR, placing them at configurable multiples of market volatility rather than fixed pip values:
Stop Loss — 1.5× ATR from entry (default) — tight enough to protect capital, wide enough to breathe
TP1 — 1.5× ATR — the conservative first target, ideal for partial profit-taking
TP2 — 3.0× ATR — the primary target for the main portion of the position
TP3 — 5.0× ATR — the extended runner target for strong momentum moves
All levels are plotted as dashed horizontal lines extending 25 bars forward from the signal bar with clean price labels. As price hits each level, a TP1 ✓ / TP2 ✓ / TP3 ✓ marker appears on the chart and the dashboard TP Status updates in real time. When the stop loss is hit, a SL ✕ marker appears and the active trade state resets.
All ATR multiples are fully configurable. Adjust the SL multiple tighter for higher-timeframe trades or wider for volatile instruments like XAUUSD during news events.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 Trailing Stop
A dynamic trailing stop follows the active trade, ratcheting in the direction of the move to protect accumulated profits:
During a long trade — the trail is calculated as close − (ATR × multiplier) and only moves upward, never retracing
During a short trade — the trail is close + (ATR × multiplier) and only moves downward
If price violates the trailing stop, the active trade state resets and the trail line disappears
Default trail multiplier: 2.0× ATR — aggressive enough to capture trends while giving the position room to breathe
The trailing stop is plotted as a step-line in the bull or bear color and updates on every bar in real time.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🗺 Sniper Kill Zones
Shaded entry zones appearing on signal bars — the price area between the entry candle and the stop loss level
On every signal bar, AlphaX Sniper draws a Sniper Kill Zone — a shaded rectangular box that marks the entry price area:
For bull signals — the zone spans from the signal bar's high down to the stop loss level, colored in the bull theme
For bear signals — the zone spans from the stop loss level down to the bar's low, colored in the bear theme
The box extends forward a configurable number of bars (default: 6) to visually represent the entry window
Kill zones serve as a visual reminder of where a valid re-entry or limit order can be placed after the initial signal bar closes. If price pulls back into the zone during the next few bars, the setup is still within its original risk structure.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱ Session Filter & Session Quality
Session timing has a direct impact on signal quality. AlphaX Sniper tracks four session windows based on UTC/GMT time:
London/NY Overlap — highest liquidity, strongest follow-through, 100 session quality score
New York — strong directional sessions, 85 quality score
London — clean trend sessions especially in the open, 80 quality score
Asia — lowest liquidity, prone to false moves, 30 quality score — signals here receive an -8 point penalty
The optional Session Filter can be enabled to block all signals outside of London and NY entirely. When disabled (default), the session quality factor still penalizes Asian session signals through the scoring system — you see them, but they score lower.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Live Dashboard
Real-time dashboard showing all key market state values at a glance
The built-in dashboard displays a full snapshot of current market conditions in real time:
TREND — current trend state: STRONG BULL / BULL / MILD BULL / NEUTRAL / MILD BEAR / BEAR / STRONG BEAR
TREND SCORE — the raw score from -4 to +4 powering the trend classification
RSI — current RSI value color-coded by zone (overbought / neutral / oversold)
STOCH K — current stochastic %K value with overbought/oversold coloring
MACD — current MACD state: BULL MOM / BULL / BEAR MOM / BEAR / FLAT
VOLUME — volume classification (SPIKE / HIGH / NORMAL / DRY) with live ×ratio vs the 20-SMA
ATR — current ATR value and ATR as a percentage of price
SESSION — current active session name (LN/NY / NEW YORK / LONDON / ASIA / OFF-SESSION)
HTF BIAS — higher timeframe EMA alignment: BULLISH / BEARISH / NEUTRAL
ACTIVE TRADE — current trade direction: LONG / SHORT / NONE
TP STATUS — live progress through the TP levels: RUNNING → TP1 ✓ → TP2 ✓✓ → TP3 ✓✓✓ / SL HIT
BULL SCORE — current bull confluence score out of 100
BEAR SCORE — current bear confluence score out of 100
Dashboard position (Top Right default), text size, and colors are all configurable.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX Sniper — Step by Step
Step 1 — Read the Dashboard
Check the Trend and Trend Score — are you in a strong trend or a neutral range?
Check HTF Bias — does the higher timeframe EMA structure confirm your direction?
Check Session — are you in London or NY? If Asia, expect lower-quality signals.
Step 2 — Wait for a Tiered Signal
An ▲ AAA / AA / A label below the bar is your bull entry signal
A ▼ AAA / AA / A label above the bar is your bear entry signal
Prioritize AAA signals in trending markets — these represent maximum confluence
AA signals are still high quality and tradable in most conditions
A signals are valid but consider taking smaller size or waiting for additional confirmation
Step 3 — Use the Kill Zone for Entry
Enter at the close of the signal bar, or wait for a pullback into the Kill Zone
A limit order inside the Kill Zone can offer a better entry price while staying within the original risk structure
Step 4 — Set Your Levels
Stop Loss is plotted automatically — honor it
Target TP1 first for a partial close, then trail the remainder toward TP2 and TP3
Let the trailing stop manage the remainder once TP1 is achieved
Step 5 — Monitor TP Progress
The dashboard TP Status updates as each level is hit
TP ✓ markers appear on the chart at the bar where each target was reached
If the trailing stop tightens and triggers before TP3, that is the system protecting your profit — respect it
Step 6 — Reset on SL Hit
An SL ✕ marker appears when price hits the stop level
The active trade state resets — the dashboard returns to NONE and TP tracking clears
Reassess the dashboard for a fresh signal before re-entering
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
📊 Four-EMA Trend Engine with -4 to +4 scoring — classifies trend into 7 distinct strength states
🎯 Three-tier signal grading (A / AA / AAA) — score printed on every label for full transparency
🧠 Multi-factor confluence scoring across trend, RSI, Stochastic, MACD, volume, session, and HTF bias
📐 Automatic ATR-based TP1 / TP2 / TP3 and SL levels plotted on every signal
🛡 Dynamic trailing stop — ratchets with the move, resets on breach
🗺 Sniper Kill Zones — shaded entry boxes marking the valid entry area for limit orders
⏱ Session-aware scoring — London/NY overlap rewarded, Asia penalized
🔭 Higher timeframe bias filter — built-in HTF EMA alignment check without switching charts
⚙ Optional filters — Volume, Candle Body Strength, MACD Alignment, ATR Volatility Minimum, Session
🕒 Configurable signal cooldown — prevents signal spam during choppy transitions
📋 Live 13-row dashboard — trend state, scores, oscillators, volume, session, trade status, TP progress
🎨 Cohesive dual-tone color system — yellow-green for bull, red for bear, gray for neutral
🔔 17 alert conditions — tiered entries, any entry, TP levels, SL, trend state changes
⚙ Fully configurable — all EMA periods, RSI/Stoch parameters, TP/SL multiples, filters, colors, and dashboard settings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Trend Engine
Trend Fast EMA — momentum reference (default: 8)
Trend Medium EMA — intermediate confirmation (default: 21)
Trend Slow EMA — trend backbone (default: 55)
Trend Anchor EMA — macro structural divider (default: 200)
Show Trend EMAs — toggle EMA line and ribbon visibility
Show Anchor EMA (200) — toggle the 200 EMA separately
Sniper Entry
RSI Period — oscillator lookback (default: 9)
RSI Bull Pullback ≤ — threshold defining the bull pullback zone (default: 48)
RSI Bear Pullback ≥ — threshold defining the bear pullback zone (default: 52)
Stoch Length — stochastic lookback (default: 14)
Stoch Smooth — %K smoothing period (default: 3)
Stoch Overbought / Oversold — extreme zone thresholds (default: 75 / 25)
Precision Filters
Require Volume Confirmation — enforce minimum volume vs 20-SMA (default: off)
Min Volume vs 20-SMA — minimum volume ratio when filter is on (default: 0.6×)
Require Candle Strength — enforce minimum body/range ratio (default: on)
Min Body/Range Ratio — minimum candle body as a fraction of full range (default: 0.25)
Require MACD Alignment — block signals when MACD is counter-directional (default: off)
Filter Low Volatility — require minimum ATR % of price (default: off)
Min ATR % of Price — minimum ATR threshold when volatility filter is on (default: 0.02%)
Signal Cooldown (bars) — minimum bars between same-direction signals (default: 5)
TP / SL
Show TP/SL Levels — toggle all TP and SL line display
ATR Period for TP/SL — ATR calculation period (default: 14)
Stop Loss ATR Multiple — SL distance (default: 1.5×)
TP1 / TP2 / TP3 ATR Multiples — target distances (defaults: 1.5× / 3.0× / 5.0×)
Sniper Zones
Show Sniper Kill Zones — toggle entry zone boxes
Zone Forward Extension — how many bars the zone box extends forward (default: 6)
Session Filter
Enable Session Filter — block signals outside kill zone windows (default: off)
London Open / NY Open / NY Close / Asia Open / Asia Close — configurable GMT hour boundaries
Appearance
Label Size — Tiny / Small / Normal
Show Trailing Stop — toggle trailing stop line
Trail ATR Multiple — trailing stop distance (default: 2.0×)
Colors
Full dual-tone color system — every bull, bear, and neutral element is independently configurable
Separate colors for: ribbon, EMAs, labels (background + text), TP lines, SL lines, kill zones, trailing stops, dashboard
Dashboard
Show Dashboard — toggle visibility
Position — Top Left / Top Right / Bottom Left / Bottom Right (default: Top Right)
Text Size — Tiny / Small / Normal
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions
AAA Bull Sniper Entry — fires on maximum-confluence bull signals only
AA Bull Sniper Entry — fires on high-quality bull signals
A Bull Sniper Entry — fires on valid bull signals
AAA / AA / A Bear Sniper Entry — same three tiers for bear signals
Any Bull Sniper Entry — fires on any bull signal regardless of tier
Any Bear Sniper Entry — fires on any bear signal regardless of tier
Any Sniper Entry — fires on any signal in either direction
TP1 Hit / TP2 Hit / TP3 Hit — fires when each take profit level is reached
Stop Loss Hit — fires when the stop loss is breached
Strong Bull Trend Started — fires when Trend Score first reaches ≥ +3
Strong Bear Trend Started — fires when Trend Score first reaches ≤ -3
All alert messages include {{ticker}} and {{interval}} placeholders for clean webhook integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Default Settings — Optimized For
The default configuration is specifically tuned for XAUUSD (Gold) on the 1-minute and 5-minute timeframes :
RSI period of 9 for fast response to gold's intraday price swings
Candle Strength filter on (0.25 body ratio) to avoid wicks and indecision candles
Cooldown of 5 bars prevents signal clustering during volatile transitions
Session scoring automatically penalizes Asian-session signals on gold
Trail ATR multiple at 2.0× provides generous breathing room for gold's characteristic oscillations
For other instruments or timeframes, consider adjusting:
Higher timeframes (15m, 1H) — increase EMA periods, increase TP2/TP3 multiples to 4×/7×
Forex majors — reduce Fast EMA to 5–8, reduce SL multiple to 1.0–1.2×
Indices (NAS100, US30) — increase RSI period to 11–14, enable MACD filter for extra precision
More signals — reduce cooldown, disable Candle Strength filter, lower score threshold to ~25
Fewer signals — enable all filters, increase cooldown to 8–10 bars, use AAA alerts only
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🥇 Gold (XAUUSD) scalpers and intraday traders — default settings tuned specifically for gold's session structure and volatility
📉 Forex traders — applicable to all majors and minors with minor EMA and RSI adjustments
📊 Index traders — works on US30, NAS100, SPX500, DAX, and others
🧠 Data-driven traders — the scored, graded signal system provides a quantitative framework rather than arbitrary lines on a chart
🎯 Precision-focused traders — tiered grading lets you focus exclusively on AAA setups for the highest-conviction trades
📈 Trade management focused traders — the automatic TP/SL levels, trailing stop, and live TP status tracker remove the guesswork from position management
⚠ Traders who struggle with overtrading — the cooldown, minimum score threshold, and optional filters physically prevent low-quality signals from appearing
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
Session detection uses UTC/GMT — the indicator automatically identifies London, NY, and Asia windows on any broker timezone
Higher timeframe bias is calculated using multiplied EMA periods on the same chart rather than requesting a secondary timeframe — this avoids repainting and keeps all calculations on bar close
All signal conditions are evaluated on bar close — the indicator does not repaint
The trailing stop logic and TP hit detection use intrabar high/low values to accurately reflect when levels were reached, consistent with standard trade execution behavior
Maximum 500 labels are used — on very long chart histories at low timeframes, the oldest labels may be automatically removed by PulseWire's rendering limits
Volume-based features (volume filter, volume score) may behave differently on instruments with limited volume data — consider disabling the volume filter on synthetics and CFDs if volume data is unreliable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ 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 demand precision over volume — fewer signals, higher conviction, complete trade management. Indicator

ATR Trend Strategy with Moving Average | Fixed TP/SL version📈 ## ATR Trend Strategy with Moving Average
# Overview
This strategy combines a **Moving Average trend filter** with an **ATR-based breakout channel** to identify directional market movements. It is designed for traders who prefer **systematic trend-following strategies with clearly defined risk management**.
The script builds an adaptive channel around a selected Moving Average using **Average True Range (ATR)**. When price moves beyond the ATR band and the move is confirmed for a defined number of bars, a trend state is established. Trade entries can then occur either on the initial breakout or on a pullback to the Moving Average.
The strategy also includes **fixed percentage Take Profit and Stop Loss levels**, allowing users to evaluate performance under consistent risk parameters.
---
⚙️ # Key Features
• **Multiple Moving Average types**
Supports EMA, SMA, WMA, Hull MA, VWMA, RMA, and TEMA.
• **ATR-based dynamic channel**
Uses ATR to create adaptive upper and lower boundaries around the Moving Average.
• **Two entry methods**
Users can choose between breakout entries or Moving Average pullback entries.
• **Trend confirmation filter**
Signals are confirmed only after a configurable number of bars remain beyond the ATR boundary.
• **Built-in risk management**
Includes fixed percentage Take Profit and Stop Loss levels.
• **Trade visualization**
Displays the TP/SL zone directly on the chart for each trade.
• **Performance statistics panel**
Shows key strategy metrics such as:
* Total trades
* Win rate
* Profit factor
* Net profit
* Expectancy
* Average R
* Maximum drawdown
---
🧠 # Strategy Logic
The strategy follows a simple **trend-following structure** :
1️⃣ A Moving Average defines the market's baseline trend.
2️⃣ An ATR multiplier builds a dynamic volatility channel around the Moving Average.
3️⃣ When price breaks above or below this channel and remains there for a specified number of bars, a trend is confirmed.
4️⃣ Entries can occur via:
**Breakout Mode**
* Long when price breaks above the upper ATR band.
* Short when price breaks below the lower ATR band.
**MA Cross Mode**
* After a confirmed trend, entries occur on pullbacks that cross the Moving Average.
5️⃣ Risk is controlled using **fixed percentage Take Profit and Stop Loss levels**.
---
⚙️ # Inputs
Moving Average
* MA Type
* MA Length
* MA Source
ATR Signal
* ATR Type
* ATR Length
* ATR Multiplier
Trend Confirmation
* Number of confirmation bars
* Confirmation price source (Close or High/Low)
Entry & Risk Management
* Entry method (Breakout or MA Cross)
* Take Profit (%)
* Stop Loss (%)
---
📊 ## Usage Notes
This strategy is designed for **trend-following market conditions** and may perform best in environments with sustained directional movement.
Users are encouraged to **experiment with different Moving Average types, ATR multipliers, and confirmation settings** to adapt the strategy to different markets and timeframes.
---
⚠️ ## Disclaimer
This script is provided for **educational and research purposes only**.
Past performance does not guarantee future results.
---
Strategy

Indicator

Indicator

AxMan Exhaustion Detection Reversal Rider1. The "Exhaustion" Phase (The Warning)
The strategy first looks for a Yellow or Orange Diamond. This isn't a signal to buy yet; it’s a warning that the current trend is dying.
The Logic: It looks for a massive spike in volume combined with an "over-extended" RSI.
The Visual: Imagine a car slamming on its brakes at high speed. The tires smoke (Volume Spike), and the car skids (RSI Oversold).
The Filter: This prevents you from entering a trade when the market is "boring" or slowly drifting. You only care about the moments of peak panic or peak euphoria.
2. The "Locked & Loaded" Window (The 12-Candle Rule)
Once that "Exhaustion" diamond appears, the chart background changes color. The strategy is now hunting for a trade.
The Logic: It gives the market exactly 12 candles to prove it can reverse.
Why 12? If the market doesn't reverse within 12 candles, the "exhaustion" was just a pause, and the old trend is likely to continue. This rule keeps you out of "dead zones" where the price just goes sideways.
3. The "Trigger" (The Fast Entry)
This is where the strategy beats traditional indicators. It doesn't wait for a fancy moving average crossover.
The Logic: As soon as a candle closes above the high of the previous candle (for a Long) or below the low (for a Short), it enters.
The Goal: It gets you in at the absolute "bend" of the trend. By the time most traders see a trend change, this strategy is already in profit.
4. The "Ride" (The Exit)
This strategy is not about "scalping" small profits. It is designed to stay in the trade as long as the trend is healthy.
The Exit Rule: It only closes the trade if:
Opposite Exhaustion: It sees the same "panic" signal happening on the other side (The Target).
Trend Break: The price closes on the wrong side of the 50 EMA (The Safety Net).
The Result: This allows you to "Ride the Wave" during massive moon-shots or market crashes, often staying in a single trade for days on the 4H chart.
Why It’s "Adaptive"
Because it uses standard deviations for volume and previous candle breaks for entry, it behaves correctly whether you are looking at a 15-minute chart (fast day trading) or a Daily chart (long-term investing). It scales its "expectations" based on the timeframe you choose.
Summary in one sentence: "We wait for the sellers to get exhausted, wait for the buyers to step in and break one high, and then we hold until the buyers get tired too." Strategy

Configurable EMA Stack StrategyThis strategy uses a configurable exponential moving average (EMA) stack to define directional bias and an EMA cross to manage entries and exits.
The script calculates six user-defined EMAs (EMA 1 through EMA 6). Each EMA can be shown or hidden on the chart independently, and each can also be included or excluded from the bias filter. When multiple EMAs are enabled for bias, the script requires them to be strictly aligned in sequence:
Bullish bias: shorter enabled EMAs must be above longer enabled EMAs
Bearish bias: shorter enabled EMAs must be below longer enabled EMAs
Trade execution is driven by the EMA 1 / EMA 2 cross:
Long entries occur when bullish bias is active and EMA 1 crosses above EMA 2, or when bullish bias becomes active while EMA 1 is already above EMA 2
Short entries occur when bearish bias is active and EMA 1 crosses below EMA 2, or when bearish bias becomes active while EMA 1 is already below EMA 2
Long exits occur when EMA 1 crosses below EMA 2
Short exits occur when EMA 1 crosses above EMA 2
Default script settings use 0.10% commission and 1 tick of slippage. These are baseline placeholders for testing and should be adjusted to match the instrument, market, and timeframe being evaluated.
This is a simple, transparent trend-following baseline designed for testing EMA alignment behavior across different symbols and timeframes. The main configurable element is not a proprietary signal model, but the ability to control which EMAs participate in the bias stack and which EMA plots are visible on the chart. That makes it useful as a flexible template for studying how stricter or looser EMA alignment changes trade frequency and behavior.
Default strategy properties currently include commission and slippage. Those settings should be reviewed and adjusted to fit the market being tested. PulseWire’s strategy rules require realistic cost assumptions, and if you change the defaults used in the script, the publication description should match the settings shown in your published backtest.
Important notes:
This is not presented as a complete trading system or a promise of performance
Results will vary by symbol, timeframe, market conditions, fees, slippage, and position sizing
This script is intended as an educational and analytical baseline that users can test and adapt to their own process Strategy

Indicator

Precision Confluence Trading Strategy [JOAT]Precision Confluence Trading Strategy
Introduction
The Precision Confluence Trading Strategy is an open-source algorithmic trading system that combines Central Pivot Range (CPR) analysis, Hull Moving Average (HMA) ribbon alignment, WaveTrend oscillator signals, multi-oscillator divergence detection, ADX trend strength, volume confirmation, Smart Money Concepts (FVG, Order Blocks, Liquidity Sweeps), and multi-timeframe analysis into a comprehensive confluence-based strategy. This mashup creates an institutional-grade trading system designed to identify high-probability setups where multiple independent analytical frameworks simultaneously signal the same direction.
The strategy addresses a fundamental challenge in algorithmic trading: single-factor systems produce too many false signals and lack robustness across different market conditions. By requiring confluence across 9 different analytical components before entering trades, this system significantly reduces false signals and focuses capital on only the highest-quality setups where technical, momentum, volume, and institutional factors all align.
Chart showing strategy entries with confluence dashboard on 4H timeframe
Why This Mashup Exists
This strategy combines nine analytical frameworks that address different aspects of market analysis:
CPR Analysis: Identifies key pivot levels where institutional algorithms make decisions
HMA Ribbon: Measures trend quality through 5-layer moving average alignment
WaveTrend Oscillator: Detects momentum cycles and overbought/oversold conditions
Multi-Oscillator Divergence: Identifies momentum exhaustion across RSI, MACD, Stochastic RSI
ADX Trend Strength: Quantifies trend strength to avoid weak, choppy markets
Volume Confirmation: Validates moves with volume analysis and delta calculations
Smart Money Concepts: Tracks institutional footprints (FVG, Order Blocks, Liquidity Sweeps)
Multi-Timeframe Analysis: Ensures directional alignment across 15M, 1H, and 4H timeframes
Key Moving Averages: Confirms position relative to SMA 50/200 institutional levels
Each component addresses a different market dimension: CPR provides static structure, HMA shows trend quality, WaveTrend captures momentum cycles, Divergences warn of exhaustion, ADX measures trend strength, Volume confirms genuine moves, SMC reveals institutional behavior, MTF ensures alignment, and Key MAs provide institutional context. Together, they create a multi-dimensional analysis system that no single indicator can provide.
The mashup is justified because these components use fundamentally different data and methodologies (pivot calculations, weighted moving averages, wave oscillators, directional movement, volume analysis, price inefficiencies, multi-timeframe data, simple moving averages) that respond to different market conditions. When they align, it indicates genuine high-probability setup rather than noise from a single analytical method.
Core Strategy Logic
1. CPR Analysis Component (0-15 points)
Central Pivot Range provides structural reference levels:
// Daily and Weekly CPR calculation
= calcCPR(dHigh, dLow, dClose)
= calcCPR(wHigh, wLow, wClose)
// CPR scoring
cprBullScore = 0
cprBullScore += close > dPivot and close > wPivot ? 10 : 0
cprBullScore += close > dTC ? 3 : 0
cprBullScore += cprNarrow ? 2 : 0 // Narrow CPR = breakout potential
cprBearScore = 0
cprBearScore += close < dPivot and close < wPivot ? 10 : 0
cprBearScore += close < dBC ? 3 : 0
cprBearScore += cprNarrow ? 2 : 0
CPR contribution: Up to 15 points for strong position relative to pivots with narrow CPR indicating breakout potential.
2. HMA Ribbon Alignment Component (0-15 points)
5-layer Hull Moving Average ribbon measures trend quality:
// Calculate 5 HMAs
hma8 = hullMA(close, 8)
hma13 = hullMA(close, 13)
hma21 = hullMA(close, 21)
hma34 = hullMA(close, 34)
hma55 = hullMA(close, 55)
// Full alignment check
hmaFullBullish = hma8 > hma13 and hma13 > hma21 and hma21 > hma34 and hma34 > hma55
hmaFullBearish = hma8 < hma13 and hma13 < hma21 and hma21 < hma34 and hma34 < hma55
// EMA cloud
emaCloudBullish = emaFast > emaSlow
// HMA scoring
hmaRibbonBullScore = 0
hmaRibbonBullScore += hmaBullish ? 5 : 0
hmaRibbonBullScore += hmaFullBullish ? 7 : 0 // Full alignment = strong trend
hmaRibbonBullScore += emaCloudBullish ? 3 : 0
HMA contribution: Up to 15 points for full ribbon alignment with EMA cloud confirmation.
3. WaveTrend Oscillator Component (0-15 points)
WaveTrend detects momentum cycles and extreme conditions:
= calcWaveTrend(hlc3, wtChannelLen, wtAverageLen)
// WaveTrend signals
wtCrossUp = ta.crossover(wt1, wt2)
wtCrossDown = ta.crossunder(wt1, wt2)
wtOversold = wt1 < -60
wtOverbought = wt1 > 60
// WaveTrend scoring
wtBullScore = 0
wtBullScore += wtCrossUp and wtOversold ? 8 : wtCrossUp ? 5 : 0
wtBullScore += wtBullDiv ? 5 : 0 // Divergence adds weight
wtBullScore += wtMomentumBullish ? 2 : 0
WaveTrend contribution: Up to 15 points for crossover in extreme zone with divergence and momentum confirmation.
4. Multi-Oscillator Divergence Component (0-10 points)
Tracks divergences across RSI, MACD, and Stochastic RSI:
// Divergence detection
rsiBullDiv = price LL and rsi HL
wtBullDiv = price LL and wt1 HL
strongBullDiv = rsiBullDiv and wtBullDiv
// Divergence scoring
divBullScore = 0
divBullScore += rsiBullDiv ? 5 : 0
divBullScore += strongBullDiv ? 5 : 0 // Multiple oscillators = stronger signal
Divergence contribution: Up to 10 points for multi-oscillator divergence indicating momentum exhaustion.
5. ADX Trend Strength Component (0-10 points)
ADX quantifies trend strength to avoid choppy markets:
= ta.dmi(adxLength, adxLength)
strongTrend = adx > adxThreshold // Default: 20
trendBullish = plus > minus
// ADX scoring
adxBullScore = strongTrend and trendBullish ? 10 : trendBullish ? 5 : 0
ADX contribution: Up to 10 points for strong trend (ADX > 20) in correct direction.
6. Volume Confirmation Component (0-10 points)
Volume analysis validates genuine institutional participation:
volMA = ta.sma(volume, volMaLength)
highVolume = volume > volMA * 1.5
climaxVolume = volume > volMA * 3.0
// Volume delta
volumeDelta = ta.cum(buyVolume) - ta.cum(sellVolume)
deltaRising = volumeDelta > volumeDeltaMA
// Volume scoring
volBullScore = 0
volBullScore += volConfirmedBull ? 7 : bullishVolume ? 5 : 0
volBullScore += climaxVolume and close > open ? 3 : 0
Volume contribution: Up to 10 points for high volume with rising delta confirming institutional buying.
7. Smart Money Concepts Component (0-10 points)
SMC tracks institutional order flow patterns:
// Fair Value Gaps
significantBullFVG = bullishFVG and fvgSize > 0.3%
// Order Blocks
bullishOB = bearish candles + strong bullish candle + high volume
// Liquidity Sweeps
volConfirmedSweepLow = sweep below recent low + high volume
// Displacement
bullishDisplacement = large candle (> 2x ATR) + climax volume
// SMC scoring
smcBullScore = 0
smcBullScore += significantBullFVG ? 2 : 0
smcBullScore += bullishOB ? 2 : 0
smcBullScore += volConfirmedSweepLow ? 2 : 0
smcBullScore += bullishDisplacement ? 3 : 0
SMC contribution: Up to 10 points for multiple institutional footprints (FVG + OB + Sweep + Displacement).
8. Multi-Timeframe Analysis Component (0-15 points)
Ensures directional alignment across higher timeframes:
// Request higher timeframe data
= request.security(syminfo.tickerid, "15", htfTrend())
= request.security(syminfo.tickerid, "60", htfTrend())
= request.security(syminfo.tickerid, "240", htfTrend())
// Alignment check
mtfBullish = htf15mDir == 1 and htf1hDir == 1 and htf4hDir == 1
mtfStrongBullish = mtfBullish and htf15mStrong and htf1hStrong and htf4hStrong
// MTF scoring
mtfBullScore = 0
mtfBullScore += mtfStrongBullish ? 15 : mtfBullish ? 10 : htf1hDir == 1 ? 5 : 0
MTF contribution: Up to 15 points for all three higher timeframes aligned with strong trends.
9. Key Moving Average Component (0-10 points)
Position relative to institutional moving averages:
sma50 = ta.sma(close, 50)
sma200 = ta.sma(close, 200)
goldenCross = sma50 > sma200
// MA scoring
maBullScore = 0
maBullScore += close > sma50 ? 3 : 0
maBullScore += close > sma200 ? 4 : 0
maBullScore += goldenCross ? 3 : 0
MA contribution: Up to 10 points for price above key MAs with Golden Cross.
Dashboard showing confluence score breakdown by component
Total Confluence Scoring System
The strategy calculates total confluence score (0-100) by summing all components:
bullConfluenceScore = cprBullScore + // 0-15
hmaRibbonBullScore + // 0-15
wtBullScore + // 0-15
divBullScore + // 0-10
adxBullScore + // 0-10
volBullScore + // 0-10
smcBullScore + // 0-10
mtfBullScore + // 0-15
maBullScore // 0-10
// Total: 0-100
Entry signals require:
Bullish confluence score >= minConfluenceScore (default: 70)
Bearish confluence score < 30 (avoid conflicting signals)
Optional session filter (London/NY sessions only)
Signal tiers:
LONG: Confluence score >= 70
STRONG LONG: Confluence score >= 80
ULTRA LONG: Confluence score >= 90 (rare, highest probability)
Risk Management System
The strategy implements comprehensive risk controls:
1. ATR-Based Position Sizing
atr = ta.atr(14)
stopLossDistance = atr * 2
// Calculate position size based on risk
accountSize = strategy.equity
riskAmount = accountSize * (riskPercent / 100) // Default: 2%
positionSize = riskAmount / stopLossDistance
2. Dynamic Stop Loss and Take Profit
// Dynamic stop based on market structure
dynamicStopBull = math.min(close - stopLossDistance, ta.lowest(low, 10))
// Take profit based on risk:reward ratio
takeProfit = close + (stopLossDistance * rewardRatio) // Default: 2:1
3. Breakeven Management
// Move stop to breakeven when profit reaches threshold
if close >= entryPrice + (stopLossDistance * breakevenTrigger) // Default: 1.0 R:R
strategy.exit("Long Exit", "Long", stop=entryPrice, limit=takeProfit)
4. Trailing Stop (Optional)
if useTrailingStop
trailDistance = close * (trailOffset / 100) // Default: 1.5%
strategy.exit("Long Exit", "Long", trail_offset=trailDistance)
Strategy Execution Logic
// Long Entry
if longSignal and strategy.position_size == 0
stopLoss = dynamicStopBull
takeProfit = close + (stopLossDistance * rewardRatio)
strategy.entry("Long", strategy.long)
strategy.exit("Long Exit", "Long", stop=stopLoss, limit=takeProfit)
// Label with confluence score
label.new(bar_index, low,
"LONG Score: " + str.tostring(bullConfluenceScore),
style=label.style_label_up,
color=entryColor)
// Short Entry (mirror logic)
if shortSignal and strategy.position_size == 0
// Similar logic for short trades
Performance Dashboard
The strategy displays a comprehensive 12-row dashboard:
Row 1: Component header
Row 2: Current position (LONG/SHORT/FLAT)
Row 3: Total confluence score (bull/bear)
Row 4: CPR component score
Row 5: HMA Ribbon component score
Row 6: WaveTrend component score
Row 7: Divergence component score
Row 8: ADX component score
Row 9: Volume component score
Row 10: SMC component score
Row 11: MTF component score
Row 12: Equity and P&L percentage
Strategy Parameters
Strategy Settings:
Use Multi-Timeframe Confirmation: Enable MTF analysis (default: enabled)
Use Divergence Signals: Enable divergence component (default: enabled)
Use Smart Money Concepts: Enable SMC component (default: enabled)
Use Volume Confirmation: Enable volume component (default: enabled)
Use CPR Levels: Enable CPR component (default: enabled)
Use WaveTrend Signals: Enable WaveTrend component (default: enabled)
Use HMA Alignment: Enable HMA component (default: enabled)
Use Session Filter: Trade only during London/NY sessions (default: enabled)
Minimum Confluence Score: Threshold for entry (default: 70, range: 50-100)
Risk Management:
Risk Per Trade %: Percentage of equity to risk (default: 2.0%, range: 0.1-10%)
Reward:Risk Ratio: Take profit multiplier (default: 2.0, range: 1.0-5.0)
Use Trailing Stop: Enable trailing stop (default: enabled)
Trailing Stop %: Trail distance (default: 1.5%, range: 0.1-5.0%)
Use Breakeven: Move stop to breakeven (default: enabled)
Breakeven Trigger: R:R threshold to move stop (default: 1.0, range: 0.5-3.0)
Indicator Parameters:
RSI Length: Period for RSI (default: 14)
ADX Length: Period for ADX (default: 14)
ADX Threshold: Minimum ADX for strong trend (default: 20)
Volume MA Length: Period for volume average (default: 20)
HMA Length: Period for HMA (default: 21)
WaveTrend Channel Length: (default: 10)
WaveTrend Average Length: (default: 21)
Backtesting Configuration
Default strategy properties:
Initial Capital: $10,000
Default Qty Type: Percent of Equity
Default Qty Value: 10%
Commission Type: Percent
Commission Value: 0.1% (10 basis points)
Slippage: 2 ticks
Max Bars Back: 5000
These settings represent realistic trading conditions for the average trader. Commission and slippage account for typical broker fees and execution costs.
How to Use This Strategy
Step 1: Configure Components
Enable/disable components based on your trading style. All components enabled provides maximum filtering but fewer trades.
Step 2: Set Confluence Threshold
Adjust minimum confluence score. Higher threshold (80-90) = fewer, higher-quality trades. Lower threshold (60-70) = more frequent trades.
Step 3: Configure Risk Parameters
Set risk per trade (1-2% recommended) and reward:risk ratio (2:1 minimum recommended). Enable breakeven and trailing stop for protection.
Step 4: Backtest Thoroughly
Run backtests on multiple timeframes and market conditions. Aim for 100+ trades for statistical significance. Review win rate, profit factor, and drawdown.
Step 5: Analyze Component Contribution
Use dashboard to see which components contribute most to winning trades. Consider adjusting weights or disabling low-value components.
Step 6: Forward Test
Paper trade the strategy before risking real capital. Verify that live results align with backtest expectations.
Best Practices
Use on 15-minute to 4-hour timeframes for optimal signal quality
Confluence score above 80 produces highest win rate but fewer trades
Enable all components for maximum filtering in volatile markets
Disable some components for more frequent trades in trending markets
Session filter (London/NY only) significantly improves results
Risk 1-2% per trade maximum for sustainable trading
Aim for minimum 2:1 reward:risk ratio
Review dashboard component scores to understand trade quality
Backtest on minimum 6-12 months of data
Verify 100+ trades in backtest for statistical validity
Strategy Limitations
Confluence-based systems produce fewer trades - may not suit active traders
Requires all components to align - perfect setups are rare
Backtesting results may not reflect live trading with slippage and latency
Multi-timeframe analysis can cause repainting on lower timeframes
High confluence threshold (90+) may produce too few trades for some markets
Commission and slippage significantly impact profitability
Strategy optimized for trending markets - may underperform in ranges
Past performance does not guarantee future results
Requires understanding of all components for effective parameter tuning
Complex system with many parameters - over-optimization risk
Backtesting Considerations
When evaluating backtest results:
Sample Size: Minimum 100 trades for statistical significance
Win Rate: 40-60% is realistic for 2:1 R:R strategy
Profit Factor: Above 1.5 is good, above 2.0 is excellent
Max Drawdown: Should be less than 20% of initial capital
Sharpe Ratio: Above 1.0 indicates good risk-adjusted returns
Trade Frequency: Should match your trading availability
Equity Curve: Should show steady growth, not erratic spikes
Consecutive Losses: Prepare for 5-10 consecutive losses
Adjust parameters if:
Win rate < 35% with 2:1 R:R (increase confluence threshold)
Too few trades (< 50 in 6 months) (decrease confluence threshold or disable some components)
Max drawdown > 25% (reduce risk per trade or increase confluence threshold)
Profit factor < 1.2 (strategy may not be viable)
Technical Implementation
Built with Pine Script v6 using:
9-component confluence scoring system
CPR calculations with width analysis
5-layer HMA ribbon with full alignment detection
WaveTrend oscillator with divergence tracking
Multi-oscillator divergence detection (RSI, MACD, Stoch RSI)
ADX trend strength measurement
Volume analysis with delta calculations
Smart Money Concepts (FVG, OB, Liquidity Sweeps, Displacement)
Multi-timeframe analysis (15M, 1H, 4H)
ATR-based dynamic position sizing
Breakeven and trailing stop management
Comprehensive 12-row dashboard
Session filtering (London/NY)
The code is fully open-source and can be modified to adjust component weights, confluence thresholds, and risk parameters.
Originality Statement
This strategy is original in its comprehensive multi-component confluence approach. While individual components (CPR, HMA, WaveTrend, Divergences, ADX, Volume, SMC, MTF, Key MAs) are established analytical tools, this mashup is justified because:
It integrates 9 independent analytical frameworks using fundamentally different data and methodologies
The confluence scoring system quantifies setup quality across all components (0-100 scale)
Each component addresses a different market dimension (structure, trend, momentum, strength, volume, institutional flow, timeframe alignment)
Tiered signal system (LONG/STRONG/ULTRA) provides graduated confidence levels
Comprehensive risk management with ATR-based sizing, breakeven, and trailing stops
Component-level dashboard allows traders to understand what drives each trade
Session filtering aligns with institutional trading hours
Integration reveals complete market picture that no single indicator provides
Each component contributes unique information: CPR provides structure, HMA shows trend quality, WaveTrend captures momentum cycles, Divergences warn of exhaustion, ADX measures strength, Volume confirms moves, SMC reveals institutional behavior, MTF ensures alignment, and Key MAs provide institutional context. The strategy's value lies in requiring confluence across these independent frameworks, significantly reducing false signals and focusing capital on only the highest-probability setups where all factors align.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Backtesting results do not guarantee future performance. Past results, whether real or indicated by historical tests, are not indicative of future results. There are frequently sharp differences between backtested results and actual results subsequently achieved by any trading strategy.
The confluence score is a mathematical calculation based on current market data, not a prediction of future price movement. High confluence scores do not ensure profitable trades. Market conditions change, and strategies that worked historically may not work in the future.
Commission and slippage settings in backtests may not accurately reflect live trading conditions. Real trading results will vary based on execution quality, market liquidity, broker fees, and other factors not captured in backtesting.
No representation is being made that any account will or is likely to achieve profits or losses similar to those shown in backtests. Users should thoroughly test any strategy in a paper trading environment before risking real capital.
Always use proper risk management. Never risk more than you can afford to lose. The default 2% risk per trade is a guideline - adjust based on your personal risk tolerance and account size. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Strategy

SuperTrend AI Adaptive - Strategy [BTC]+2,091% returns. 1.94 profit factor. 28% max drawdown.
Buy and hold returned ~785% over the same period with 75%+ drawdowns. This strategy returned 2,091% with less than a third of the drawdown. Consistent upward equity curve through bull markets, bear markets, and sideways chop.
This is the strategy version of SuperTrend AI . Same regime-adaptive engine, same AI scoring, now with full entries, exits, and risk management built in.
◈ How It Works
The strategy detects market regime shifts (trending, volatile, ranging) and adapts the SuperTrend multiplier automatically. Every trend flip is scored 0-100 by a 5-factor AI engine. Only high-scoring flips become trade entries.
The 5 scoring factors:
Volume Surge: was there conviction behind the flip?
Displacement: how far did price break through the band?
Trend Alignment: does the EMA agree with the direction?
Regime Quality: trending regimes score highest, ranging get penalized
Band Distance: how far did price travel to reach the flip point?
Low-scoring flips are skipped entirely. This is the main edge. Standard SuperTrend enters on every flip. This strategy is selective.
◈ Regime Adaptation
TRENDING regime: multiplier stays at base. Normal conditions, normal entries.
VOLATILE regime: multiplier widens automatically. Prevents noise-driven entries. Band turns amber on chart.
RANGING regime: multiplier tightens slightly. Entries are blocked by default because SuperTrend gets chopped in ranges.
The regime filter alone eliminates most of the losing trades that kill standard SuperTrend strategies.
◈ Risk Management
Three stop loss modes:
ATR-based (default): dynamic stop that adjusts to current volatility
Percent: fixed percentage stop
SuperTrend: exit only on trend flip
Take profit modes:
Risk:Reward ratio (default 2.5:1): TP based on SL distance
Percent: fixed percentage target
None: hold until stop or flip
Optional trailing stop for locking in profits on extended trends. All parameters are adjustable.
◈ Why It Beats Buy and Hold
Buy and hold works in hindsight. In real time, you sit through 50-75% drawdowns hoping for recovery. This strategy:
Shorts during bear markets instead of bleeding. The 2022 and early 2026 bear legs were profitable, not just survivable.
Stays flat during ranging markets. No entries when conditions are bad.
Compounds gains from both directions. Longs in uptrends, shorts in downtrends.
The equity curve tells the story. Consistent staircase up with controlled pullbacks vs the rollercoaster of buy and hold.
◈ Default Settings (optimized for BTCUSDT 4H)
SuperTrend: ATR 10, Base Multiplier 3.0
Regime: Lookback 40, ADX 14, Threshold 20
AI Engine: Trend EMA 50, Volume MA 20, Min Score 65
Risk: SL Mode ATR, SL ATR Mult 6.0, TP Mode RR 2.5:1
Filters: EMA Trend Filter on, Skip Ranging on, Volume Filter on, Cooldown 5
Position: 80% of equity per trade
Commission: 0.06% (Binance futures level), 2 ticks slippage
◈ Adapting to Other Assets
These defaults are tuned for BTCUSDT 4H. For other assets, adjust:
Other crypto (ETH, SOL) 4H: Same settings, may need Min Score 60
Forex 1H to 4H: Lower position size to 20-30%, tighten SL to 2.5-3.0 ATR, trend following works less well on forex
Indices 1H: SL ATR 3.0-4.0, position size 30-50%
SuperTrend strategies work best on assets that trend. Crypto on higher timeframes trends the hardest.
◈ Backtest Notes
Period: Jan 2015 to Feb 2026 (10+ years, includes multiple bull and bear cycles)
Initial capital: $10,000 USDT
Commission: 0.06% per trade (realistic for Binance futures)
Slippage: 2 ticks
Position sizing: 80% of equity (compounding)
No pyramiding. One position at a time.
Signals are non-repainting. Entries on confirmed bar close only.
Returns are compounded. The 2,091% figure reflects reinvesting profits at 80% equity per trade. Without compounding, the raw edge is captured by the profit factor (1.94) and win rate (46% at 2.5:1 RR).
◈ Key Metrics
Total P&L: +2,091%
Profit Factor: 1.94
Win Rate: 46.10% (71 of 154 trades)
Max Drawdown: 28.16%
Average trade count: roughly 15 per year
◈ Features
✓ Regime-adaptive SuperTrend with automatic multiplier adjustment
✓ AI signal scoring filters out low-quality trend flips
✓ Three SL modes (ATR, Percent, SuperTrend flip)
✓ Three TP modes (Risk:Reward, Percent, None)
✓ Optional trailing stop
✓ EMA trend filter, regime filter, volume filter
✓ Realistic commission and slippage included
✓ Dashboard showing trend, regime, position status, and signal score
✓ Non-repainting entries on confirmed bar close
✓ 100% original code
◈ Companion Indicator
This strategy is built on the SuperTrend AI indicator. Use the indicator for live chart analysis and the strategy for backtesting and validation. Both available free on my profile.
◈ Disclaimer
Past backtest performance does not guarantee future results. All backtests have inherent limitations including look-ahead bias in parameter selection. These settings were optimized on the full sample period. Always forward-test before risking real capital. Use proper position sizing and risk management. This is not financial advice.
Happy trading. Strategy

Strategy

Grid Bot Demonstrator🚀 Grid Bot Demonstrator
Overview
The Grid Bot Demonstrator is a high-performance visualization tool designed for traders utilizing Grid Trading strategies (similar to Pionex, Binance, or KuCoin).
It allows you to simulate and visualize a grid bot's structure directly on your chart, enabling precise planning of ranges and grid density before deploying capital.
🛠 Key Features
Dynamic Auto-Range: When limits are set to 0, the indicator automatically calculates an optimal range (±10% from current price) rounded to the nearest $10,000—ideal for Bitcoin’s psychological levels.
Dual Mode Support: Seamlessly toggle between Long and Short strategies via a simple dropdown menu.
Intelligent Grid Coloring:
Long Mode: Green lines above price (Take Profit), Red lines below (Buy/Support).
Short Mode: Red lines above price (Entry/Stop), Green lines below (Take Profit).
Performance Optimized (Smart Window): Even with up to 500 grids , the chart remains fluid. The script renders only the 100 lines closest to the current price while maintaining perfect mathematical accuracy of the total grid count.
Boundary Protection: Features bold, distinct safety lines for the Upper and Lower limits so you know exactly when your bot leaves the active trading zone.
📖 How to Use
1. Grid Settings Enter your Upper and Lower price limits. Use "0" for the automated 10k-rounding logic.
2. Grid Count Set the number of grids (up to 500) to match your bot's specific configuration.
3. Strategy Mode Select "Long" or "Short" to instantly adapt the color coding to your trade direction.
4. Scalability Works across all timeframes, from 1-minute scalping to daily charts.
🔬 Technical Specifications
Grid Type: Arithmetic (Equal USD distance between levels).
Engine: Pine Script V5 with max_lines_count optimization.
Clarity: Focuses on visual price levels to provide a clean, distraction-free trading environment. Indicator

Game Theory Strategic Indicator - Archery & Horse Riding Model# Game Theory Strategic Indicator - Archery & Horse Riding Model
## Overview
This indicator applies rigorous game theory mathematics to market analysis, modeling price action as a strategic two-player game between buyers and sellers. The methodology draws from economic game theory, evolutionary dynamics, and zero-sum game optimization.
## Theoretical Foundation
The indicator implements five core game theory concepts:
**1. Expected Utility (Mixed Strategies)**
Calculates E = p×U₁ + (1-p)×U₂ where:
- p = probability distribution based on volume dynamics
- U₁, U₂ = utility payoffs for aggressive vs defensive strategies
- Uses RSI momentum and ATR volatility to quantify payoffs
**2. Nash Equilibrium Detection**
Identifies market states where ui(σᵢ*, σ₋ᵢ*) ≥ ui(σᵢ, σ₋ᵢ*):
- Measures when no participant can improve by changing strategy
- Highlighted with yellow background zones
- Signals reduced edge environments (avoid trading)
**3. Replicator Dynamics**
Models evolutionary strategy adaptation: dx/dt = x(f(x) - φ(x))
- Tracks frequency changes in bullish vs bearish strategies
- Shows which approach is gaining evolutionary fitness
- Purple line indicates strategy evolution trend
**4. Minimax Algorithm**
Implements zero-sum game optimal strategy L(x,y):
- Calculates win/loss ratio over lookback period
- Values > 1.0 suggest favorable risk/reward
- Orange line shows deviation from neutral state
**5. Best Response Function**
Determines optimal action maximizing ui(aᵢ, a₋ᵢ):
- Compares buyer vs seller expected utilities
- Generates primary long/short signals
- Confidence weighted by utility differential
## Visual Elements
**Chart Plots:**
- **Blue Line (Utility Differential)**: Buyer utility minus seller utility. Positive favors longs, negative favors shorts
- **Purple Line (Replicator Dynamics)**: Rate of strategy evolution. Rising = bullish strategies gaining fitness
- **Orange Line (Minimax Deviation)**: Zero-sum game value. Above zero = favorable conditions
- **Pink Area (Mixed Strategy Bias)**: Probability-weighted strategy preference
- **Yellow Background**: Nash equilibrium zones where no player has edge
**Signals:**
- **Green Triangle Up**: Long signal - buyer utility dominates outside equilibrium
- **Red Triangle Down**: Short signal - seller utility dominates outside equilibrium
- **Yellow Diamond**: Equilibrium warning - reduced edge state
**Info Table (Top Right):**
- EU Buyer/Seller: Current expected utilities
- Nash Score: Equilibrium strength (>0.65 = equilibrium)
- Mix Prob: Volume-based probability distribution
- Minimax: Win/loss ratio indicator
## Strategy Metaphors
**Archery (Buyer Strategy)**: Represents precision attacks - targeted entries at optimal risk/reward points, high accuracy required
**Horse Riding (Seller Strategy)**: Represents mobile defense - flexible positioning, quick exits, adaptive to changing terrain
## Parameters
- **Strategy Period (14)**: Lookback for RSI and ATR calculations
- **Mixed Strategy Length (21)**: Period for minimax win/loss analysis
- **Nash Equilibrium Threshold (0.65)**: Minimum score to identify equilibrium (0.5-0.9)
- **Show Trade Signals**: Toggle buy/sell arrows
- **Show Equilibrium Zones**: Toggle background highlighting
## How to Use
1. **Trend Trading**: Take long signals when utility differential (blue) is rising and no equilibrium zone present
2. **Counter-Trend**: Take signals when replicator dynamics (purple) diverges from price
3. **Risk Management**: Avoid trading during yellow equilibrium zones - market has no clear edge
4. **Confirmation**: Best signals occur when minimax > 1.0 and best response aligns with utility differential
5. **Monitoring**: Watch info table for real-time utility balance and equilibrium status
## Alerts
Three alert conditions available:
- **GT Long Signal**: Buyer utility dominates, composite score > 0.5
- **GT Short Signal**: Seller utility dominates, composite score < -0.5
- **Nash Equilibrium**: Market reaches balanced state, avoid new entries
## Mathematical Rigor
All calculations use proper game theory formulations:
- Payoff functions normalized by volatility
- Probability distributions bounded
- Zero-division protection implemented
- Utilities properly weighted in composite score
## Originality Statement
This indicator is original work implementing classical game theory mathematics in a novel market analysis framework. The code, calculations, and interpretation methodology are entirely my own creation. No external scripts were copied or modified.
## Disclaimer
This indicator is for educational purposes. Game theory provides a framework for analyzing strategic interaction but does not guarantee profitable trading. Always use proper risk management, test thoroughly, and understand that past performance does not indicate future results.
---
**Educational Resource**: For deeper understanding of game theory in economics, see Nash (1950) "Equilibrium Points in N-Person Games" and Maynard Smith (1982) "Evolution and the Theory of Games"
```
--- Indicator
