Super Martingal

Multi-Timeframe SuperTrend Martingale & Hedging EA

System Overview

 MetaTrader 5 Expert Advisor designed for traders familiar with algorithmic execution, multi-position management, Martingale progression, and hedged trade structures.

The system combines multi-timeframe SuperTrend confirmation with configurable lot-sizing logic, price-distance-based entry layering, opposite-direction hedging, and trend-reversal-based cycle management.

Rather than relying on a single entry signal, the EA applies configurable directional filters and trade-management rules to coordinate entries and exits across a trading cycle.

my first EA published on the MQL5 Market, developed for traders who want configurable execution logic and greater control over their automated trading parameters.

Core Architecture

1. Multi-Timeframe SuperTrend Confirmation

The EA supports configurable SuperTrend filters across multiple timeframes to establish directional alignment.

  • Bullish alignment qualifies BUY-side entries.

  • Bearish alignment qualifies SELL-side entries.

  • Misaligned trend conditions can restrict new entries.

  • ATR periods and SuperTrend multipliers can be configured for the supported filters.

This architecture allows higher-timeframe direction to be incorporated into entry qualification while lower-timeframe conditions can be used for more responsive execution, depending on the selected configuration.

2. Configurable Martingale Progression

The Martingale engine manages successive primary entries according to configurable volume and spacing rules.

  • Initial trade volume

  • Lot progression multiplier

  • Maximum layer count

  • Minimum distance between qualifying entries

  • Cycle-level trade management

The lot-sizing logic determines subsequent primary volumes according to the configured progression. Entry spacing and layer limits define the conditions under which additional positions may be opened.

Martingale progression can materially increase aggregate exposure during sustained adverse price movement. Maximum layers alone do not define a maximum monetary loss.

3. Opposite-Direction Hedge Engine

CUBE ALGO includes an optional hedge mechanism that can open an opposite-direction position alongside a qualifying primary entry.

  • BUY-side primary entries can trigger SELL hedges.

  • SELL-side primary entries can trigger BUY hedges.

  • Hedge volume is controlled by a configurable multiplier.

  • Hedge sizing can remain independent of the primary Martingale progression where supported.

This separates primary entry progression from hedge-volume calculation, allowing the two components to follow different sizing rules.

A hedge is not equivalent to a guaranteed reduction in risk. The combined positions remain subject to spread, commission, swap, margin, and execution costs.

4. SuperTrend-Based Cycle Exit

SuperTrend can be used as an additional cycle-level exit mechanism.

When the configured reversal conditions are satisfied, the EA can close the managed primary positions and their associated hedge positions.

The selected exit configuration determines how trend changes across the available timeframes influence cycle termination. Traders should verify the exact reversal logic and position-selection behavior in the published build.

5. Multiple Position-Sizing Modes

The available lot-management modes may include:

  • Fixed Lot: Uses a predefined volume for primary entries.

  • Martingale: Applies the configured progression to successive primary entries.

  • Anti-Martingale: Adjusts primary trade volume according to the implemented Anti-Martingale rules.

Mode availability and interaction with hedging depend on the EA version.

6. Trade-Level Risk Controls

Where supported by the selected configuration, the EA provides:

  • Configurable take-profit and stop-loss distances

  • SuperTrend-based cycle exits

  • Maximum Martingale layer settings

  • Entry-spacing controls

  • Configurable hedge volume

These mechanisms govern trade execution and position management; they do not guarantee a specific drawdown limit or account-level loss cap.

Input Parameters

Exact parameter names and availability depend on the published build.

  • LotMode – Select the supported position-sizing mode.

  • FixedLot – Set the initial or fixed trade volume.

  • MartingaleMultiplier – Configure primary lot progression.

  • MaxMartingaleLayers – Define the maximum Martingale layer count.

  • MartingaleStepPoints – Set the minimum entry spacing.

  • EnableHedging – Enable or disable opposite-direction hedging.

  • HedgeLotMultiplier – Configure hedge volume relative to the corresponding primary entry.

  • SupertrendTF1 / TF2 / TF3 – Select the available SuperTrend timeframes.

  • ST ATR Period – Configure the ATR calculation period.

  • ST Multiplier – Configure the SuperTrend ATR multiplier.

  • EnableSupertrendSL – Enable the additional SuperTrend-based exit, if supported.

  • TakeProfitPoints – Configure the take-profit distance.

  • StopLossPoints – Configure the stop-loss distance.

  • MagicNumber – Identify the EA's managed trades.

  • MaxSpreadPoints – Set the permitted spread threshold, if supported.

  • MaxSlippagePoints – Configure the permitted price deviation, if supported.

Account and Execution Compatibility

The hedge mechanism generally requires an MT5 hedging account, which allows separate positions in opposite directions on the same symbol.

On a netting account, an opposite-direction order may reduce, close, or reverse an existing position rather than create a separate hedge.

Execution behavior also depends on broker contract specifications, volume limits, stop-level restrictions, available margin, and trade-server responses.

Testing and Validation

Experienced users should validate the following before deployment:

  1. SuperTrend alignment and signal timing across configured timeframes.

  2. Martingale volume progression and entry-spacing calculations.

  3. Maximum-layer enforcement and repeated-signal handling.

  4. Hedge direction, volume calculation, and position identification.

  5. TP/SL assignment and cycle-wide closure behavior.

  6. Margin utilization, aggregate exposure, and adverse-trend scenarios.

  7. Spread, commission, swap, slippage, and execution sensitivity.

  8. Strategy Tester results followed by demo forward testing.

Backtests should include adverse market conditions and realistic transaction costs. Parameter optimization alone does not establish robustness.

Risk Disclosure

Martingale and Anti-Martingale methods can increase exposure, and hedged positions can introduce additional margin and transaction costs. Trend filters can lag price movements, while gaps, slippage, liquidity conditions, and execution failures can produce results different from historical tests.

Users are responsible for validating the strategy, understanding its position-management logic, and selecting settings appropriate to their account and risk tolerance.


Filter:
No reviews
Reply to review