Aegis Trend Filter Engine GOLD 15m Quality Supertrend Strategy by gabipeti79
By gabipeti79
Performance Metrics
- Author: gabipeti79
- Symbol: OANDA:XAUUSD
- Timeframe: 15 minutes
- Win Rate: 41.7%
- Profit Factor: 1.666
Description
Aegis Trend Engine — Quality Supertrend StrategyA multi-layer trend-following strategy designed to filter noise, confirm market structure, and focus on higher-quality directional moves. THIS STRATEGY IS ONLY DESIGNED FOR GOLD 15M TRADING, AND NOTHING ELSE!The Aegis Trend Engine is not a standard Supertrend strategy.While traditional Supertrend systems react to every trend flip, Aegis uses a multi-layer confirmation architecture to determine whether a new directional signal has enough supporting evidence to justify an entry.At its core, the system combines Supertrend, momentum, trend strength, volatility, external market structure, and higher-timeframe confirmation into a unified quality model.The objective is simple:Trade fewer Supertrend reversals — but focus on the ones occurring in stronger market conditions.The strategy was designed primarily around trend-driven markets where large directional moves can develop after periods of consolidation or structural transition.How Aegis WorksThe Supertrend remains the main directional engine.However, a Supertrend flip alone is not enough to trigger a trade.Every potential entry must pass several independent layers of confirmation.The strategy evaluates the market from four perspectives:Trend quality → Momentum → Market structure → Higher-timeframe contextOnly when these components align does a BUY or SELL setup become valid.1. Supertrend Direction EngineThe Supertrend acts as the primary trend-state detector.A bullish reversal creates a potential LONG setup.A bearish reversal creates a potential SHORT setup.Default parameters:Supertrend Factor: 3.0ATR Length: 10Unlike a basic Supertrend strategy, Aegis does not automatically trade every reversal.Instead, the raw signal is passed into the Quality Engine.2. Eight-Factor Quality EngineEvery potential trade is evaluated using eight independent market characteristics.Each condition contributes one point to the base score.The maximum base score is:8 pointsThe eight components are:EMA TrendThe fast EMA must be positioned correctly relative to the slow EMA.For LONG:Fast EMA > Slow EMAFor SHORT:Fast EMA -DIFor SHORT setups:-DI > +DIThis provides another independent confirmation that directional pressure agrees with the proposed trade.RSI BiasRSI is used as a directional momentum filter rather than as a traditional overbought/oversold indicator.Default levels:LONG: RSI ≥ 52SHORT: RSI ≤ 48The neutral zone between the two thresholds helps prevent entries when momentum is ambiguous.Short-Term MomentumA short Rate of Change measurement evaluates immediate price momentum.Positive momentum supports LONG setups.Negative momentum supports SHORT setups.This final component helps determine whether the current price impulse agrees with the broader setup.3. Final Quality ScoreThe eight components create the Base Quality Score.Example:6 / 8does not mean the setup has a 75% probability of winning.It simply means that six of the eight independent quality conditions currently support the trade.The strategy then applies the Higher-Timeframe layer before calculating the final score.The default minimum final score is:5Higher values make the strategy more selective.Lower values allow more trades but may increase exposure to weaker setups.4. Higher-Timeframe Soft ConfirmationOne of the key features of Aegis is its Soft HTF Score.Many multi-timeframe strategies use higher-timeframe trend direction as a hard filter.For example:Only take LONG trades if the 1-hour trend is bullish.While intuitive, this can eliminate high-quality early reversals.Aegis uses a different approach.The higher timeframe modifies the Quality Score rather than completely blocking every countertrend setup.Default Higher Timeframe:1 HourIf the HTF Supertrend agrees with the proposed trade:+1 pointIf the HTF trend is opposite but weak:0 pointsIf the HTF trend is strongly opposite:−1 pointThis allows the system to remain selective without becoming excessively rigid.5. Confirmed Higher-Timeframe DataThe HTF calculations use the previous completed higher-timeframe candle.This is important because incomplete higher-timeframe candles can change before they close.Using confirmed HTF information makes historical signals more stable and helps prevent misleading behaviour caused by using unfinished higher-timeframe states.6. External Market Structure FilterAegis also evaluates higher-level price structure independently from the Supertrend.Confirmed swing highs and lows are detected using pivot logic.The current default sensitivity is:3 bars left / 3 bars rightThis setting gives the structure engine enough responsiveness to detect meaningful transitions without requiring extremely large swing structures.A structure break is confirmed using the candle close.A wick through the level alone is not considered sufficient.For example:Price trades above a swing high but closes back below it:No confirmed bullish break.Price closes above the swing high:Bullish structure confirmation.The same logic applies in reverse for bearish structure.7. External Structure as a Hard FilterUnlike the higher-timeframe Supertrend, external structure operates as a hard directional filter.When external structure is bullish, LONG signals are allowed.When external structure is bearish, SHORT signals are allowed.This helps prevent the strategy from repeatedly reacting to small Supertrend fluctuations against the broader structural direction.It is particularly useful during choppy environments where short-term indicators may change direction several times while the larger market structure remains intact.8. ATR Volatility GuardMarkets behave very differently under extremely low and extremely high volatility.The Aegis Trend Engine therefore compares current ATR with its longer-term average.This creates a normalized volatility ratio.By default, signals are permitted only inside a configurable volatility range.This can help avoid:Extremely quiet markets, where Supertrend signals may repeatedly whipsaw.And:Extreme volatility spikes, where price behaviour may become unusually unstable.Because the measurement is relative to recent ATR, it automatically adapts to different price levels.9. Optional Squeeze FilterThe system includes an optional volatility compression detector using Bollinger Bands and Keltner Channels.When enabled, entries can be blocked while the market remains inside a squeeze.This feature is optional because some strong trends begin directly from compressed conditions.Users can therefore test whether excluding squeeze environments improves performance for their chosen market and timeframe.10. Optional Trading SessionA session filter is included for users who want to limit entries to particular trading hours.The default session template is based on New York time.The filter can be disabled completely.This makes the system flexible across assets that behave differently during various market sessions.11. Exit PhilosophyThe system intentionally separates:Entry qualityfromTrend invalidation.A trade may require several confirmations to enter.But once a position exists, a raw opposite Supertrend flip can close the position.This means the strategy does not require another complete high-quality setup in the opposite direction before protecting an existing trade.In other words:Entry should be selective. Exit should remain responsive.This design attempts to reduce the risk of holding a trade simply because the opposite setup has not yet accumulated enough confirmation points.12. Clean Stop-Loss VisualizationThe strategy uses a deliberately minimal chart design.Instead of covering the chart with multiple indicator lines, the interface focuses on the information most relevant for decision-making.During bullish conditions:Green stop dots appear below price.During bearish conditions:Red stop dots appear above price.These dots represent the current Supertrend protective level.The purpose is to provide an intuitive visual reference for where trend invalidation is currently located.13. Dynamic Trend Strength ColoringThe color intensity of the stop dots also provides information.A lighter shade indicates a weaker or less developed trend environment.A darker shade indicates stronger trend conditions.The visual strength model considers information already calculated by the strategy, including:Quality ScoreADX strengthHigher-timeframe trend strengthThe color is purely visual.It does not modify the strategy's entry or exit logic.Its purpose is to make the current market condition easier to interpret at a glance.14. BUY and SELL LabelsAccepted entries are displayed directly on the chart.Green BUYA bullish Supertrend reversal has passed:Quality requirementsVolatility conditionsExternal structure confirmationHigher-timeframe scoringRed SELLThe corresponding bearish conditions have been satisfied.This means the labels represent filtered strategy signals, not every Supertrend flip.15. FTMO / OANDA Environment ModeAegis includes an environment selector designed to make strategy analysis easier across different execution assumptions.Users can switch between:FTMO ModeandOANDA ModeEach environment can have its own modeled values for:SpreadSlippageCommissionThis allows the strategy's gross historical performance to be compared with a more conservative estimate after modeled execution costs.The cost values remain user-configurable because actual trading costs vary by instrument, account type, market conditions and broker environment.Important:The environment selector does not change the TradingView market data feed.For example, when testing OANDA data, the appropriate OANDA chart should also be selected.16. Strategy DashboardThe built-in dashboard provides a quick overview of the internal state of the system.Depending on the version and configuration, it can display information such as:Current Supertrend directionExternal structureHigher-timeframe directionHTF strengthBase LONG / SHORT scoresFinal LONG / SHORT scoresRaw Supertrend signalsRejected signalsAccepted setupsSelected execution environmentModeled trading costsModeled net resultThe purpose of the dashboard is transparency.Instead of simply printing a BUY label, users can see why the system currently considers the market strong or weak.Why Aegis Is Different From a Standard SupertrendA traditional Supertrend system might behave like this:Supertrend turns green → BUYSupertrend turns red → SELLAegis instead evaluates:Supertrend reversal↓Trend quality↓Momentum↓Volatility↓External structure↓Higher-timeframe context↓Final quality threshold↓BUY / SELLThe Supertrend provides timing.The additional layers attempt to provide context.That distinction is the foundation of the strategy.Recommended Starting ConfigurationThe following configuration can be used as a starting point for experimentation:SupertrendFactor: 3.0ATR Length: 10Quality ScoreMinimum Final Score: 5External StructureSwing Left: 3Swing Right: 3Higher TimeframeHTF: 1 HourHTF ST Factor: 3.0HTF ATR Length: 10These are starting values rather than universal optimal settings.Different instruments and timeframes can behave very differently.Designed for Trend-Following MarketsAegis is fundamentally a trend-following system.Its purpose is not to predict every market top or bottom.It attempts to participate when several independent measurements indicate that directional conditions are becoming favorable.The strategy may perform best during periods where:Price develops sustained directional movementMomentum and market structure alignVolatility supports expansionHigher-timeframe conditions provide confirmationLike most trend-following systems, it can struggle during prolonged sideways and highly mean-reverting environments.No filter can completely eliminate this behaviour.Suggested MarketsThe framework can be tested on:Gold / XAUUSDEquity indicesForexCryptoOther sufficiently liquid marketsHowever, parameters should not automatically be assumed to transfer from one instrument to another.Market structure, volatility, spread and trend persistence vary significantly between assets.Suggested TimeframeThe strategy has been developed primarily with intraday trend-following behaviour in mind.15-minute charts provide a useful starting point.Higher and lower timeframes can also be tested, but the behaviour of the system can change substantially.Always evaluate a sufficiently large sample before drawing conclusions.BacktestingUsers should evaluate more than Net Profit.Important metrics include:Profit FactorMaximum DrawdownExpected PayoffNumber of TradesAverage WinnerAverage LoserRisk-adjusted performancePerformance across different market periodsA strategy producing excellent performance during one isolated market regime may behave very differently when conditions change.For this reason, testing across multiple years and different volatility environments is strongly recommended.Important Note About CostsBacktests can look significantly better than real execution.Real trading may include:SpreadCommissionSlippageLatencyDifferent broker pricingUnexpected volatilityOrder execution differencesThe FTMO/OANDA modeled cost section is included to make users more aware of this issue, but any modeled execution environment remains an approximation.Non-Repainting PhilosophyThe strategy is designed around confirmed information wherever higher-timeframe state is involved.Higher-timeframe Supertrend calculations use completed HTF candles rather than relying on the unfinished current HTF candle.External structure also requires confirmed pivots and closing-price breaks.This does not mean that every indicator value is permanently fixed while the current chart candle is still forming.As with virtually all real-time strategies, values on the active candle can evolve before that candle closes.For backtesting and signal evaluation, confirmed-bar behaviour should therefore be considered.Who Is This Strategy For?Aegis may be useful for traders who prefer:Trend followingSystematic decision-makingMulti-factor confirmationClear directional signalsMinimal chart clutterHigher-timeframe contextMarket structure confirmationObjective rule-based entriesIt is not intended for traders looking for guaranteed reversals, perfect tops and bottoms, or extremely high-frequency signals.Philosophy Behind the NameAegis traditionally represents protection or a shield.That reflects the philosophy behind the system.The goal is not to generate the maximum possible number of signals.The goal is to place several defensive layers between the trader and low-quality market conditions.Supertrend provides the signal.The Aegis attempts to decide whether that signal deserves to be traded.DisclaimerAegis Trend Engine is provided for educational, analytical and research purposes only.It does not constitute financial or investment advice.Historical and backtested performance does not guarantee future results.Trading leveraged products can result in substantial losses.Execution costs, spread, slippage and market conditions can materially affect live results.Users are responsible for testing the strategy, understanding its logic and determining whether it is suitable for their own trading objectives and risk tolerance. XAUUSD