PROTECTED SOURCE SCRIPT

Dskyz Adaptive Futures Edge (DAFE)

361
imgur.com/a/igj9lFj
Dskyz Adaptive Futures Edge (DAFE) is a futures trading strategy designed to adapt dynamically to market volatility and price action using a blend of technical indicators. The strategy combines adaptive moving averages, optional RSI filtering, candlestick pattern recognition, and multi-timeframe trend analysis to generate long and short trade signals. It incorporates robust risk management techniques including ATR-based stop-losses and trailing stops, ensuring trades are sized and managed within sustainable risk limits.

Key Components and Logic

-Adaptive Moving Averages
Dynamic Calculation: Fast and slow Simple Moving Averages (SMAs) adapt to changing volatility, making them sensitive to high-momentum shifts and smoothing during quieter price action.

Signal Generation: Entry signals are triggered when the fast SMA crosses the slow SMA in conjunction with price direction confirmation (e.g., price above both for long positions).

-RSI Filtering (Optional)
Momentum Confirmation: The RSI filter provides momentum confirmation to avoid overextended entries. It can be toggled on or off for both long and short conditions.

User Control: Adjustable parameters such as lookback period, oversold/overbought thresholds, and enable/disable switches give full control over its influence.

-Candlestick Pattern Recognition
Engulfing Logic: Recognizes strong bullish or bearish engulfing patterns with configurable strength criteria like range and volume. Patterns are filtered by trend direction and strength for confirmation.

Signal Conflict Handling: When both bullish and bearish engulfing patterns occur within the lookback window, the strategy avoids entry to reduce whipsaws in indecisive markets.

-Multi-Timeframe Trend Filter
Higher Timeframe Filtering: Incorporates 15-minute trend direction as a macro-level filter to align intrabar trades with larger trend momentum.

Smoothed Entry Logic: Prevents entering trades that go against the broader market structure, reducing false signals in choppy or low-conviction moves.

-Trade Execution and Risk Management
imgur.com/pGsk3Hq

Entry Logic
Priority System: Users can define whether moving average signals or candlestick patterns should take priority when both are present.

Volume & Volatility Checks: Ensures sufficient market participation and action before entering a position, improving the odds of reliable follow-through.

Stop-Loss and Trailing Exit
ATR-Based Initial Stops: Dynamically adjusts stop-loss distance based on market volatility using a multiple of ATR (Average True Range), keeping risk proportional to price swings.

Trailing Stop: Protects open profits and enables winners to run by following price action at a set distance (also ATR-based).

-Cooldown Period & Minimum Bar Hold (Trade Discipline Logic)
Cooldown Bars: After an exit, the strategy imposes a mandatory pause before opening a new position.

Why: This avoids rapid-fire re-entries triggered by minor fluctuations that could lead to overtrading and degradation of profitability.

Minimum Bar Hold: A trade must be held for a minimum number of bars before it can be exited.

Why: This prevents the strategy from immediately exiting trades due to fleeting volatility spikes, which previously caused premature exits that often reversed back in favor of the original signal. This ensures trades have adequate time to develop, filtering out noise from true reversals.

-Visual Elements and Transparency Tools
Chart Overlays: Moving averages, RSI values, and trade entry/exit points are shown directly on the chart for complete visibility.

Dashboard UI: Displays critical live metrics—current position, PnL, time held, ATR values, etc.

