Technology & documentation

The engineering behind Gunit

Strategy logic, portfolio risk and broker execution are separate layers. Proprietary strategy constants and formulas are not published.

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