Skip to main content
ForexNews24
MartingaleMQL4Professional

SafeMartin Lite: trading robot for MQL4

Author: A. Volkov, quant analyst

SafeMartin Lite is a martingale advisor that increases size after losses, betting that the recovery will cover the whole series.

How the advisor works

The advisor increases the size of each next trade after a loss. The "Safe" prefix in the name usually means a limit on the number of doublings — but such a limit removes the very "inevitability" of the recovery for which martingale is used.

In a calm market the advisor produces a smooth profit curve — and that is exactly what makes it dangerous. The exponential growth of size means that a long enough series of losses zeroes the account faster than the mathematical "inevitability" of a win kicks in.

Parameters and metrics

Advisor parameters
ParameterValue
Multiplier×1.5
Maximum steps4
Base risk0.2% of deposit
Entry signalRSI reversal

Why this advisor cannot be honestly tested on our data

With a martingale advisor it is precisely the pretty tester report that is dangerous: on our calm 400-day sample it will almost certainly show a smooth rising curve and "100% winning series", because a long trend against the position that zeroes the account simply is not present in this history. Such a report is not an error — it honestly reflects the sample, but that is exactly why it misleads: it is silent about the tail risk, which is the whole reason to test a martingale.

What an honest test would require
Not a single tester run but an analysis of the distribution of worst loss series — via Monte Carlo or on a very long history with strong trends — is needed, to see not the typical outcome but the probability and depth of ruin.

We deliberately do not show a backtest here: a tester report computed on unsuitable data would create a false impression of how the advisor behaves on a live account.

From the authors' review
«We publish this advisor for completeness of the technology picture, not as a recommendation — the high win rate here masks a small but non-zero probability of a catastrophic outcome.»

Pros and cons

Pros
  • A smooth profit curve in a calm market.
  • A high proportion of formally winning series.
  • Simple mechanics without a directional forecast.
Cons
  • Exponential size growth leads to zeroing the account.
  • A smooth curve masks catastrophic risk.
  • The deposit runs out before the "inevitable" recovery.

Pitfalls

A martingale advisor is dangerous precisely because it works for a long time: the steady profit lulls, the owner increases the base size — and increases the scale of the future catastrophe. Ruin comes not as a gradual drawdown but as an instant zeroing on a single long series of losses. The "Safe" prefix does not change the essence: as long as size increases against a loss, the risk of ruin remains.

Who it suits

A topic for understanding how a smooth profit curve hides destructive risk, not for use. Martingale in any wrapper is a reliable way to lose the deposit sooner or later.

Related methodology

Methodology
Martingale

Frequently asked questions

If the advisor is almost always in profit, why is it dangerous?

The rare loss is catastrophic: in a long series of losses the size grows exponentially and zeroes the account. One catastrophe outweighs all accumulated profit.

Does the "Safe" prefix make martingale safe?

A limit on doublings turns it into an ordinary strategy with fixed risk and removes the "inevitability" of the recovery for which martingale is used. A safe martingale is no longer a martingale.

Why is a pretty tester report especially dangerous here?

Because it honestly shows a calm sample without a long series of losses and creates the impression of a reliable system. The owner increases size, trusting the curve — and thereby increases the scale of the future catastrophe the report did not show.

From research to application

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

Learn about Allocation