Debug Logs: Optional toggles allow verbose condition tracking for deep inspection into why a trade occurred (or didn't), useful for both live optimization and debugging.

-Input Parameter Reference Guide
Input Name Function & Suggested Use

Use RSI Filter - Enables or disables RSI-based entry confirmation. Disable if price action alone is desired for entry decisions.
RSI Length - RSI lookback period. Lower values (e.g., 7–14) are more responsive; higher values reduce false signals.
Overbought / Oversold Levels - Used to detect exhaustion zones. E.g., avoid long entries above 70 or short entries below 30.
Use Candlestick Patterns - Enable detection of bullish/bearish engulfing patterns as trade signals. Disable to rely only on trend/MA.
Pattern Strength Thresholds (Range, Volume) - Filters out weak engulfing signals. Higher values require stronger patterns to trigger.
Use 15min Trend Filter - Adds multi-timeframe trend confirmation. Recommended for filtering entries against larger trend direction.
Fast MA - Base Length for fast adaptive moving average. Suggested: 10–25.
Slow MA - Base length for slow adaptive moving average. Suggested: 30–60.
Volatility Sensitivity Multiplier - Multiplies volatility adjustments for adaptive MA length. Higher = more reactive to volatility.
Entry Volume Filter - Filters out trades during low volume. Recommended to prevent entries in illiquid conditions.
ATR Length - Lookback period for ATR calculation. Suggested: 14.
Trailing Stop ATR Offset - Defines how far the stop-loss is from entry. 1.5–2.5 is typical for medium-volatility environments.
Trailing Stop ATR Multiplier - Determines trailing stop distance. 1.5 is tight; 3+ gives more room for trending trades.
Cooldown Bars After Exit - Prevents immediate re-entries. Suggested: 3–10 bars depending on timeframe.
Minimum Bars to Hold Trade - Ensures trades are held long enough to avoid knee-jerk exits. Suggested: 5–10 for intraday strategies.
Trading Hours (Start / End) - Sets the window of allowed trading. Prevents entries outside key session times (e.g., avoid pre-market).
Enable Logging / Debugging - Shows internal trade decision data for tuning and understanding the logic.

Compliance with TradingView Regulations
Realistic Backtesting: The strategy uses proper initial capital, fixed trade quantities, and risk parameters to reflect realistic scenarios.

Transparent Trade Logic: Every condition used for signal generation is documented and controllable by the user. Users can view each signal's rationale.

Risk Mitigation: Cooldown bars, ATR stops, and minimum trade duration ensure the strategy behaves predictably and prevents reckless trade behavior.

Customization: Full control over each module (MA, RSI, Candlestick, Trend, etc.) gives users the ability to tailor the strategy to suit various futures contracts or timeframes.

imgur.com/BXY0I7e
imgur.com/1NTLLGE
imgur.com/FGIERag
imgur.com/eXacMso
imgur.com/jFuqK95

Summary
DAFE was built for high-stakes micro futures trading environments such as the MNQ, where milliseconds of volatility matter. This strategy's modular architecture, adaptive logic, and advanced risk controls make it an ideal framework for scalpers and swing traders alike.

BTCUSDT.P
Backtesting: dropbox.com/scl/fi/e0gg850qay6jiwh4arm1y/Dskyz_Adaptive_Futures_Edge_-DAFE-_BYBIT_BTCUSDT.P_2025-04-06.xlsx?rlkey=h3a5r3wznv6o535lo2vy0xiu0&st=ieouqozp&dl=0

Deep Backtesting:
dropbox.com/scl/fi/hoof4usdjp4hgk41iadai/Dskyz_Adaptive_Futures_Edge_-DAFE-_BYBIT_BTCUSDT.P_2025-04-06-1.xlsx?rlkey=sz0bjyem3xkaq0nctsjhoo4ja&st=zebvvolj&dl=0

****Currently testing on a prop account.

Caution Statement
This strategy is designed for educational and experimental purposes and should not be considered financial advice or a guaranteed method of profitability. While the DAFE (Dskyz Adaptive Futures Edge) strategy incorporates advanced filters, adaptive logic, and volatility-based risk management, its performance is subject to market conditions, data accuracy, and user configuration.

Futures trading involves substantial risk, and the leverage inherent in futures contracts can amplify both gains and losses. This strategy may execute trades rapidly and frequently under certain conditions—particularly when filters are disabled or thresholds are set too tightly—potentially leading to increased slippage, commissions, or unanticipated losses.

Users are strongly advised to:
Backtest thoroughly across various market regimes.
Adjust parameters responsibly and understand the implication of each input.
Paper trade in a simulated environment before going live.
Monitor trades actively and use discretion when market volatility increases.

-By using this strategy, you accept all risks and responsibility for any trading decisions made based on its output.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.