Native MT5 • XAUUSD Automation

Nine strategies.
One risk engine.
Built for gold.

Gunit is a native MetaTrader 5 automated trading system engineered specifically for XAUUSD. Nine independent strategies identify opportunities across multiple market structures while a central risk and execution engine controls sizing, exposure, protective stops and trade lifecycle management.

9 / 9
Strategy engines
XAUUSD
Single instrument focus
MT5
Native MQL5 execution
S01S02S03S04S05S06S07S08S09
Gunit mascot: a gold and graphite armoured figure representing the Gunit trading system
Gunit Risk EngineSignal
Execution

Real-tick validation

Tested against 55 million+ real market ticks.

Gunit is being validated with MetaTrader 5's real-tick Strategy Tester rather than simplified candle-only simulations. The current extended test exercised all nine strategies over more than four months of XAUUSD market data.

Backtest

+35.70%

Simulated account return

Backtest

$1,784.87

Net simulated gain

Backtest

400

Completed positions

Backtest

55,191,424

Real ticks processed

Exit lifecycle

During this test the 400 completed positions exited through:

Protective-stop executions
268
Take-profit executions
78
Strategy-managed exits
54

Exit mechanism does not determine profitability. Trailing and protective stops can execute above break-even, so protective-stop executions are not equivalent to losing trades.

Strategy Activity — Extended Test

Completed-position counts per strategy engine. These are activity counts only — per-strategy profit and loss has not been published.

  • S01
    6
  • S02
    5
  • S03
    8
  • S04
    25
  • S05
    33
  • S06
    34
  • S07
    35
  • S08
    43
  • S09
    211

Test statistics

Backtest
Starting test balance
$5,000.00
Ending test balance
$6,784.87
Test period
1 April 2026 – 6 August 2026
Test endpoint
7 August 2026 00:00
Calendar span
128 days
XAUUSD H1 bars generated
2,082
Execution deals
800
Buy positions
193
Sell positions
207
Strategies active
9 / 9
Max concurrent positions observed
9
Max pending orders observed
28
Starting leverage
1:500
Tick model
Every tick based on real ticks

Balance / equity curve

Reserved for an exported MetaTrader 5 balance/equity time series. No curve is drawn from start and end balances alone.

Pending analytics — awaiting computed reports

  • Maximum balance drawdown
  • Maximum equity drawdown
  • Profit factor
  • Win rate
  • Expectancy
  • Sharpe / Sortino
  • Average trade
  • Average holding time
  • Monthly returns
  • Per-strategy net P/L
  • Per-strategy drawdown
  • Consecutive wins / losses
  • Spread and slippage statistics

Backtest disclosure: Results shown are simulated MetaTrader 5 Strategy Tester results and are not live or independently audited trading results. Simulated and past performance does not guarantee future performance. Results can vary materially with broker specifications, spread, commissions, swaps, slippage, latency, leverage, settings and market conditions. Leveraged trading involves substantial risk of loss.

Why Gunit is different

A trading system, not a single strategy.

Gunit separates strategy logic from risk and execution so every entry passes through the same controls.

01

Nine independent gold strategies

Gunit operates nine separately identified strategy engines rather than relying on one entry model. Strategies can be run through predefined activity profiles or selected individually.

02

Central portfolio risk engine

Every new trade is evaluated in the context of existing positions, pending orders and the proposed trade before additional exposure is accepted.

03

Native MT5 execution

Gunit uses native MQL5 trade handling with broker retcodes, native order/deal/position identifiers and centralised validation before execution.

04

Broker-side protection

Protective SL/TP is attached to entries wherever possible, so the system does not intentionally depend on an invisible software-only stop to protect normal positions.

05

Unified stop management

Break-even, fixed trailing and high/low trailing logic are evaluated through one protection engine so competing stop mechanisms do not fight each other.

06

Recovery-aware position management

Gunit can adjust take-profit behaviour as part of its position-management logic while continuing to respect protective stop rules.

07

Economic-event controls

Native MT5 calendar support and deterministic backtest scheduling allow high-impact event windows such as NFP to be handled consistently.

08

Prop-firm / drawdown controls

Daily and total drawdown policies, pending-order cancellation and emergency position handling can be applied as account-level controls.

09

Event-driven trade state

Orders, deals and positions are tracked through MT5 trade events rather than repeatedly rebuilding state from the full account history on every tick.

Risk architecture

Risk is a system, not a lot-size setting.

Before an order reaches the broker, Gunit can evaluate strategy sizing, current open risk, pending risk, proposed risk, broker volume rules, directional volume limits, available margin, order limits and protective-stop geometry.

  1. 01Signal
  2. 02Size
  3. 03Portfolio Risk
  4. 04Broker Validation
  5. 05Margin
  6. 06Execution
  7. 07Protection

Risk controls

  • Open + pending + proposed portfolio-risk calculation
  • Per-strategy risk sizing
  • Symbol-aware min / max / lot-step normalization
  • Margin validation using MT5-native calculations
  • Directional exposure checks
  • Optional hard total-drawdown lock
  • Daily drawdown policies
  • Persistent risk-state support
  • Fail-closed handling when safety-critical risk cannot be calculated
  • Hedging-account validation

