INVITE-ONLY SCRIPT
SigmaKernel - Adaptive

SigmaKernel - Adaptive Self-Optimizing Multi-Factor Trading System
SigmaKernel - Adaptive is a self-learning algorithmic trading strategy that combines four distinct analytical dimensions—momentum, market structure, volume flow, and reversal patterns—within a machine-learning-inspired framework that continuously adjusts its own parameters based on realized trading performance. Unlike traditional fixed-parameter strategies that maintain static weightings regardless of market conditions or results, this system implements a feedback loop that tracks which signal types, directional biases, and market conditions produce profitable outcomes, then mathematically adjusts component weightings, minimum score thresholds, position sizing multipliers, and trade spacing requirements to optimize future performance.
The strategy is designed for futures traders operating on prop firm accounts or live capital, incorporating realistic execution mechanics including configurable entry modes (stop breakout orders, limit pullback entries, or market-on-open), commission structures calibrated to retail futures contracts ($0.62 per contract default), one-tick slippage modeling, and professional risk controls including trailing drawdown guards, daily loss limits, and weekly profit targets. The system features universal futures compatibility—it automatically detects and adapts to any futures contract by reading the instrument's tick size and point value directly from the chart, eliminating the need for manual configuration across different markets.
What Makes This Approach Different
Adaptive Weight Optimization System
The core differentiation is the adaptive learning architecture. The strategy maintains four independent scoring components: momentum analysis (using RSI multi-timeframe, MACD histogram, and DMI/ADX), market structure detection (breakout identification via pivot-based support/resistance and moving average positioning), volume flow analysis (Volume Price Trend indicator with standard deviation confirmation), and reversal pattern recognition (oversold/overbought conditions combined with structural levels).
Each component generates a directional score that is multiplied by its current weight. After every closed trade, the system performs a retrospective analysis on the last N trades (configurable Learning Period, default 15 trades) to calculate win rates for each signal type independently. For example, if momentum-driven trades won 65% of the time while reversal trades won only 35%, the adaptive algorithm increases the momentum weight and decreases the reversal weight proportionally. The adjustment formula is:
New_Weight = Current_Weight + (Component_Win_Rate - Average_Win_Rate) × Adaptation_Speed
This creates a self-correcting mechanism where successful signal generators receive more influence in future composite scores, while underperforming components are de-emphasized. The system separately tracks long versus short win rates and applies directional bias corrections—if shorts consistently outperform longs, the strategy applies a 10% reduction to bullish signals to prevent fighting the prevailing market character.
Dynamic Parameter Adjustment
Beyond component weightings, three critical strategy parameters self-adjust based on performance:
Minimum Signal Score: The threshold required to trigger a trade. If overall win rate falls below 45%, the system increments this threshold by 0.10 per adjustment cycle, making the strategy more selective. If win rate exceeds 60%, the threshold decreases to allow more opportunities. This prevents the strategy from overtrading during unfavorable conditions and capitalizes on high-probability environments.
Risk Multiplier: Controls position sizing aggression. When drawdown exceeds 5%, risk per trade reduces by 10% per cycle. When drawdown falls below 2%, risk increases by 5% per cycle. This implements the professional risk management principle of "bet small when losing, bet bigger when winning" algorithmically.
Bars Between Trades: Spacing filter to prevent overtrading. Base value (default 9 bars) multiplies by drawdown factor and losing streak factor. During drawdown or consecutive losses, spacing expands up to 2x to allow market conditions to change before re-entering.
All adaptation operates during live forward-testing or real trading—there is no in-sample optimization applied to historical data. The system learns solely from its own realized trades.
Universal Futures Compatibility
The strategy implements universal futures instrument detection that automatically adapts to any futures contract without requiring manual configuration. Instead of hardcoding specific contract specifications, the system reads three critical values directly from TradingView's symbol information:
Tick Size Detection: Uses `syminfo.mintick` to obtain the minimum price increment for the current instrument. This value varies widely across markets—ES trades in 0.25 ticks, crude oil (CL) in 0.01 ticks, gold (GC) in 0.10 ticks, and treasury futures (ZB) in increments of 1/32nds. The strategy adapts all entry buffer calculations and stop placement logic to the detected tick size.
Point Value Detection: Uses `syminfo.pointvalue` to determine the dollar value per full point of price movement. For ES, one point equals $50; for crude oil, one point equals $1,000; for gold, one point equals $100. This automatic detection ensures accurate P&L calculations and risk-per-contract measurements across all instruments.
Tick Value Calculation: Combines tick size and point value to compute dollar value per tick: Tick_Value = Tick_Size × Point_Value. This derived value drives all position sizing calculations, ensuring the risk management system correctly accounts for each instrument's economic characteristics.
This universal approach means the strategy functions identically on emini indices (ES, MES, NQ, MNQ), micro indices, energy contracts (CL, NG, RB), metals (GC, SI, HG), agricultural futures (ZC, ZS, ZW), treasury futures (ZB, ZN, ZF), currency futures (6E, 6J, 6B), and any other futures contract available on TradingView. No parameter adjustments or instrument-specific branches exist in the code—the adaptation happens automatically through symbol information queries.
Stop-Out Rate Monitoring System
The strategy includes an intelligent stop-out rate tracking system that monitors the percentage of your last 20 trades (or available trades if fewer than 20) that were stopped out. This metric appears in the dashboard's Performance section with color-coded guidance:
Green (<30% stop-out rate): Very few trades are being stopped out. This suggests either your stops are too loose (giving back profits on reversals) or you're in an exceptional trending market. Consider tightening your Stop Loss ATR multiplier to lock in profits more efficiently.
Orange (30-65% stop-out rate): Healthy range. Your stop placement is appropriately sized for current market conditions and the strategy's risk-reward profile. No adjustment needed.
Red (>65% stop-out rate): Too many trades are being stopped out prematurely. Your stops are likely too tight for the current volatility regime. Consider widening your Stop Loss ATR multiplier to give trades more room to develop.
Critical Design Philosophy: Unlike some systems that automatically adjust stops based on performance statistics, this strategy intentionally keeps stop-loss control in the user's hands. Automatic stop adjustment creates dangerous feedback loops—widening stops increases risk per contract, which forces position size reduction, which distorts performance metrics, leading to incorrect adaptations. Instead, the dashboard provides visibility into stop performance, empowering you to make informed manual adjustments when warranted. This preserves the integrity of the adaptive system while giving you the critical data needed for stop optimization.
Execution Kernel Architecture
The entry system offers three distinct execution modes to match trader preference and market character:
StopBreakout Mode: Places buy-stop orders above the prior bar's high (for longs) or sell-stop orders below the prior bar's low (for shorts), plus a 2-tick buffer. This ensures entries only occur when price confirms directional momentum by breaking recent structure. Ideal for trending and momentum-driven markets.
LimitPullback Mode: Places limit orders at a pullback price calculated as: Entry_Price = Close - (ATR × Pullback_Multiplier) for longs, or Close + (ATR × Pullback_Multiplier) for shorts. Default multiplier is 0.5 ATR. This waits for mean-reversion before entering in the signal direction, capturing better prices in volatile or oscillating markets.
MarketNextOpen Mode: Executes at market on the bar immediately following signal generation. This provides fastest execution but sacrifices the filtering effect of requiring price confirmation.
All pending entry orders include a configurable Time-To-Live (TTL, default 6 bars). If an order is not filled within the TTL period, it cancels automatically to prevent stale signals from executing in changed market conditions.
Professional Exit Management
The exit system implements a three-stage progression: initial stop loss, breakeven adjustment, and dynamic trailing stop.
Initial Stop Loss: Calculated as entry price ± (ATR × User_Stop_Multiplier × Volatility_Adjustment). Users have direct control via the Stop Loss ATR multiplier (default 1.25). The system then applies volatility regime adjustments: ×1.2 in high-volatility environments (stops automatically widen), ×0.8 in low volatility (stops tighten), ×1.0 in normal conditions. This ensures stops adapt to market character while maintaining user control over baseline risk tolerance.
Breakeven Trigger: When profit reaches a configurable multiple of initial risk (default 1.0R), the stop loss automatically moves to breakeven (entry price). This locks in zero-loss status once the trade demonstrates favorable movement.
Trailing Stop Activation: When profit reaches the Trail_Trigger_R multiple (default 1.2R), the system cancels the fixed stop and activates a dynamic trailing stop. The trail uses Step and Offset parameters defined in R-multiples. For example, with Trail_Offset_R = 1.0 and Trail_Step_R = 1.5, the stop trails 1.0R behind price and moves in 1.5R increments. This captures extended moves while protecting accumulated profit.
Additional failsafes include maximum time-in-trade (exits after N bars if specified) and end-of-session flatten (automatically closes all positions X minutes before session end to avoid overnight exposure).
Core Calculation Methodology
Signal Component Scoring
Momentum Component:
- Calculates 14-period DMI (Directional Movement Index) with ADX strength filter (trending when ADX > 25)
- Computes three RSI timeframes: fast (7-period), medium (14-period), slow (21-period)
- Analyzes MACD (12/26/9) histogram for directional acceleration
- Bullish momentum: uptrend (DI+ > DI- with ADX > 25) + MACD histogram rising above zero + RSI fast between 50-80 = +1.6 score
- Bearish momentum: downtrend (DI- > DI+ with ADX > 25) + MACD histogram falling below zero + RSI fast between 20-50 = -1.6 score
- Score multiplies by volatility adjustment factor: ×0.8 in high volatility (momentum less reliable), ×1.2 in low volatility (momentum more persistent)
Structure Component:
- Identifies swing highs and lows using 10-bar pivot lookback on both sides
- Maintains most recent swing high as dynamic resistance, most recent swing low as dynamic support
- Detects breakouts: bullish when close crosses above resistance with prior bar below; bearish when close crosses below support with prior bar above
- Breakout score: ±1.0 for confirmed break
- Moving average alignment: +0.5 when price > SMA20 > SMA50 (bullish structure); -0.5 when price < SMA20 < SMA50 (bearish structure)
- Total structure range: -1.5 to +1.5
Volume Component:
- Calculates Volume Price Trend: VPT = Σ[(Close - Close[1]) / Close[1] × Volume]
- Compares VPT to its 10-period EMA as signal line (similar to MACD logic)
- Computes 20-period volume moving average and standard deviation
- High volume event: current volume > (volume_average + 1× std_dev)
- Bullish volume: VPT > VPT_signal AND high_volume = +1.0
- Bearish volume: VPT < VPT_signal AND high_volume = -1.0
- No score if volume is not elevated (filters out low-conviction moves)
Reversal Component:
- Identifies extreme RSI conditions: RSI slow < 30 (oversold) or > 70 (overbought)
- Requires structural confluence: price at or below support level for bullish reversal; at or above resistance for bearish reversal
- Requires momentum shift: RSI fast must be rising (for bull) or falling (for bear) to confirm reversal in progress
- Bullish reversal: RSI < 30 AND price ≤ support AND RSI rising = +1.0
- Bearish reversal: RSI > 70 AND price ≥ resistance AND RSI falling = -1.0
Composite Score Calculation
Final_Score = (Momentum × Weight_M) + (Structure × Weight_S) + (Volume × Weight_V) + (Reversal × Weight_R)
Initial weights: Momentum = 1.0, Structure = 1.2, Volume = 0.8, Reversal = 0.6
These weights adapt after each trade based on component-specific performance as described above.
The system also applies directional bias adjustment: if recent long trades have significantly lower win rate than shorts, bullish scores multiply by 0.9 to reduce aggressive long entries. Vice versa for underperforming shorts.
Position Sizing Algorithm
The position sizing calculation incorporates multiple confidence factors and automatically scales to any futures contract:
1. Base risk amount = Account_Size × Base_Risk_Percent × Adaptive_Risk_Multiplier
2. Stop distance in price units = ATR × User_Stop_Multiplier × Volatility_Regime_Multiplier × Entry_Buffer
3. Risk per contract = Stop_Distance × Dollar_Per_Point (automatically detected from instrument)
4. Raw position size = Risk_Amount / Risk_Per_Contract
Then applies confidence scaling:
- Signal confidence = min(|Weighted_Score| / Min_Score_Threshold, 2.0) — higher scores receive larger size, capped at 2×
- Direction confidence = Long_Win_Rate (for bulls) or Short_Win_Rate (for bears)
- Type confidence = Win_Rate of dominant signal type (momentum/structure/volume/reversal)
- Total confidence = (Signal_Confidence + Direction_Confidence + Type_Confidence) / 3
Adjusted size = Raw_Size × Total_Confidence × Losing_Streak_Reduction
Losing streak reduction = 0.5 if losing_streak ≥ 5, otherwise 1.0
Universal Maximum Position Calculation: Instead of hardcoded limits per instrument, the system calculates maximum position size as: Max_Contracts = Account_Size / 25000, clamped between 1 and 10 contracts. This means a $50,000 account allows up to 2 contracts, a $100,000 account allows up to 4 contracts, regardless of which futures contract is being traded. This universal approach maintains consistent risk exposure across different instruments while preventing overleveraging.
Final size is rounded to integer and bounded by the calculated maximum.
Session and Risk Management System
Timezone-Aware Session Control
The strategy implements timezone-correct session filtering. Users specify session start hour, end hour, and timezone from 12 supported zones (New York, Chicago, Los Angeles, London, Frankfurt, Moscow, Tokyo, Hong Kong, Shanghai, Singapore, Sydney, UTC). The system converts bar timestamps to the selected timezone before applying session logic.
For split sessions (e.g., Asian session 18:00-02:00), the logic correctly handles time wraparound. Weekend trading can be optionally disabled (default: disabled) to avoid low-liquidity weekend price action.
Multi-Layer Risk Controls
Daily Loss Limit: Strategy ceases all new entries when daily P&L reaches negative threshold (default $2,000). This prevents catastrophic drawdown days. Resets at timezone-corrected day boundary.
Weekly Profit Target: Strategy ceases trading when weekly profit reaches target (default $10,000). This implements the professional principle of "take the win and stop pushing luck." Resets on timezone-corrected Monday.
Maximum Daily Trades: Hard cap on entries per day (default 20) to prevent overtrading during volatile conditions when many signals may generate.
Trailing Drawdown Guard: Optional prop-firm-style trailing stop on account equity. When enabled, if equity drops below (Peak_Equity - Trailing_DD_Amount), all trading halts. This simulates the common prop firm rule where exceeding trailing drawdown results in account termination.
All limits display status in the real-time dashboard, showing "MAX LOSS HIT", "WEEKLY TARGET MET", or "ACTIVE" depending on current state.
How To Use This Strategy
Initial Setup
1. Apply the strategy to your desired futures chart (tested on 5-minute through daily timeframes)
2. The strategy will automatically detect your instrument's specifications—no manual configuration needed for different contracts
3. Configure your account size and risk parameters in the Core Settings section
4. Set your trading session hours and timezone to match your availability
5. Adjust the Stop Loss ATR multiplier based on your risk tolerance (0.8-1.2 for tighter stops, 1.5-2.5 for wider stops)
6. Select your preferred entry execution mode (recommend StopBreakout for beginners)
7. Enable adaptation (recommended) or disable for fixed-parameter operation
8. Review the strategy's Properties in the Strategy Tester settings and verify commission/slippage match your broker's actual costs
The universal futures detection means you can switch between ES, NQ, CL, GC, ZB, or any other futures contract without changing any strategy parameters—the system will automatically adapt its calculations to each instrument's unique specifications.
Dashboard Interpretation
The strategy displays a comprehensive real-time dashboard in the top-right corner showing:
Market State Section:
- Trend: Shows UPTREND/DOWNTREND/CONSOLIDATING/NEUTRAL based on ADX and DMI analysis
- ADX Value: Current trend strength (>25 = strong trend, <20 = consolidating)
- Momentum: BULL/BEAR/NEUTRAL classification with current momentum score
- Volatility: HIGH/LOW/NORMAL regime with ATR percentage of price
Volume Profile Section (Large dashboard only):
- VPT Flow: Directional bias from volume analysis
- Volume Status: HIGH/LOW/NORMAL with relative volume multiplier
Performance Section:
- Daily P&L: Current day's profit/loss with color coding
- Daily Trades: Number of completed trades today
- Weekly P&L: Current week's profit/loss
- Target %: Progress toward weekly profit target
- Stop-Out Rate: Percentage of last 20 trades (or available trades if <20) that were stopped out. Includes all stop types: initial stops, breakeven stops, trailing stops, timeout exits, and EOD flattens. Color coded with actionable guidance:
- Green (<30%): Shows "TIGHTEN" guidance. Very few stop-outs suggests stops may be too loose or exceptional market conditions. Consider reducing Stop Loss ATR multiplier.
- Orange (30-65%): Shows "OK" guidance. Healthy stop-out rate indicating appropriate stop placement for current conditions.
- Red (>65%): Shows "WIDEN" guidance. Too many premature stop-outs. Consider increasing Stop Loss ATR multiplier to give trades more room.
- Status: Overall trading status (ACTIVE/MAX LOSS HIT/WEEKLY TARGET MET/FILTERS ACTIVE)
Adaptive Engine Section:
- Min Score: Current minimum threshold for trade entry (higher = more selective)
- Risk Mult: Current position sizing multiplier (adjusts with performance)
- Bars BTW: Current minimum bars required between trades
- Drawdown: Current drawdown percentage from equity peak
- Weights: M/S/V/R showing current component weightings
Win Rates Section:
- Type: Win rates for Momentum, Structure, Volume, Reversal signal types
- Direction: Win rates for Long vs Short trades
Color coding shows green for >50% win rate, red for <50%
Session Info Section:
- Session Hours: Active trading window with timezone
- Weekend Trading: ENABLED/DISABLED status
- Session Status: ACTIVE/INACTIVE based on current time
Signal Generation and Entry
The strategy generates entries when the weighted composite score exceeds the adaptive minimum threshold (initial value configurable, typically 1.5 to 2.5). Entries display as layered triangle markers on the chart:
- Long Signal: Three green upward triangles below the entry bar
- Short Signal: Three red downward triangles above the entry bar
Triangle tooltip shows the signal score and dominant signal type (MOMENTUM/STRUCTURE/VOLUME/REVERSAL).
Position Management and Stop Optimization
Once entered, the strategy automatically manages the position through its three-stage exit system. Monitor the Stop-Out Rate metric in the dashboard to optimize your stop placement:
If Stop-Out Rate is Green (<30%): You're rarely being stopped out. This could mean:
- Your stops are too loose, allowing trades to give back too much profit on reversals
- You're in an exceptional trending market where tight stops would work better
- Action: Consider reducing your Stop Loss ATR multiplier by 0.1-0.2 to tighten stops and lock in profits more efficiently
If Stop-Out Rate is Orange (30-65%): Optimal range. Your stops are appropriately sized for the strategy's risk-reward profile and current market volatility. No adjustment needed.
If Stop-Out Rate is Red (>65%): You're being stopped out too frequently. This means:
- Your stops are too tight for current market volatility
- Trades need more room to develop before reaching profit targets
- Action: Increase your Stop Loss ATR multiplier by 0.1-0.3 to give trades more breathing room
Remember: The stop-out rate calculation includes all exit types (initial stops, breakeven stops, trailing stops, timeouts, EOD flattens). A trade that reaches breakeven and gets stopped out at entry price counts as a stop-out, even though it didn't lose money. This is intentional—it indicates the stop placement didn't allow the trade to develop into profit.
Optimization Workflow
For traders wanting to customize the strategy for their specific instrument and timeframe:
Week 1-2: Run with defaults, adaptation enabled
Allow the system to execute at least 30-50 trades (the Learning Period plus additional buffer). Monitor which session periods, signal types, and market conditions produce the best results. Observe your stop-out rate—if it's consistently red or green, plan to adjust Stop Loss ATR multiplier after the learning period. Do not adjust parameters yet—let the adaptive system establish baseline performance data.
Week 3-4: Analyze adaptation behavior and optimize stops
Review the dashboard's adaptive weights and win rates. If certain signal types consistently show <40% win rate, consider slightly reducing their base weight. If a particular entry mode produces better fill quality and win rate, switch to that mode. If you notice the minimum score threshold has climbed very high (>3.0), market conditions may not suit the strategy's logic—consider switching instruments or timeframes.
Based on your Stop-Out Rate observations:
- Consistently <30%: Reduce Stop Loss ATR multiplier by 0.2-0.3
- Consistently >65%: Increase Stop Loss ATR multiplier by 0.2-0.4
- Oscillating between zones: Leave stops at default and let volatility regime adjustments handle it
Ongoing: Fine-tune risk and execution
Adjust the following based on your risk tolerance and account type:
- Base Risk Per Trade: 0.5% for conservative, 0.75% for moderate, 1.0% for aggressive
- Stop Loss ATR Multiplier: 0.8-1.2 for tight stops (scalping), 1.5-2.5 for wide stops (swing trading)
- Bars Between Trades: Lower (5-7) for more opportunities, higher (12-20) for more selective
- Entry Mode: Experiment between modes to find best fit for current market character
- Session Hours: Narrow to specific high-performance session windows if certain hours consistently underperform
Never adjust: Do not manually modify the adaptive weights, minimum score, or risk multiplier after the system has begun learning. These parameters are self-optimizing and manual interference defeats the adaptive mechanism.
Parameter Descriptions and Optimization Guidelines
Adaptive Intelligence Group
Enable Self-Optimization (default: true): Master switch for the adaptive learning system. When enabled, component weights, minimum score, risk multiplier, and trade spacing adjust based on realized performance. Disable to run the strategy with fixed parameters (useful for comparing adaptive vs non-adaptive performance).
Learning Period (default: 15 trades): Number of most recent trades to analyze for performance calculations. Shorter values (10-12) adapt more quickly to recent conditions but may overreact to variance. Longer values (20-30) produce more stable adaptations but respond slower to regime changes. For volatile markets, use shorter periods. For stable trends, use longer periods.
Adaptation Speed (default: 0.25): Controls the magnitude of parameter adjustments per learning cycle. Lower values (0.05-0.15) make gradual, conservative changes. Higher values (0.35-0.50) make aggressive adjustments. Faster adaptation helps in rapidly changing markets but increases parameter instability. Start with default and increase only if you observe the system failing to adapt quickly enough to obvious performance patterns.
Performance Memory (default: 100 trades): Maximum number of historical trades stored for analysis. This array size does not affect learning (which uses only Learning Period trades) but provides data for future analytics features including stop-out rate tracking. Higher values consume more memory but provide richer historical dataset. Typical users should not need to modify this.
Core Settings Group
Account Size (default: $50,000): Starting capital for position sizing calculations. This should match your actual account size for accurate risk per trade. The strategy uses this value to calculate dollar risk amounts and determine maximum position size (1 contract per $25,000).
Weekly Profit Target (default: $10,000): When weekly P&L reaches this value, the strategy stops taking new trades for the remainder of the week. This implements a "quit while ahead" rule common in professional trading. Set to a realistic weekly goal—20% of account size per week ($10K on $50K) is very aggressive; 5-10% is more sustainable.
Max Daily Loss (default: $2,000): When daily P&L reaches this negative threshold, strategy stops all new entries for the day. This is your maximum acceptable daily loss. Professional traders typically set this at 2-4% of account size. A $2,000 loss on a $50,000 account = 4%.
Base Risk Per Trade % (default: 0.5%): Initial percentage of account to risk on each trade before adaptive multiplier and confidence scaling. 0.5% is conservative, 0.75% is moderate, 1.0-1.5% is aggressive. Remember that actual risk per trade = Base Risk × Adaptive Risk Multiplier × Confidence Factors, so the realized risk will vary.
Trade Filters Group
Base Minimum Signal Score (default: 1.5): Initial threshold that composite weighted score must exceed to generate a signal. Lower values (1.0-1.5) produce more trades with lower average quality. Higher values (2.0-3.0) produce fewer, higher-quality setups. This value adapts automatically when adaptive mode is enabled, but the base sets the starting point. For trending markets, lower values work well. For choppy markets, use higher values.
Base Bars Between Trades (default: 9): Minimum bars that must elapse after an entry before another signal can trigger. This prevents overtrading and allows previous trades time to develop. Lower values (3-6) suit scalping on lower timeframes. Higher values (15-30) suit swing trading on higher timeframes. This value also adapts based on drawdown and losing streaks.
Max Daily Trades (default: 20): Hard limit on total trades per day regardless of signal quality. This prevents runaway trading during extremely volatile days when many signals may generate. For 5-minute charts, 20 trades/day is reasonable. For 1-hour charts, 5-10 trades/day is more typical.
Session Group
Session Start Hour (default: 5): Hour (0-23 format) when trading is allowed to begin, in the timezone specified. For US futures trading in Chicago time, session typically starts at 5:00 or 6:00 PM (17:00 or 18:00) Sunday evening.
Session End Hour (default: 17): Hour when trading stops and no new entries are allowed. For US equity index futures, regular session ends at 4:00 PM (16:00) Central Time.
Allow Weekend Trading (default: false): Whether strategy can trade on Saturday/Sunday. Most futures have low volume on weekends; keeping this disabled is recommended unless you specifically trade Sunday evening open.
Session Timezone (default: America/Chicago): Timezone for session hour interpretation. Select your local timezone or the timezone of your instrument's primary exchange. This ensures session logic aligns with your intended trading hours.
Prop Guards Group
Trailing Drawdown Guard (default: false): Enables prop-firm-style trailing maximum drawdown. When enabled, if equity drops below (Peak Equity - Trailing DD Amount), all trading halts for the remainder of the backtest/live session. This simulates rules used by funded trader programs where exceeding trailing drawdown terminates the account.
Trailing DD Amount (default: $2,500): Dollar amount of drawdown allowed from equity peak. If your equity reaches $55,000, the trailing stop sets at $52,500. If equity then drops to $52,499, the guard triggers and trading ceases.
Execution Kernel Group
Entry Mode (default: StopBreakout):
- StopBreakout: Places stop orders above/below signal bar requiring price confirmation
- LimitPullback: Places limit orders at pullback prices seeking better fills
- MarketNextOpen: Executes immediately at market on next bar
Limit Offset (default: 0.5x ATR): For LimitPullback mode, how far below/above current price to place the limit order. Smaller values (0.3-0.5) seek minor pullbacks. Larger values (0.8-1.2) wait for deeper retracements but may miss trades.
Entry TTL (default: 6 bars, 0=off): Bars an entry order remains pending before cancelling. Shorter values (3-4) keep signals fresh. Longer values (8-12) allow more time for fills but risk executing stale signals. Set to 0 to disable TTL (orders remain active indefinitely until filled or opposite signal).
Exits Group
Stop Loss (default: 1.25x ATR): Base stop distance as a multiple of the 14-period ATR. This is your primary risk control parameter and directly impacts your stop-out rate. Lower values (0.8-1.0) create tighter stops that reduce risk per trade but may get stopped out prematurely in volatile conditions—expect stop-out rates above 65% (red zone). Higher values (1.5-2.5) give trades more room to breathe but increase risk per contract—expect stop-out rates below 30% (green zone). The system applies additional volatility regime adjustments on top of this base: ×1.2 in high volatility environments (stops widen automatically), ×0.8 in low volatility (stops tighten), ×1.0 in normal conditions. For scalping on lower timeframes, use 0.8-1.2. For swing trading on higher timeframes, use 1.5-2.5. Monitor the Stop-Out Rate metric in the dashboard and adjust this parameter to keep it in the healthy 30-65% orange zone.
Move to Breakeven at (default: 1.0R): When profit reaches this multiple of initial risk, stop moves to breakeven. 1.0R means after price moves in your favor by the distance you risked, you're protected at entry price. Lower values (0.5-0.8R) lock in breakeven faster. Higher values (1.5-2.0R) allow more room before protection.
Start Trailing at (default: 1.2R): When profit reaches this multiple, the fixed stop transitions to a dynamic trailing stop. This should be greater than the BE trigger. Values typically range 1.0-2.0R depending on how much profit you want secured before trailing activates.
Trail Offset (default: 1.0R): How far behind price the trailing stop follows. Tighter offsets (0.5-0.8R) protect profit more aggressively but may exit prematurely. Wider offsets (1.5-2.5R) allow more room for profit to run but risk giving back more on reversals.
Trail Step (default: 1.5R): How far price must move in profitable direction before the stop advances. Smaller steps (0.5-1.0R) move the stop more frequently, tightening protection continuously. Larger steps (2.0-3.0R) move the stop less often, giving trades more breathing room.
Max Bars In Trade (default: 0=off): Maximum bars allowed in a position before forced exit. This prevents trades from "going stale" during periods of no meaningful price action. For 5-minute charts, 50-100 bars (4-8 hours) is reasonable. For daily charts, 5-10 bars (1-2 weeks) is typical. Set to 0 to disable.
Flatten near Session End (default: true): Whether to automatically close all positions as session end approaches. Recommended to avoid carrying positions into off-hours with low liquidity.
Minutes before end (default: 5): How many minutes before session end to flatten. 5-15 minutes provides buffer for order execution before the session boundary.
Visual Effects Configuration Group
Dashboard Size (default: Normal): Controls information density in the dashboard. Small shows only critical metrics (excludes stop-out rate). Normal shows comprehensive data including stop-out rate. Large shows all available metrics including weights, session info, and volume analysis. Larger sizes consume more screen space but provide complete visibility.
Show Quantum Field (default: true): Displays animated grid pattern on the chart indicating market state. Disable if you prefer cleaner charts or experience performance issues on lower-end hardware.
Show Wick Pressure Lines (default: true): Draws dynamic lines from bars with extreme wicks, indicating potential support/resistance or liquidity absorption zones. Disable for simpler visualization.
Show Morphism Energy Beams (default: true): Displays directional beams showing momentum energy flow. Beams intensify during strong trends. Disable if you find this visually distracting.
Show Order Flow Clouds (default: true): Draws translucent boxes representing volume flow bullish/bearish bias. Disable for cleaner price action visibility.
Show Fractal Grid (default: true): Displays multi-timeframe support/resistance levels based on fractal price structure at 10/20/30/40/50 bar periods. Disable if you only want to see primary pivot levels.
Glow Intensity (default: 4): Controls the brightness and thickness of visual effects. Lower values (1-2) for subtle visualization. Higher values (7-10) for maximum visibility but potentially cluttered charts.
Color Theme (default: Cyber): Visual color scheme. Cyber uses cyan/magenta futuristic colors. Quantum uses aqua/purple. Matrix uses green/red terminal style. Aurora uses pastel pink/purple gradient. Choose based on personal preference and monitor calibration.
Show Watermark (default: true): Displays animated watermark at bottom of chart with creator credit and current P&L. Disable if you want completely clean charts or need screen space.
Performance Characteristics and Best Use Cases
Optimal Conditions
This strategy performs best in markets exhibiting:
Trending phases with periodic pullbacks: The combination of momentum and structure components excels when price establishes directional bias but provides retracement opportunities for entries. Markets with 60-70% trending bars and 30-40% consolidation produce the highest win rates.
Medium to high volatility: The ATR-based stop sizing and dynamic risk adjustment require sufficient price movement to generate meaningful profit relative to risk. Instruments with 2-4% daily ATR relative to price work well. Extremely low volatility (<1% daily ATR) generates too many scratch trades.
Clear volume patterns: The VPT volume component adds significant edge when volume expansions align with directional moves. Instruments and timeframes where volume data reflects actual transaction flow (versus tick volume proxies) perform better.
Regular session structure: Futures markets with defined opening and closing hours, consistent liquidity throughout the session, and clear overnight/day session separation allow the session controls and time-based failsafes to function optimally.
Sufficient liquidity for stop execution: The stop breakout entry mode requires that stop orders can fill without significant slippage. Highly liquid contracts work better than illiquid instruments where stop orders may face adverse fills.
Suboptimal Conditions
The strategy may struggle with:
Extreme chop with no directional persistence: When ADX remains below 15 for extended periods and price oscillates rapidly without establishing trends, the momentum component generates conflicting signals. Win rate typically drops below 40% in these conditions, triggering the adaptive system to increase minimum score thresholds until conditions improve. Stop-out rates may also spike into the red zone.
Gap-heavy instruments: Markets with frequent overnight gaps disrupt the continuous price assumptions underlying ATR stops and EMA-based structure analysis. Gaps can also cause stop orders to fill at prices far from intended levels, distorting stop-out rate metrics.
Very low timeframes with excessive noise: On 1-minute or tick charts, the signal components react to micro-structure noise rather than meaningful price swings. The strategy works best on 5-minute through daily timeframes where price movements reflect actual order flow shifts.
Extended low-volatility compression: During historically low volatility periods, profit targets become difficult to reach before mean-reversion occurs. The trail offset, even when set to minimum, may be too wide for the compressed price environment. Stop-out rates may drop to green zone indicating stops should be tightened.
Parabolic moves or climactic exhaustion: Vertical price advances or selloffs where price moves multiple ATRs in single bars can trigger momentum signals at exhaustion points. The structure and reversal components attempt to filter these, but extreme moves may override normal logic.
The adaptive learning system naturally reduces signal frequency and position sizing during unfavorable conditions. If you observe multiple consecutive days with zero trades and "FILTERS ACTIVE" status, this indicates the strategy has self-adjusted to avoid poor conditions rather than forcing trades.
Instrument Recommendations
Emini Index Futures (ES, MES, NQ, MNQ, YM, RTY): Excellent fit. High liquidity, clear volatility patterns, strong volume signals, defined session structure. These instruments have been extensively tested and the universal detection handles all contract specifications automatically.
Micro Index Futures (MES, MNQ, M2K, MYM): Excellent fit for smaller accounts. Same market characteristics as the standard eminis but with reduced contract sizes allowing proper risk management on accounts below $50,000.
Energy Futures (CL, NG, RB, HO): Good to mixed fit. Crude oil (CL) works well due to strong trends and reasonable volatility. Natural gas (NG) can be extremely volatile—consider reducing Base Risk to 0.3-0.4% and increasing Stop Loss ATR multiplier to 1.8-2.2 for NG. The strategy automatically detects the $10/tick value for CL and adjusts position sizing accordingly.
Metal Futures (GC, SI, HG, PL): Good fit. Gold (GC) and silver (SI) exhibit clear trending behavior and work well with the momentum/structure components. The strategy automatically handles the different point values ($100/point for gold, $5,000/point for silver).
Agricultural Futures (ZC, ZS, ZW, ZL): Good fit. Grain futures often trend strongly during seasonal periods. The strategy handles the unique tick sizes (1/4 cent increments) and point values ($50/point for corn/wheat, $60/point for soybeans) automatically.
Treasury Futures (ZB, ZN, ZF, ZT): Good fit for trending rates environments. The strategy automatically handles the fractional tick sizing (32nds for ZB/ZN, halves of 32nds for ZF/ZT) through the universal detection system.
Currency Futures (6E, 6J, 6B, 6A, 6C): Good fit. Major currency pairs exhibit smooth trending behavior. The strategy automatically detects point values which vary significantly ($12.50/tick for 6E, $12.50/tick for 6J, $6.25/tick for 6B).
Cryptocurrency Futures (BTC, ETH, MBT, MET): Mixed fit. These markets have extreme volatility requiring parameter adjustment. Increase Base Risk to 0.8-1.2% and Stop Loss ATR multiplier to 2.0-3.0 to account for wider stop distances. Enable 24-hour trading and weekend trading as these markets have no traditional sessions.
The universal futures compatibility means you can apply this strategy to any of these markets without code modification—simply open the chart of your desired contract and the strategy will automatically configure itself to that instrument's specifications.
Important Disclaimers and Realistic Expectations
This is a sophisticated trading strategy that combines multiple analytical methods within an adaptive framework designed for active traders who will monitor performance and market conditions. It is not a "set and forget" fully automated system, nor should it be treated as a guaranteed profit generator.
Backtesting Realism and Limitations
The strategy includes realistic trading costs and execution assumptions:
- Commission: $0.62 per contract per side (accurate for many retail futures brokers)
- Slippage: 1 tick per entry and exit (conservative estimate for liquid futures)
- Position sizing: Realistic risk percentages and maximum contract limits based on account size
- No repainting: All calculations use confirmed bar data only—signals do not change retroactively
However, backtesting cannot fully capture live trading reality:
- Order fill delays: In live trading, stop and limit orders may not fill instantly at the exact tick shown in backtest
- Volatile periods: During high volatility or low liquidity (news events, rollover days, pre-holidays), slippage may exceed the 1-tick assumption significantly
- Gap risk: The backtest assumes stops fill at stop price, but gaps can cause fills far beyond intended exit levels
- Psychological factors: Seeing actual capital at risk creates emotional pressures not present in backtesting, potentially leading to premature manual intervention
The strategy's backtest results should be viewed as best-case scenarios. Real trading will typically produce 10-30% lower returns than backtest due to the above factors.
Risk Warnings
All trading involves substantial risk of loss. The adaptive learning system can improve parameter selection over time, but it cannot predict future price movements or guarantee profitable performance. Past wins do not ensure future wins.
Losing streaks are inevitable. Even with a 60% win rate, you will encounter sequences of 5, 6, or more consecutive losses due to normal probability distributions. The strategy includes losing streak detection and automatic risk reduction, but you must have sufficient capital to survive these drawdowns.
Market regime changes can invalidate learned patterns. If the strategy learns from 50 trades during a trending regime, then the market shifts to a ranging regime, the adapted parameters may initially be misaligned with the new environment. The system will re-adapt, but this transition period may produce suboptimal results.
Prop firm traders: understand your specific rules. Every prop firm has different rules regarding maximum drawdown, daily loss limits, consistency requirements, and prohibited trading behaviors. While this strategy includes common prop guardrails, you must verify it complies with your specific firm's rules and adjust parameters accordingly.
Never risk capital you cannot afford to lose. This strategy can produce substantial drawdowns, especially during learning periods or market regime shifts. Only trade with speculative capital that, if lost, would not impact your financial stability.
Recommended Usage
Paper trade first: Run the strategy on a simulated account for at least 50 trades or 1 month before committing real capital. Observe how the adaptive system behaves, identify any patterns in losing trades, monitor your stop-out rate trends, and verify your understanding of the entry/exit mechanics.
Start with minimum position sizing: When transitioning to live trading, reduce the Base Risk parameter to 0.3-0.4% initially (vs 0.5-1.0% in testing) to reduce early impact while the system learns your live broker's execution characteristics.
Monitor daily, but do not micromanage: Check the dashboard daily to ensure the strategy is operating normally and risk controls have not triggered unexpectedly. Pay special attention to the Stop-Out Rate metric—if it remains in the red or green zones for multiple days, adjust your Stop Loss ATR multiplier accordingly. However, resist the urge to manually adjust adaptive weights or disable trades based on short-term performance. Allow the adaptive system at least 30 trades to establish patterns before making manual changes.
Combine with other analysis: While this strategy can operate standalone, professional traders typically use systematic strategies as one component of a broader approach. Consider using the strategy for trade execution while applying your own higher-timeframe analysis or fundamental view for trade filtering or sizing adjustments.
Keep a trading journal: Document each week's results, note market conditions (trending vs ranging, high vs low volatility), record stop-out rates and any Stop Loss ATR adjustments you made, and document any manual interventions. Over time, this journal will help you identify conditions where the strategy excels versus struggles, allowing you to selectively enable or disable trading during certain environments.
Technical Implementation Notes
All calculations execute on closed bars only (`calc_on_every_tick=false`) ensuring that signals and values do not repaint. Once a bar closes and a signal generates, that signal is permanent in the history.
The strategy uses fixed-quantity position sizing (`default_qty_type=strategy.fixed, default_qty_value=1`) with the actual contract quantity determined by the position sizing function and passed to the entry commands. This approach provides maximum control over risk allocation.
Order management uses Pine Script's native `strategy.entry()` and `strategy.exit()` functions with appropriate parameters for stops, limits, and trailing stops. All orders include explicit from_entry references to ensure they apply to the correct position.
The adaptive learning arrays (trade_returns, trade_directions, trade_types, trade_hours, trade_was_stopped) are maintained as circular buffers capped at PERFORMANCE_MEMORY size (default 100 trades). When a new trade closes, its data is added to the beginning of the array using `array.unshift()`, and the oldest trade is removed using `array.pop()` if capacity is exceeded. The stop-out tracking system analyzes the trade_was_stopped array to calculate the rolling percentage displayed in the dashboard.
Dashboard rendering occurs only on the confirmed bar (`barstate.isconfirmed`) to minimize computational overhead. The table is pre-created with sufficient rows for the selected dashboard size and cells are populated with current values each update.
Visual effects (fractal grid, wick pressure, morphism beams, order flow clouds, quantum field) recalculate on each bar for real-time chart updates. These are computationally intensive—if you experience chart lag, disable these visual components. The core strategy logic continues to function identically regardless of visual settings.
Timezone conversions use Pine Script's built-in timezone parameter on the `hour()`, `minute()`, and `dayofweek()` functions. This ensures session logic and daily/weekly resets occur at correct boundaries regardless of the chart's default timezone or the server's timezone.
The universal futures detection queries `syminfo.mintick` and `syminfo.pointvalue` on each strategy initialization to obtain the current instrument's specifications. These values remain constant throughout the strategy's execution on a given chart but automatically update when the strategy is applied to a different instrument.
The strategy has been tested on TradingView across timeframes from 5-minute through daily and across multiple futures instrument types including equity indices, energy, metals, agriculture, treasuries, and currencies. It functions identically on all instruments due to the percentage-based risk model and ATR-relative calculations which adapt automatically to price scale and volatility, combined with the universal futures detection system that handles contract-specific specifications.
SigmaKernel - Adaptive is a self-learning algorithmic trading strategy that combines four distinct analytical dimensions—momentum, market structure, volume flow, and reversal patterns—within a machine-learning-inspired framework that continuously adjusts its own parameters based on realized trading performance. Unlike traditional fixed-parameter strategies that maintain static weightings regardless of market conditions or results, this system implements a feedback loop that tracks which signal types, directional biases, and market conditions produce profitable outcomes, then mathematically adjusts component weightings, minimum score thresholds, position sizing multipliers, and trade spacing requirements to optimize future performance.
The strategy is designed for futures traders operating on prop firm accounts or live capital, incorporating realistic execution mechanics including configurable entry modes (stop breakout orders, limit pullback entries, or market-on-open), commission structures calibrated to retail futures contracts ($0.62 per contract default), one-tick slippage modeling, and professional risk controls including trailing drawdown guards, daily loss limits, and weekly profit targets. The system features universal futures compatibility—it automatically detects and adapts to any futures contract by reading the instrument's tick size and point value directly from the chart, eliminating the need for manual configuration across different markets.
What Makes This Approach Different
Adaptive Weight Optimization System
The core differentiation is the adaptive learning architecture. The strategy maintains four independent scoring components: momentum analysis (using RSI multi-timeframe, MACD histogram, and DMI/ADX), market structure detection (breakout identification via pivot-based support/resistance and moving average positioning), volume flow analysis (Volume Price Trend indicator with standard deviation confirmation), and reversal pattern recognition (oversold/overbought conditions combined with structural levels).
Each component generates a directional score that is multiplied by its current weight. After every closed trade, the system performs a retrospective analysis on the last N trades (configurable Learning Period, default 15 trades) to calculate win rates for each signal type independently. For example, if momentum-driven trades won 65% of the time while reversal trades won only 35%, the adaptive algorithm increases the momentum weight and decreases the reversal weight proportionally. The adjustment formula is:
New_Weight = Current_Weight + (Component_Win_Rate - Average_Win_Rate) × Adaptation_Speed
This creates a self-correcting mechanism where successful signal generators receive more influence in future composite scores, while underperforming components are de-emphasized. The system separately tracks long versus short win rates and applies directional bias corrections—if shorts consistently outperform longs, the strategy applies a 10% reduction to bullish signals to prevent fighting the prevailing market character.
Dynamic Parameter Adjustment
Beyond component weightings, three critical strategy parameters self-adjust based on performance:
Minimum Signal Score: The threshold required to trigger a trade. If overall win rate falls below 45%, the system increments this threshold by 0.10 per adjustment cycle, making the strategy more selective. If win rate exceeds 60%, the threshold decreases to allow more opportunities. This prevents the strategy from overtrading during unfavorable conditions and capitalizes on high-probability environments.
Risk Multiplier: Controls position sizing aggression. When drawdown exceeds 5%, risk per trade reduces by 10% per cycle. When drawdown falls below 2%, risk increases by 5% per cycle. This implements the professional risk management principle of "bet small when losing, bet bigger when winning" algorithmically.
Bars Between Trades: Spacing filter to prevent overtrading. Base value (default 9 bars) multiplies by drawdown factor and losing streak factor. During drawdown or consecutive losses, spacing expands up to 2x to allow market conditions to change before re-entering.
All adaptation operates during live forward-testing or real trading—there is no in-sample optimization applied to historical data. The system learns solely from its own realized trades.
Universal Futures Compatibility
The strategy implements universal futures instrument detection that automatically adapts to any futures contract without requiring manual configuration. Instead of hardcoding specific contract specifications, the system reads three critical values directly from TradingView's symbol information:
Tick Size Detection: Uses `syminfo.mintick` to obtain the minimum price increment for the current instrument. This value varies widely across markets—ES trades in 0.25 ticks, crude oil (CL) in 0.01 ticks, gold (GC) in 0.10 ticks, and treasury futures (ZB) in increments of 1/32nds. The strategy adapts all entry buffer calculations and stop placement logic to the detected tick size.
Point Value Detection: Uses `syminfo.pointvalue` to determine the dollar value per full point of price movement. For ES, one point equals $50; for crude oil, one point equals $1,000; for gold, one point equals $100. This automatic detection ensures accurate P&L calculations and risk-per-contract measurements across all instruments.
Tick Value Calculation: Combines tick size and point value to compute dollar value per tick: Tick_Value = Tick_Size × Point_Value. This derived value drives all position sizing calculations, ensuring the risk management system correctly accounts for each instrument's economic characteristics.
This universal approach means the strategy functions identically on emini indices (ES, MES, NQ, MNQ), micro indices, energy contracts (CL, NG, RB), metals (GC, SI, HG), agricultural futures (ZC, ZS, ZW), treasury futures (ZB, ZN, ZF), currency futures (6E, 6J, 6B), and any other futures contract available on TradingView. No parameter adjustments or instrument-specific branches exist in the code—the adaptation happens automatically through symbol information queries.
Stop-Out Rate Monitoring System
The strategy includes an intelligent stop-out rate tracking system that monitors the percentage of your last 20 trades (or available trades if fewer than 20) that were stopped out. This metric appears in the dashboard's Performance section with color-coded guidance:
Green (<30% stop-out rate): Very few trades are being stopped out. This suggests either your stops are too loose (giving back profits on reversals) or you're in an exceptional trending market. Consider tightening your Stop Loss ATR multiplier to lock in profits more efficiently.
Orange (30-65% stop-out rate): Healthy range. Your stop placement is appropriately sized for current market conditions and the strategy's risk-reward profile. No adjustment needed.
Red (>65% stop-out rate): Too many trades are being stopped out prematurely. Your stops are likely too tight for the current volatility regime. Consider widening your Stop Loss ATR multiplier to give trades more room to develop.
Critical Design Philosophy: Unlike some systems that automatically adjust stops based on performance statistics, this strategy intentionally keeps stop-loss control in the user's hands. Automatic stop adjustment creates dangerous feedback loops—widening stops increases risk per contract, which forces position size reduction, which distorts performance metrics, leading to incorrect adaptations. Instead, the dashboard provides visibility into stop performance, empowering you to make informed manual adjustments when warranted. This preserves the integrity of the adaptive system while giving you the critical data needed for stop optimization.
Execution Kernel Architecture
The entry system offers three distinct execution modes to match trader preference and market character:
StopBreakout Mode: Places buy-stop orders above the prior bar's high (for longs) or sell-stop orders below the prior bar's low (for shorts), plus a 2-tick buffer. This ensures entries only occur when price confirms directional momentum by breaking recent structure. Ideal for trending and momentum-driven markets.
LimitPullback Mode: Places limit orders at a pullback price calculated as: Entry_Price = Close - (ATR × Pullback_Multiplier) for longs, or Close + (ATR × Pullback_Multiplier) for shorts. Default multiplier is 0.5 ATR. This waits for mean-reversion before entering in the signal direction, capturing better prices in volatile or oscillating markets.
MarketNextOpen Mode: Executes at market on the bar immediately following signal generation. This provides fastest execution but sacrifices the filtering effect of requiring price confirmation.
All pending entry orders include a configurable Time-To-Live (TTL, default 6 bars). If an order is not filled within the TTL period, it cancels automatically to prevent stale signals from executing in changed market conditions.
Professional Exit Management
The exit system implements a three-stage progression: initial stop loss, breakeven adjustment, and dynamic trailing stop.
Initial Stop Loss: Calculated as entry price ± (ATR × User_Stop_Multiplier × Volatility_Adjustment). Users have direct control via the Stop Loss ATR multiplier (default 1.25). The system then applies volatility regime adjustments: ×1.2 in high-volatility environments (stops automatically widen), ×0.8 in low volatility (stops tighten), ×1.0 in normal conditions. This ensures stops adapt to market character while maintaining user control over baseline risk tolerance.
Breakeven Trigger: When profit reaches a configurable multiple of initial risk (default 1.0R), the stop loss automatically moves to breakeven (entry price). This locks in zero-loss status once the trade demonstrates favorable movement.
Trailing Stop Activation: When profit reaches the Trail_Trigger_R multiple (default 1.2R), the system cancels the fixed stop and activates a dynamic trailing stop. The trail uses Step and Offset parameters defined in R-multiples. For example, with Trail_Offset_R = 1.0 and Trail_Step_R = 1.5, the stop trails 1.0R behind price and moves in 1.5R increments. This captures extended moves while protecting accumulated profit.
Additional failsafes include maximum time-in-trade (exits after N bars if specified) and end-of-session flatten (automatically closes all positions X minutes before session end to avoid overnight exposure).
Core Calculation Methodology
Signal Component Scoring
Momentum Component:
- Calculates 14-period DMI (Directional Movement Index) with ADX strength filter (trending when ADX > 25)
- Computes three RSI timeframes: fast (7-period), medium (14-period), slow (21-period)
- Analyzes MACD (12/26/9) histogram for directional acceleration
- Bullish momentum: uptrend (DI+ > DI- with ADX > 25) + MACD histogram rising above zero + RSI fast between 50-80 = +1.6 score
- Bearish momentum: downtrend (DI- > DI+ with ADX > 25) + MACD histogram falling below zero + RSI fast between 20-50 = -1.6 score
- Score multiplies by volatility adjustment factor: ×0.8 in high volatility (momentum less reliable), ×1.2 in low volatility (momentum more persistent)
Structure Component:
- Identifies swing highs and lows using 10-bar pivot lookback on both sides
- Maintains most recent swing high as dynamic resistance, most recent swing low as dynamic support
- Detects breakouts: bullish when close crosses above resistance with prior bar below; bearish when close crosses below support with prior bar above
- Breakout score: ±1.0 for confirmed break
- Moving average alignment: +0.5 when price > SMA20 > SMA50 (bullish structure); -0.5 when price < SMA20 < SMA50 (bearish structure)
- Total structure range: -1.5 to +1.5
Volume Component:
- Calculates Volume Price Trend: VPT = Σ[(Close - Close[1]) / Close[1] × Volume]
- Compares VPT to its 10-period EMA as signal line (similar to MACD logic)
- Computes 20-period volume moving average and standard deviation
- High volume event: current volume > (volume_average + 1× std_dev)
- Bullish volume: VPT > VPT_signal AND high_volume = +1.0
- Bearish volume: VPT < VPT_signal AND high_volume = -1.0
- No score if volume is not elevated (filters out low-conviction moves)
Reversal Component:
- Identifies extreme RSI conditions: RSI slow < 30 (oversold) or > 70 (overbought)
- Requires structural confluence: price at or below support level for bullish reversal; at or above resistance for bearish reversal
- Requires momentum shift: RSI fast must be rising (for bull) or falling (for bear) to confirm reversal in progress
- Bullish reversal: RSI < 30 AND price ≤ support AND RSI rising = +1.0
- Bearish reversal: RSI > 70 AND price ≥ resistance AND RSI falling = -1.0
Composite Score Calculation
Final_Score = (Momentum × Weight_M) + (Structure × Weight_S) + (Volume × Weight_V) + (Reversal × Weight_R)
Initial weights: Momentum = 1.0, Structure = 1.2, Volume = 0.8, Reversal = 0.6
These weights adapt after each trade based on component-specific performance as described above.
The system also applies directional bias adjustment: if recent long trades have significantly lower win rate than shorts, bullish scores multiply by 0.9 to reduce aggressive long entries. Vice versa for underperforming shorts.
Position Sizing Algorithm
The position sizing calculation incorporates multiple confidence factors and automatically scales to any futures contract:
1. Base risk amount = Account_Size × Base_Risk_Percent × Adaptive_Risk_Multiplier
2. Stop distance in price units = ATR × User_Stop_Multiplier × Volatility_Regime_Multiplier × Entry_Buffer
3. Risk per contract = Stop_Distance × Dollar_Per_Point (automatically detected from instrument)
4. Raw position size = Risk_Amount / Risk_Per_Contract
Then applies confidence scaling:
- Signal confidence = min(|Weighted_Score| / Min_Score_Threshold, 2.0) — higher scores receive larger size, capped at 2×
- Direction confidence = Long_Win_Rate (for bulls) or Short_Win_Rate (for bears)
- Type confidence = Win_Rate of dominant signal type (momentum/structure/volume/reversal)
- Total confidence = (Signal_Confidence + Direction_Confidence + Type_Confidence) / 3
Adjusted size = Raw_Size × Total_Confidence × Losing_Streak_Reduction
Losing streak reduction = 0.5 if losing_streak ≥ 5, otherwise 1.0
Universal Maximum Position Calculation: Instead of hardcoded limits per instrument, the system calculates maximum position size as: Max_Contracts = Account_Size / 25000, clamped between 1 and 10 contracts. This means a $50,000 account allows up to 2 contracts, a $100,000 account allows up to 4 contracts, regardless of which futures contract is being traded. This universal approach maintains consistent risk exposure across different instruments while preventing overleveraging.
Final size is rounded to integer and bounded by the calculated maximum.
Session and Risk Management System
Timezone-Aware Session Control
The strategy implements timezone-correct session filtering. Users specify session start hour, end hour, and timezone from 12 supported zones (New York, Chicago, Los Angeles, London, Frankfurt, Moscow, Tokyo, Hong Kong, Shanghai, Singapore, Sydney, UTC). The system converts bar timestamps to the selected timezone before applying session logic.
For split sessions (e.g., Asian session 18:00-02:00), the logic correctly handles time wraparound. Weekend trading can be optionally disabled (default: disabled) to avoid low-liquidity weekend price action.
Multi-Layer Risk Controls
Daily Loss Limit: Strategy ceases all new entries when daily P&L reaches negative threshold (default $2,000). This prevents catastrophic drawdown days. Resets at timezone-corrected day boundary.
Weekly Profit Target: Strategy ceases trading when weekly profit reaches target (default $10,000). This implements the professional principle of "take the win and stop pushing luck." Resets on timezone-corrected Monday.
Maximum Daily Trades: Hard cap on entries per day (default 20) to prevent overtrading during volatile conditions when many signals may generate.
Trailing Drawdown Guard: Optional prop-firm-style trailing stop on account equity. When enabled, if equity drops below (Peak_Equity - Trailing_DD_Amount), all trading halts. This simulates the common prop firm rule where exceeding trailing drawdown results in account termination.
All limits display status in the real-time dashboard, showing "MAX LOSS HIT", "WEEKLY TARGET MET", or "ACTIVE" depending on current state.
How To Use This Strategy
Initial Setup
1. Apply the strategy to your desired futures chart (tested on 5-minute through daily timeframes)
2. The strategy will automatically detect your instrument's specifications—no manual configuration needed for different contracts
3. Configure your account size and risk parameters in the Core Settings section
4. Set your trading session hours and timezone to match your availability
5. Adjust the Stop Loss ATR multiplier based on your risk tolerance (0.8-1.2 for tighter stops, 1.5-2.5 for wider stops)
6. Select your preferred entry execution mode (recommend StopBreakout for beginners)
7. Enable adaptation (recommended) or disable for fixed-parameter operation
8. Review the strategy's Properties in the Strategy Tester settings and verify commission/slippage match your broker's actual costs
The universal futures detection means you can switch between ES, NQ, CL, GC, ZB, or any other futures contract without changing any strategy parameters—the system will automatically adapt its calculations to each instrument's unique specifications.
Dashboard Interpretation
The strategy displays a comprehensive real-time dashboard in the top-right corner showing:
Market State Section:
- Trend: Shows UPTREND/DOWNTREND/CONSOLIDATING/NEUTRAL based on ADX and DMI analysis
- ADX Value: Current trend strength (>25 = strong trend, <20 = consolidating)
- Momentum: BULL/BEAR/NEUTRAL classification with current momentum score
- Volatility: HIGH/LOW/NORMAL regime with ATR percentage of price
Volume Profile Section (Large dashboard only):
- VPT Flow: Directional bias from volume analysis
- Volume Status: HIGH/LOW/NORMAL with relative volume multiplier
Performance Section:
- Daily P&L: Current day's profit/loss with color coding
- Daily Trades: Number of completed trades today
- Weekly P&L: Current week's profit/loss
- Target %: Progress toward weekly profit target
- Stop-Out Rate: Percentage of last 20 trades (or available trades if <20) that were stopped out. Includes all stop types: initial stops, breakeven stops, trailing stops, timeout exits, and EOD flattens. Color coded with actionable guidance:
- Green (<30%): Shows "TIGHTEN" guidance. Very few stop-outs suggests stops may be too loose or exceptional market conditions. Consider reducing Stop Loss ATR multiplier.
- Orange (30-65%): Shows "OK" guidance. Healthy stop-out rate indicating appropriate stop placement for current conditions.
- Red (>65%): Shows "WIDEN" guidance. Too many premature stop-outs. Consider increasing Stop Loss ATR multiplier to give trades more room.
- Status: Overall trading status (ACTIVE/MAX LOSS HIT/WEEKLY TARGET MET/FILTERS ACTIVE)
Adaptive Engine Section:
- Min Score: Current minimum threshold for trade entry (higher = more selective)
- Risk Mult: Current position sizing multiplier (adjusts with performance)
- Bars BTW: Current minimum bars required between trades
- Drawdown: Current drawdown percentage from equity peak
- Weights: M/S/V/R showing current component weightings
Win Rates Section:
- Type: Win rates for Momentum, Structure, Volume, Reversal signal types
- Direction: Win rates for Long vs Short trades
Color coding shows green for >50% win rate, red for <50%
Session Info Section:
- Session Hours: Active trading window with timezone
- Weekend Trading: ENABLED/DISABLED status
- Session Status: ACTIVE/INACTIVE based on current time
Signal Generation and Entry
The strategy generates entries when the weighted composite score exceeds the adaptive minimum threshold (initial value configurable, typically 1.5 to 2.5). Entries display as layered triangle markers on the chart:
- Long Signal: Three green upward triangles below the entry bar
- Short Signal: Three red downward triangles above the entry bar
Triangle tooltip shows the signal score and dominant signal type (MOMENTUM/STRUCTURE/VOLUME/REVERSAL).
Position Management and Stop Optimization
Once entered, the strategy automatically manages the position through its three-stage exit system. Monitor the Stop-Out Rate metric in the dashboard to optimize your stop placement:
If Stop-Out Rate is Green (<30%): You're rarely being stopped out. This could mean:
- Your stops are too loose, allowing trades to give back too much profit on reversals
- You're in an exceptional trending market where tight stops would work better
- Action: Consider reducing your Stop Loss ATR multiplier by 0.1-0.2 to tighten stops and lock in profits more efficiently
If Stop-Out Rate is Orange (30-65%): Optimal range. Your stops are appropriately sized for the strategy's risk-reward profile and current market volatility. No adjustment needed.
If Stop-Out Rate is Red (>65%): You're being stopped out too frequently. This means:
- Your stops are too tight for current market volatility
- Trades need more room to develop before reaching profit targets
- Action: Increase your Stop Loss ATR multiplier by 0.1-0.3 to give trades more breathing room
Remember: The stop-out rate calculation includes all exit types (initial stops, breakeven stops, trailing stops, timeouts, EOD flattens). A trade that reaches breakeven and gets stopped out at entry price counts as a stop-out, even though it didn't lose money. This is intentional—it indicates the stop placement didn't allow the trade to develop into profit.
Optimization Workflow
For traders wanting to customize the strategy for their specific instrument and timeframe:
Week 1-2: Run with defaults, adaptation enabled
Allow the system to execute at least 30-50 trades (the Learning Period plus additional buffer). Monitor which session periods, signal types, and market conditions produce the best results. Observe your stop-out rate—if it's consistently red or green, plan to adjust Stop Loss ATR multiplier after the learning period. Do not adjust parameters yet—let the adaptive system establish baseline performance data.
Week 3-4: Analyze adaptation behavior and optimize stops
Review the dashboard's adaptive weights and win rates. If certain signal types consistently show <40% win rate, consider slightly reducing their base weight. If a particular entry mode produces better fill quality and win rate, switch to that mode. If you notice the minimum score threshold has climbed very high (>3.0), market conditions may not suit the strategy's logic—consider switching instruments or timeframes.
Based on your Stop-Out Rate observations:
- Consistently <30%: Reduce Stop Loss ATR multiplier by 0.2-0.3
- Consistently >65%: Increase Stop Loss ATR multiplier by 0.2-0.4
- Oscillating between zones: Leave stops at default and let volatility regime adjustments handle it
Ongoing: Fine-tune risk and execution
Adjust the following based on your risk tolerance and account type:
- Base Risk Per Trade: 0.5% for conservative, 0.75% for moderate, 1.0% for aggressive
- Stop Loss ATR Multiplier: 0.8-1.2 for tight stops (scalping), 1.5-2.5 for wide stops (swing trading)
- Bars Between Trades: Lower (5-7) for more opportunities, higher (12-20) for more selective
- Entry Mode: Experiment between modes to find best fit for current market character
- Session Hours: Narrow to specific high-performance session windows if certain hours consistently underperform
Never adjust: Do not manually modify the adaptive weights, minimum score, or risk multiplier after the system has begun learning. These parameters are self-optimizing and manual interference defeats the adaptive mechanism.
Parameter Descriptions and Optimization Guidelines
Adaptive Intelligence Group
Enable Self-Optimization (default: true): Master switch for the adaptive learning system. When enabled, component weights, minimum score, risk multiplier, and trade spacing adjust based on realized performance. Disable to run the strategy with fixed parameters (useful for comparing adaptive vs non-adaptive performance).
Learning Period (default: 15 trades): Number of most recent trades to analyze for performance calculations. Shorter values (10-12) adapt more quickly to recent conditions but may overreact to variance. Longer values (20-30) produce more stable adaptations but respond slower to regime changes. For volatile markets, use shorter periods. For stable trends, use longer periods.
Adaptation Speed (default: 0.25): Controls the magnitude of parameter adjustments per learning cycle. Lower values (0.05-0.15) make gradual, conservative changes. Higher values (0.35-0.50) make aggressive adjustments. Faster adaptation helps in rapidly changing markets but increases parameter instability. Start with default and increase only if you observe the system failing to adapt quickly enough to obvious performance patterns.
Performance Memory (default: 100 trades): Maximum number of historical trades stored for analysis. This array size does not affect learning (which uses only Learning Period trades) but provides data for future analytics features including stop-out rate tracking. Higher values consume more memory but provide richer historical dataset. Typical users should not need to modify this.
Core Settings Group
Account Size (default: $50,000): Starting capital for position sizing calculations. This should match your actual account size for accurate risk per trade. The strategy uses this value to calculate dollar risk amounts and determine maximum position size (1 contract per $25,000).
Weekly Profit Target (default: $10,000): When weekly P&L reaches this value, the strategy stops taking new trades for the remainder of the week. This implements a "quit while ahead" rule common in professional trading. Set to a realistic weekly goal—20% of account size per week ($10K on $50K) is very aggressive; 5-10% is more sustainable.
Max Daily Loss (default: $2,000): When daily P&L reaches this negative threshold, strategy stops all new entries for the day. This is your maximum acceptable daily loss. Professional traders typically set this at 2-4% of account size. A $2,000 loss on a $50,000 account = 4%.
Base Risk Per Trade % (default: 0.5%): Initial percentage of account to risk on each trade before adaptive multiplier and confidence scaling. 0.5% is conservative, 0.75% is moderate, 1.0-1.5% is aggressive. Remember that actual risk per trade = Base Risk × Adaptive Risk Multiplier × Confidence Factors, so the realized risk will vary.
Trade Filters Group
Base Minimum Signal Score (default: 1.5): Initial threshold that composite weighted score must exceed to generate a signal. Lower values (1.0-1.5) produce more trades with lower average quality. Higher values (2.0-3.0) produce fewer, higher-quality setups. This value adapts automatically when adaptive mode is enabled, but the base sets the starting point. For trending markets, lower values work well. For choppy markets, use higher values.
Base Bars Between Trades (default: 9): Minimum bars that must elapse after an entry before another signal can trigger. This prevents overtrading and allows previous trades time to develop. Lower values (3-6) suit scalping on lower timeframes. Higher values (15-30) suit swing trading on higher timeframes. This value also adapts based on drawdown and losing streaks.
Max Daily Trades (default: 20): Hard limit on total trades per day regardless of signal quality. This prevents runaway trading during extremely volatile days when many signals may generate. For 5-minute charts, 20 trades/day is reasonable. For 1-hour charts, 5-10 trades/day is more typical.
Session Group
Session Start Hour (default: 5): Hour (0-23 format) when trading is allowed to begin, in the timezone specified. For US futures trading in Chicago time, session typically starts at 5:00 or 6:00 PM (17:00 or 18:00) Sunday evening.
Session End Hour (default: 17): Hour when trading stops and no new entries are allowed. For US equity index futures, regular session ends at 4:00 PM (16:00) Central Time.
Allow Weekend Trading (default: false): Whether strategy can trade on Saturday/Sunday. Most futures have low volume on weekends; keeping this disabled is recommended unless you specifically trade Sunday evening open.
Session Timezone (default: America/Chicago): Timezone for session hour interpretation. Select your local timezone or the timezone of your instrument's primary exchange. This ensures session logic aligns with your intended trading hours.
Prop Guards Group
Trailing Drawdown Guard (default: false): Enables prop-firm-style trailing maximum drawdown. When enabled, if equity drops below (Peak Equity - Trailing DD Amount), all trading halts for the remainder of the backtest/live session. This simulates rules used by funded trader programs where exceeding trailing drawdown terminates the account.
Trailing DD Amount (default: $2,500): Dollar amount of drawdown allowed from equity peak. If your equity reaches $55,000, the trailing stop sets at $52,500. If equity then drops to $52,499, the guard triggers and trading ceases.
Execution Kernel Group
Entry Mode (default: StopBreakout):
- StopBreakout: Places stop orders above/below signal bar requiring price confirmation
- LimitPullback: Places limit orders at pullback prices seeking better fills
- MarketNextOpen: Executes immediately at market on next bar
Limit Offset (default: 0.5x ATR): For LimitPullback mode, how far below/above current price to place the limit order. Smaller values (0.3-0.5) seek minor pullbacks. Larger values (0.8-1.2) wait for deeper retracements but may miss trades.
Entry TTL (default: 6 bars, 0=off): Bars an entry order remains pending before cancelling. Shorter values (3-4) keep signals fresh. Longer values (8-12) allow more time for fills but risk executing stale signals. Set to 0 to disable TTL (orders remain active indefinitely until filled or opposite signal).
Exits Group
Stop Loss (default: 1.25x ATR): Base stop distance as a multiple of the 14-period ATR. This is your primary risk control parameter and directly impacts your stop-out rate. Lower values (0.8-1.0) create tighter stops that reduce risk per trade but may get stopped out prematurely in volatile conditions—expect stop-out rates above 65% (red zone). Higher values (1.5-2.5) give trades more room to breathe but increase risk per contract—expect stop-out rates below 30% (green zone). The system applies additional volatility regime adjustments on top of this base: ×1.2 in high volatility environments (stops widen automatically), ×0.8 in low volatility (stops tighten), ×1.0 in normal conditions. For scalping on lower timeframes, use 0.8-1.2. For swing trading on higher timeframes, use 1.5-2.5. Monitor the Stop-Out Rate metric in the dashboard and adjust this parameter to keep it in the healthy 30-65% orange zone.
Move to Breakeven at (default: 1.0R): When profit reaches this multiple of initial risk, stop moves to breakeven. 1.0R means after price moves in your favor by the distance you risked, you're protected at entry price. Lower values (0.5-0.8R) lock in breakeven faster. Higher values (1.5-2.0R) allow more room before protection.
Start Trailing at (default: 1.2R): When profit reaches this multiple, the fixed stop transitions to a dynamic trailing stop. This should be greater than the BE trigger. Values typically range 1.0-2.0R depending on how much profit you want secured before trailing activates.
Trail Offset (default: 1.0R): How far behind price the trailing stop follows. Tighter offsets (0.5-0.8R) protect profit more aggressively but may exit prematurely. Wider offsets (1.5-2.5R) allow more room for profit to run but risk giving back more on reversals.
Trail Step (default: 1.5R): How far price must move in profitable direction before the stop advances. Smaller steps (0.5-1.0R) move the stop more frequently, tightening protection continuously. Larger steps (2.0-3.0R) move the stop less often, giving trades more breathing room.
Max Bars In Trade (default: 0=off): Maximum bars allowed in a position before forced exit. This prevents trades from "going stale" during periods of no meaningful price action. For 5-minute charts, 50-100 bars (4-8 hours) is reasonable. For daily charts, 5-10 bars (1-2 weeks) is typical. Set to 0 to disable.
Flatten near Session End (default: true): Whether to automatically close all positions as session end approaches. Recommended to avoid carrying positions into off-hours with low liquidity.
Minutes before end (default: 5): How many minutes before session end to flatten. 5-15 minutes provides buffer for order execution before the session boundary.
Visual Effects Configuration Group
Dashboard Size (default: Normal): Controls information density in the dashboard. Small shows only critical metrics (excludes stop-out rate). Normal shows comprehensive data including stop-out rate. Large shows all available metrics including weights, session info, and volume analysis. Larger sizes consume more screen space but provide complete visibility.
Show Quantum Field (default: true): Displays animated grid pattern on the chart indicating market state. Disable if you prefer cleaner charts or experience performance issues on lower-end hardware.
Show Wick Pressure Lines (default: true): Draws dynamic lines from bars with extreme wicks, indicating potential support/resistance or liquidity absorption zones. Disable for simpler visualization.
Show Morphism Energy Beams (default: true): Displays directional beams showing momentum energy flow. Beams intensify during strong trends. Disable if you find this visually distracting.
Show Order Flow Clouds (default: true): Draws translucent boxes representing volume flow bullish/bearish bias. Disable for cleaner price action visibility.
Show Fractal Grid (default: true): Displays multi-timeframe support/resistance levels based on fractal price structure at 10/20/30/40/50 bar periods. Disable if you only want to see primary pivot levels.
Glow Intensity (default: 4): Controls the brightness and thickness of visual effects. Lower values (1-2) for subtle visualization. Higher values (7-10) for maximum visibility but potentially cluttered charts.
Color Theme (default: Cyber): Visual color scheme. Cyber uses cyan/magenta futuristic colors. Quantum uses aqua/purple. Matrix uses green/red terminal style. Aurora uses pastel pink/purple gradient. Choose based on personal preference and monitor calibration.
Show Watermark (default: true): Displays animated watermark at bottom of chart with creator credit and current P&L. Disable if you want completely clean charts or need screen space.
Performance Characteristics and Best Use Cases
Optimal Conditions
This strategy performs best in markets exhibiting:
Trending phases with periodic pullbacks: The combination of momentum and structure components excels when price establishes directional bias but provides retracement opportunities for entries. Markets with 60-70% trending bars and 30-40% consolidation produce the highest win rates.
Medium to high volatility: The ATR-based stop sizing and dynamic risk adjustment require sufficient price movement to generate meaningful profit relative to risk. Instruments with 2-4% daily ATR relative to price work well. Extremely low volatility (<1% daily ATR) generates too many scratch trades.
Clear volume patterns: The VPT volume component adds significant edge when volume expansions align with directional moves. Instruments and timeframes where volume data reflects actual transaction flow (versus tick volume proxies) perform better.
Regular session structure: Futures markets with defined opening and closing hours, consistent liquidity throughout the session, and clear overnight/day session separation allow the session controls and time-based failsafes to function optimally.
Sufficient liquidity for stop execution: The stop breakout entry mode requires that stop orders can fill without significant slippage. Highly liquid contracts work better than illiquid instruments where stop orders may face adverse fills.
Suboptimal Conditions
The strategy may struggle with:
Extreme chop with no directional persistence: When ADX remains below 15 for extended periods and price oscillates rapidly without establishing trends, the momentum component generates conflicting signals. Win rate typically drops below 40% in these conditions, triggering the adaptive system to increase minimum score thresholds until conditions improve. Stop-out rates may also spike into the red zone.
Gap-heavy instruments: Markets with frequent overnight gaps disrupt the continuous price assumptions underlying ATR stops and EMA-based structure analysis. Gaps can also cause stop orders to fill at prices far from intended levels, distorting stop-out rate metrics.
Very low timeframes with excessive noise: On 1-minute or tick charts, the signal components react to micro-structure noise rather than meaningful price swings. The strategy works best on 5-minute through daily timeframes where price movements reflect actual order flow shifts.
Extended low-volatility compression: During historically low volatility periods, profit targets become difficult to reach before mean-reversion occurs. The trail offset, even when set to minimum, may be too wide for the compressed price environment. Stop-out rates may drop to green zone indicating stops should be tightened.
Parabolic moves or climactic exhaustion: Vertical price advances or selloffs where price moves multiple ATRs in single bars can trigger momentum signals at exhaustion points. The structure and reversal components attempt to filter these, but extreme moves may override normal logic.
The adaptive learning system naturally reduces signal frequency and position sizing during unfavorable conditions. If you observe multiple consecutive days with zero trades and "FILTERS ACTIVE" status, this indicates the strategy has self-adjusted to avoid poor conditions rather than forcing trades.
Instrument Recommendations
Emini Index Futures (ES, MES, NQ, MNQ, YM, RTY): Excellent fit. High liquidity, clear volatility patterns, strong volume signals, defined session structure. These instruments have been extensively tested and the universal detection handles all contract specifications automatically.
Micro Index Futures (MES, MNQ, M2K, MYM): Excellent fit for smaller accounts. Same market characteristics as the standard eminis but with reduced contract sizes allowing proper risk management on accounts below $50,000.
Energy Futures (CL, NG, RB, HO): Good to mixed fit. Crude oil (CL) works well due to strong trends and reasonable volatility. Natural gas (NG) can be extremely volatile—consider reducing Base Risk to 0.3-0.4% and increasing Stop Loss ATR multiplier to 1.8-2.2 for NG. The strategy automatically detects the $10/tick value for CL and adjusts position sizing accordingly.
Metal Futures (GC, SI, HG, PL): Good fit. Gold (GC) and silver (SI) exhibit clear trending behavior and work well with the momentum/structure components. The strategy automatically handles the different point values ($100/point for gold, $5,000/point for silver).
Agricultural Futures (ZC, ZS, ZW, ZL): Good fit. Grain futures often trend strongly during seasonal periods. The strategy handles the unique tick sizes (1/4 cent increments) and point values ($50/point for corn/wheat, $60/point for soybeans) automatically.
Treasury Futures (ZB, ZN, ZF, ZT): Good fit for trending rates environments. The strategy automatically handles the fractional tick sizing (32nds for ZB/ZN, halves of 32nds for ZF/ZT) through the universal detection system.
Currency Futures (6E, 6J, 6B, 6A, 6C): Good fit. Major currency pairs exhibit smooth trending behavior. The strategy automatically detects point values which vary significantly ($12.50/tick for 6E, $12.50/tick for 6J, $6.25/tick for 6B).
Cryptocurrency Futures (BTC, ETH, MBT, MET): Mixed fit. These markets have extreme volatility requiring parameter adjustment. Increase Base Risk to 0.8-1.2% and Stop Loss ATR multiplier to 2.0-3.0 to account for wider stop distances. Enable 24-hour trading and weekend trading as these markets have no traditional sessions.
The universal futures compatibility means you can apply this strategy to any of these markets without code modification—simply open the chart of your desired contract and the strategy will automatically configure itself to that instrument's specifications.
Important Disclaimers and Realistic Expectations
This is a sophisticated trading strategy that combines multiple analytical methods within an adaptive framework designed for active traders who will monitor performance and market conditions. It is not a "set and forget" fully automated system, nor should it be treated as a guaranteed profit generator.
Backtesting Realism and Limitations
The strategy includes realistic trading costs and execution assumptions:
- Commission: $0.62 per contract per side (accurate for many retail futures brokers)
- Slippage: 1 tick per entry and exit (conservative estimate for liquid futures)
- Position sizing: Realistic risk percentages and maximum contract limits based on account size
- No repainting: All calculations use confirmed bar data only—signals do not change retroactively
However, backtesting cannot fully capture live trading reality:
- Order fill delays: In live trading, stop and limit orders may not fill instantly at the exact tick shown in backtest
- Volatile periods: During high volatility or low liquidity (news events, rollover days, pre-holidays), slippage may exceed the 1-tick assumption significantly
- Gap risk: The backtest assumes stops fill at stop price, but gaps can cause fills far beyond intended exit levels
- Psychological factors: Seeing actual capital at risk creates emotional pressures not present in backtesting, potentially leading to premature manual intervention
The strategy's backtest results should be viewed as best-case scenarios. Real trading will typically produce 10-30% lower returns than backtest due to the above factors.
Risk Warnings
All trading involves substantial risk of loss. The adaptive learning system can improve parameter selection over time, but it cannot predict future price movements or guarantee profitable performance. Past wins do not ensure future wins.
Losing streaks are inevitable. Even with a 60% win rate, you will encounter sequences of 5, 6, or more consecutive losses due to normal probability distributions. The strategy includes losing streak detection and automatic risk reduction, but you must have sufficient capital to survive these drawdowns.
Market regime changes can invalidate learned patterns. If the strategy learns from 50 trades during a trending regime, then the market shifts to a ranging regime, the adapted parameters may initially be misaligned with the new environment. The system will re-adapt, but this transition period may produce suboptimal results.
Prop firm traders: understand your specific rules. Every prop firm has different rules regarding maximum drawdown, daily loss limits, consistency requirements, and prohibited trading behaviors. While this strategy includes common prop guardrails, you must verify it complies with your specific firm's rules and adjust parameters accordingly.
Never risk capital you cannot afford to lose. This strategy can produce substantial drawdowns, especially during learning periods or market regime shifts. Only trade with speculative capital that, if lost, would not impact your financial stability.
Recommended Usage
Paper trade first: Run the strategy on a simulated account for at least 50 trades or 1 month before committing real capital. Observe how the adaptive system behaves, identify any patterns in losing trades, monitor your stop-out rate trends, and verify your understanding of the entry/exit mechanics.
Start with minimum position sizing: When transitioning to live trading, reduce the Base Risk parameter to 0.3-0.4% initially (vs 0.5-1.0% in testing) to reduce early impact while the system learns your live broker's execution characteristics.
Monitor daily, but do not micromanage: Check the dashboard daily to ensure the strategy is operating normally and risk controls have not triggered unexpectedly. Pay special attention to the Stop-Out Rate metric—if it remains in the red or green zones for multiple days, adjust your Stop Loss ATR multiplier accordingly. However, resist the urge to manually adjust adaptive weights or disable trades based on short-term performance. Allow the adaptive system at least 30 trades to establish patterns before making manual changes.
Combine with other analysis: While this strategy can operate standalone, professional traders typically use systematic strategies as one component of a broader approach. Consider using the strategy for trade execution while applying your own higher-timeframe analysis or fundamental view for trade filtering or sizing adjustments.
Keep a trading journal: Document each week's results, note market conditions (trending vs ranging, high vs low volatility), record stop-out rates and any Stop Loss ATR adjustments you made, and document any manual interventions. Over time, this journal will help you identify conditions where the strategy excels versus struggles, allowing you to selectively enable or disable trading during certain environments.
Technical Implementation Notes
All calculations execute on closed bars only (`calc_on_every_tick=false`) ensuring that signals and values do not repaint. Once a bar closes and a signal generates, that signal is permanent in the history.
The strategy uses fixed-quantity position sizing (`default_qty_type=strategy.fixed, default_qty_value=1`) with the actual contract quantity determined by the position sizing function and passed to the entry commands. This approach provides maximum control over risk allocation.
Order management uses Pine Script's native `strategy.entry()` and `strategy.exit()` functions with appropriate parameters for stops, limits, and trailing stops. All orders include explicit from_entry references to ensure they apply to the correct position.
The adaptive learning arrays (trade_returns, trade_directions, trade_types, trade_hours, trade_was_stopped) are maintained as circular buffers capped at PERFORMANCE_MEMORY size (default 100 trades). When a new trade closes, its data is added to the beginning of the array using `array.unshift()`, and the oldest trade is removed using `array.pop()` if capacity is exceeded. The stop-out tracking system analyzes the trade_was_stopped array to calculate the rolling percentage displayed in the dashboard.
Dashboard rendering occurs only on the confirmed bar (`barstate.isconfirmed`) to minimize computational overhead. The table is pre-created with sufficient rows for the selected dashboard size and cells are populated with current values each update.
Visual effects (fractal grid, wick pressure, morphism beams, order flow clouds, quantum field) recalculate on each bar for real-time chart updates. These are computationally intensive—if you experience chart lag, disable these visual components. The core strategy logic continues to function identically regardless of visual settings.
Timezone conversions use Pine Script's built-in timezone parameter on the `hour()`, `minute()`, and `dayofweek()` functions. This ensures session logic and daily/weekly resets occur at correct boundaries regardless of the chart's default timezone or the server's timezone.
The universal futures detection queries `syminfo.mintick` and `syminfo.pointvalue` on each strategy initialization to obtain the current instrument's specifications. These values remain constant throughout the strategy's execution on a given chart but automatically update when the strategy is applied to a different instrument.
The strategy has been tested on TradingView across timeframes from 5-minute through daily and across multiple futures instrument types including equity indices, energy, metals, agriculture, treasuries, and currencies. It functions identically on all instruments due to the percentage-based risk model and ATR-relative calculations which adapt automatically to price scale and volatility, combined with the universal futures detection system that handles contract-specific specifications.
초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청을 보내고 승인을 받아야 합니다. 일반적으로 결제 후에 승인이 이루어집니다. 자세한 내용은 아래 작성자의 지침을 따르거나 DskyzInvestments에게 직접 문의하세요.
트레이딩뷰는 스크립트 작성자를 완전히 신뢰하고 스크립트 작동 방식을 이해하지 않는 한 스크립트 비용을 지불하거나 사용하지 않는 것을 권장하지 않습니다. 무료 오픈소스 대체 스크립트는 커뮤니티 스크립트에서 찾을 수 있습니다.
작성자 지시 사항
This is a private, invite-only indicator. To request access, please follow the instructions on our official website: https://www.dafetradingsystems.com After completing the process on our site, send me a message
Empowering everyday traders and DAFE Trading Systems
DAFETradingSystems.com
DAFETradingSystems.com
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청을 보내고 승인을 받아야 합니다. 일반적으로 결제 후에 승인이 이루어집니다. 자세한 내용은 아래 작성자의 지침을 따르거나 DskyzInvestments에게 직접 문의하세요.
트레이딩뷰는 스크립트 작성자를 완전히 신뢰하고 스크립트 작동 방식을 이해하지 않는 한 스크립트 비용을 지불하거나 사용하지 않는 것을 권장하지 않습니다. 무료 오픈소스 대체 스크립트는 커뮤니티 스크립트에서 찾을 수 있습니다.
작성자 지시 사항
This is a private, invite-only indicator. To request access, please follow the instructions on our official website: https://www.dafetradingsystems.com After completing the process on our site, send me a message
Empowering everyday traders and DAFE Trading Systems
DAFETradingSystems.com
DAFETradingSystems.com
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
