Skip to main content
ForexNews24
GridMQL4Intermediate

GridMaster FX: trading robot for MQL4

Author: D. Petrenko, risk manager

GridMaster FX is a grid advisor that profits from price oscillations around a mean without forecasting direction.

How the advisor works

The advisor enters against the deviation of price from a moving average, betting on a return to it. In a ranging market automation is especially apt here: a grid requires a fast, unemotional reaction to every swing, which is hard for a human.

But automation is precisely what lulls vigilance: a smooth profit curve in a calm market invites increasing size. Grid advisors are profitable while the market oscillates and dangerous in a trend, where a series of losing positions accumulates against the move.

Parameters and metrics

Advisor parameters
ParameterValue
Grid step0.5 × ATR(14)
Levels each side10
Max exposure10% of deposit
InstrumentUSD/JPY

Check on real data

The advisor's logic was run on real quotes without fitting parameters to history. The rule tested was "GridMaster: counter-trend mean reversion from SMA(100)":

  • Buy when price deviates more than one ATR(14) below SMA(100).
  • Sell when price deviates more than one ATR above SMA(100).
  • Flat while price stays within one ATR of the average. A simplified grid model without the order ladder.
+4.0%
Return/year (CAGR)
2.3%
Max drawdown
0.90
Sharpe ratio
68%
Winning trades
22
Trades in period
47%
Time in market
98100102104106
AdvisorBuy and hold
Equity curve of the advisor's rule against passive buy-and-hold on the EUR/USD sample, 2025-06-16 — 2026-07-20. On this sample the advisor beat buy-and-hold. This is a result on one instrument over one period — an illustration of the mechanic, not a promise of returns.
How to read this result
A live advisor would add the execution costs of a specific broker to this picture — spread and slippage that are absent from the model run. That is why, before a real account, any EA goes through a forward test on demo: only it reveals the actual execution.
From the authors' review
«The high win rate of grid systems is deceptive — it does not reflect the risk of a rare but destructive run against the trend.»

Pros and cons

Pros
  • Requires no directional forecast — works on oscillations.
  • Steady automated profit in a range.
  • Reacts to every swing faster than a human.
Cons
  • Dangerous in a trend — accumulates losses against the move.
  • A smooth curve masks hidden risk.
  • Requires a hard limit on the position run.

Pitfalls

A grid advisor creates an illusion of reliability: months of steady profit, and then a single strong trend erases everything accumulated. The mistake is trusting the smooth curve and increasing size without a hard limit on total loss and number of levels. It is exactly those limits, set before launch, that separate a working grid advisor from an account-zeroing machine.

Who it suits

For traders of ranging instruments who understand the asymmetry of a grid: steady profit at the cost of a rare large loss in a trend. Categorically requires risk limits.

Related methodology

Methodology
Grid trading

Frequently asked questions

Why does a grid advisor often show steady profit and then lose everything?

In a range it collects many small profits but accumulates the hidden risk of a series of losing positions against a possible trend. When the trend arrives, that series is realized as a single large loss that erases what was accumulated.

Can a grid advisor be made safe?

Fully — no; manageable — yes: a hard limit on the number of levels and total loss, and shutdown when price leaves the range. These constraints cut off the catastrophic tail at the cost of part of the profit.

What did the real backtest show?

On a calm sample the simplified grid model is profitable — but this is precisely the case where the result is misleading: the short history contains no strong trend, which is what endangers a grid.

From research to application

In our Allocation product we implemented these algorithms with all the nuances covered across the portal.

Learn about Allocation