Strategy engines

Nine engines. Different horizons. Shared discipline.

Each engine owns its own positions and risk weighting while sharing one execution and protection architecture. Proprietary thresholds and formulas are not published.

S01

6 pos
  • Multi-timeframe signal processing
  • Independent position ownership

S02

5 pos
  • Breakout / pending-entry architecture
  • Independent risk weighting

S03

8 pos
  • Strategy-specific entry cadence
  • Strategy-specific exit management

S04

25 pos
  • Multi-timeframe signal processing
  • Independent risk weighting

S05

33 pos
  • Breakout / pending-entry architecture
  • Strategy-specific exit management

S06

34 pos
  • Independent position ownership
  • Strategy-specific entry cadence

S07

35 pos
  • Multi-timeframe signal processing
  • Strategy-specific exit management

S08

43 pos
  • Breakout / pending-entry architecture
  • Independent position ownership

S09

211 pos
  • Strategy-specific entry cadence
  • Independent risk weighting

Gunit supports activity profiles ranging from conservative strategy subsets through all-strategy operation, plus manual selection of individual strategies. Position counts shown are activity from the extended real-tick test and do not indicate individual strategy profitability.

Execution architecture

From signal to broker through one controlled path.

Gunit keeps strategy logic separate from broker execution. Strategies generate trade intent; the central execution layer decides whether an intent is safe and valid to submit. This makes risk rules consistent across the complete strategy portfolio.

  1. 1XAUUSD Market Data
  2. 2Nine Strategy Engines
  3. 3Trade Intent
  4. 4Risk Engine
  5. 5Pre-Trade Validation
  6. 6Execution Engine
  7. 7MetaTrader 5 / Broker
  8. 8Trade Ledger
  9. 9Position Management

Engineering highlights

  • One central broker-write path
  • Native 64-bit MT5 tickets
  • Explicit broker return-code handling
  • Tick-size-aware price validation
  • Stop/freeze-level checks
  • Pending-order lifecycle management
  • Virtual pending expiration
  • Fill/slippage protection
  • Deterministic strategy state

Performance engineering

Built to stay out of its own way.

Trading logic is kept lean in the tick-critical path. Maintenance, economic-calendar refresh and non-critical state work are moved away from signal execution where practical.

Runtime discipline

  • Native MQL5 architecture
  • No HTTP requests in the tick path
  • No deliberate sleep/retry blocking in normal tick execution
  • Event-driven order/deal tracking
  • Cached symbol specification state
  • Strategy evaluation only on relevant time boundaries
  • Deterministic testing
  • Centralised position modification to reduce unnecessary broker requests
In Development / Roadmap

Gunit is being built beyond static automation.

Everything in this section is planned or in progress and is not presented as a released feature. Gunit should improve by measuring strategies independently and allocating risk intelligently — not simply by increasing lot size.

Phase 1

Verified Core

  • Nine-strategy native MT5 engine
  • Central execution layer
  • Portfolio risk controls
  • Protective stop engine
  • Economic-event controls
  • Deterministic real-tick validation
  • Event-driven state tracking

Phase 2

Strategy Intelligence

  • Per-strategy profit and drawdown attribution
  • Strategy quality scoring
  • Dynamic strategy weighting
  • Better strategy-combination selection
  • Regime-aware strategy activation
  • Volatility-aware risk allocation
  • Session-aware strategy weighting

Phase 3

Execution Intelligence

  • Spread-quality scoring
  • Slippage tracking and execution-quality analytics
  • Pending-order freshness logic
  • Session/liquidity filters
  • Broker-profile tuning
  • Reduced redundant order-management traffic

Phase 4

Portfolio Optimisation

  • Risk-adjusted portfolio optimiser
  • Correlation-aware strategy exposure
  • Adaptive aggregate-risk allocation
  • Drawdown-aware de-risking and recovery
  • Walk-forward optimisation
  • Out-of-sample validation
  • Monte Carlo robustness analysis

Phase 5

Analytics & User Experience

  • Per-strategy dashboard
  • Balance/equity and drawdown analytics
  • Trade attribution
  • Risk-at-entry reporting
  • Session and market-condition breakdowns
  • Exportable reports
  • Preset / profile manager
  • Safer broker/account compatibility diagnostics

Research philosophy

Measure first. Optimise second.

Gunit development treats signal quality, execution quality and risk allocation as separate problems. Changes are tested against controlled data and consistent settings before they become part of the trading system. The goal is not to maximise one backtest — it is to find improvements that remain useful across different market periods, volatility regimes and execution conditions.

Controlled A/B Testing

Change one meaningful variable at a time.

Out-of-Sample Validation

Optimisation should survive data it was not fitted against.

Risk-Adjusted Improvement

Better return only matters when the additional drawdown and exposure are understood.

FAQ

Questions, answered plainly.

Early access

Built for traders who want automation with engineering behind it.

Follow Gunit as extended testing, strategy analytics and adaptive portfolio development continue.

Gunit is trading software. Nothing here is financial advice or a performance guarantee.