GridMaster FX: trading robot for MQL4
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
| Parameter | Value |
|---|---|
| Grid step | 0.5 × ATR(14) |
| Levels each side | 10 |
| Max exposure | 10% of deposit |
| Instrument | USD/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.
Pros and cons
- Requires no directional forecast — works on oscillations.
- Steady automated profit in a range.
- Reacts to every swing faster than a human.
- 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
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.