Quantum Forex
- Experts
-
Quoc Huy Bui
Martingale is a fairly popular trading strategy created to increase its position after losses and gradually reduce profits after successful orders. This strategy is based on a fairly common psychological illusion, whereby the probability of winning after a loss will increase. - Version: 4.1
- Activations: 5
Overview
Quantum Forex is an Expert Advisor for MetaTrader 4 that uses a grid-based order management approach. The source code manages BUY and SELL positions separately and evaluates the combined floating result of open positions to determine when orders should be closed.
The EA can add positions in the same direction when the market moves against an existing position by a configured price distance. Its behavior therefore depends on grid spacing, lot configuration, order limits, trading-time settings, and the account's available margin.
Key Features
Separate BUY and SELL Management
The EA maintains separate order groups for BUY and SELL positions. It calculates the floating profit or loss of each group and can close positions when the corresponding monetary threshold is reached.
Grid-Based Order Logic
Additional orders may be opened when the price moves against an existing position by the configured grid distance. The number of orders is constrained by internal grid settings and the account-wide order cap.
Lot Size Configuration
The initial lot size is configurable. The lot multiplier determines how the next order's volume is calculated in the multiplier-based branches. The source also contains alternative lot-size levels for certain grid stages.
Profit-Based Position Closing
The source includes monetary profit thresholds for individual order groups and for the combined open positions. These thresholds are expressed as account-currency amounts in the calculations, not as pip targets.
Order and Margin Checks
Before sending an order, the EA normalizes the requested volume to the symbol's permitted lot settings and checks available margin. It also applies a maximum open-order cap to limit additional order submissions.
Trading-Time Filter
A trading-time filter can restrict when new orders are opened. The filter is disabled by default and uses the broker's server time when enabled.
Recommended Settings
The following values are the defaults found in the source code. They are reference values, not verified optimal settings or recommendations for live trading.
-
Platform: MetaTrader 4
-
Initial lot size: 0.01
-
Maximum open orders: 5, subject to the EA's order-count implementation
-
Lot multiplier: 1.0
-
Grid distance parameter: 100 before the code's digit-based adjustment
-
Daily trade limit: 99
-
Combined profit threshold: 8 account-currency units
-
Trading-time filter: Disabled
-
Trading window when enabled: 23:00 to 08:00, broker time
Actual grid spacing depends on the symbol's digits and the code's point conversion. The default profit thresholds are monetary values in the source calculations; they should not be interpreted as eight pips.
Testing and Optimization
Evaluate the EA in the MetaTrader 4 Strategy Tester using the intended symbol, timeframe, broker specifications, spread assumptions, and historical data.
Testing should examine both trending and ranging markets, floating drawdown, margin usage, the number of simultaneous positions, order execution, and behavior during periods of elevated spreads or slippage. Review the source logic and test the configured order cap under realistic conditions before relying on its behavior.
Backtest results do not establish future performance. Broker execution, trading costs, market conditions, and account parameters can materially affect the outcome.
Important Information
Quantum Forex uses grid-based position management and does not assign a fixed Stop Loss to each order in its current order-opening logic. A sustained one-directional market move can therefore leave positions open for an extended period, increase floating losses, and raise margin requirements.
The order cap and margin checks are operational safeguards; they do not eliminate market risk or guarantee that every order can be closed at a desired price.
Some parameters declared in the source, including UseVirtual, Target, and Risk under the default configuration, are not equivalent to active protections. In particular, the risk-based lot calculation is behind an internal money-management switch that is disabled in the reviewed source, and the declared Target variable does not implement an active equity stop in the reviewed logic.
The source also contains no fixed per-order Stop Loss in its order-opening calls. Users reviewing the code should not assume that the presence of a parameter name means the corresponding protection is implemented.
This document describes the reviewed source code and does not guarantee trading results. The EA should be compiled, tested, and independently checked for logic and execution issues before any deployment.
