What's worth copying from QuantDinger's trading bots? Not the entries. The grid, DCA
and martingale bots enter on price levels or a schedule, with no signal at all. What's
worth copying is how they exit: three independent layers, per trade, per basket and
per bot, with the last one treating each bot as a small account with its own profit
target and its own stop. That's a structure I'd happily put into an MQL5 EA. The
martingale defaults, on the other hand, need somewhere between 20 and 250 winning cycles
to pay for one loss.

This is part 3 of the series. Part 2 covers the platform as a
whole. As before, everything comes from reading the source at commit 96cec2d; the
martingale numbers are computed with QuantDinger's own preview function.

One thing to be clear about: QuantDinger has no EAs and doesn't connect to MetaTrader.
Its bots are Python, running on crypto exchanges, IBKR and Alpaca. I write MT4/MT5 tools,
so I read their bot rules with one question in mind: which of these would carry over to
an MQL5 EA? Where I say "EA" below, that's what I mean.

Does QuantDinger have a winning strategy?

No, and it doesn't claim to. It's a platform. Its trading logic comes from four places:

Source Entry Exit
4 built-in bots: grid, DCA, martingale, layered martingale price grid or schedule, no signal TP or trailing on the average price, basket stop, bot equity stop
Strategies you write in Python whatever you code a shared SL / TP / trailing / time-limit toolkit
AI-generated strategies an LLM writes code from your description same toolkit
AI market analysis a hand-weighted indicator score gives BUY/SELL/HOLD SL 2×ATR, TP 3×ATR, size from 1% risk

The only example strategy in the repo is a 20/50 moving-average crossover. So the value
here is the risk plumbing, not an edge.

What are the three exit layers?

Layer 1, the position. Every entry can carry stop_loss_pct, take_profit_pct,
trailing_stop_pct, trailing_activation_pct and time_limit_seconds. When a basket is
averaged into, the stop and target follow the new average price.

Layer 2, the basket. Each bot compares the current price with the basket's average:
at take_profit_pct it closes everything, at hard_stop_pct it closes everything. With
trailing on, the fixed TP is switched off and only the trailing exit applies.

Layer 3, the bot's equity. This is the part I like. Each bot tracks
current value / starting capital − 1, including realised P&L, open P&L and fees:

Condition Default Action
Total profit ≥ equity_take_profit_pct +10% close all, stop the bot
Total loss ≥ equity_stop_loss_pct −6% close all, stop the bot
Peak profit reached activation, then fell by callback +5%, then −3% close all, stop the bot

So every bot is a mission with an end: run until it's up 10%, down 6%, or has given back
3% after being up 5%, then stop and wait for a human. Plenty of EAs have a stop per
trade and nothing above it. A per-EA equity stop and an equity trailing stop are cheap
to add in MQL5 (track the EA's own deals by magic number) and they cap the one failure
a per-trade stop can't: a long run of small, individually "acceptable" losses.

Which smaller rules are worth stealing?

Trailing that waits to activate. The trailing stop only starts once the trade is up
by activation; after that it sits at peak × (1 − callback) for a long. Before
activation there's no trailing at all, so a fresh trade isn't shaken out by noise.

Honest gap fills. If a bar opens beyond the stop, the backtest fills at the open, not
at the stop price. Plenty of backtesters get this wrong in your favour.

A "panic breakdown" filter. In the AI analysis score, an oversold RSI normally adds
points. But if the market is in a downtrend or MACD is bearish, that bonus is capped. And
in a "panic breakdown" (strong downtrend plus bearish MACD plus a 3% drop in 24 hours, or
an 8% drop on 1.3× volume) oversold RSI subtracts points and the total is forced to
−25 or lower. It's a simple rule against catching a falling knife.

ATR stops clamped by structure, sized by risk. Stop = the closer of price − 2×ATR and
support × 0.99. Target = the closer of price + 3×ATR and resistance × 1.01. It warns when
reward-to-risk after fees drops below 1. Size = 1% of equity at risk divided by the stop
distance, capped at 30% of equity for crypto and 50% elsewhere.

Should you use the grid bot?

Know what it is first. The default grid runs from −2% to +2% around the start price in 8
cells, long only. At start it buys 60% of the capital at market and spreads that over
the four cells above price; the other 40% waits as limit buys in the four cells below.
Each cell buys at its lower edge and sells at its upper edge, about 0.5% per round trip
before fees.

That's a bet on sideways-to-up, not a neutral grid. If price breaks the lower edge, the
default action is pause: stop opening trades but keep the inventory. Only the −6%
bot equity stop limits the loss.

Why I wouldn't copy the martingale

The default martingale buys level 1 immediately at market, with no signal, then adds as
price falls. I ran the default template through QuantDinger's own preview:

Level Price vs first entry Capital at this level Capital deployed Average price vs first entry
1 0% 8.0% 8.0% 0%
2 −1.20% 9.9% 17.9% −0.67%
3 −2.88% 15.9% 33.8% −1.72%
4 −5.23% 25.5% 59.3% −3.26%
5 −8.52% 40.7% 100% −5.48%

The exit is a trailing take profit that starts at +0.5% above the average and trails by
0.2%, so a win usually banks about +0.3% on the capital deployed. The basket stop is 12%
below the average, but the −6% bot equity stop fires first: with all five levels in and
no leverage, that's around −11% from the first entry.

QuantDinger martingale default template: a win is +0.024% to +0.30% of the bot's capital, one loss is −6%

A win with only level 1 filled makes 0.3% × 8% = 0.024% of the bot's capital. A win
with all five filled makes about 0.30%. One loss costs 6%. That's 20 to 250 wins to
repay a single stop-out. The win rate looks wonderful right up until one steady slide
takes weeks of profit. And after a win, the bot waits one bar and opens level 1 again at
market.

The layered version (5 tiers × 3 orders, size reset each tier, about 20% of capital per
tier) spreads the risk more evenly and survives a −12.4% slide before it's fully
deployed. It exits the same way, so the same asymmetry applies.

DCA is gentler (5 buys, one every 24 hours, 19% of capital each, long only, no leverage)
but it also enters without a signal, and after any exit, a basket stop included, it
resets and starts a new cycle straight away. Only the equity layer stops it.

What I'd put in my own EA

Idea Take it? Why
Three exit layers (trade / basket / EA equity) yes the equity layer caps damage per EA, not just per trade
Trailing with an activation threshold yes no early shake-outs before the trade has worked
Equity trailing (+5%, give back 3%, stop) yes keeps most of an EA's run, not just one trade's
Panic-breakdown rule on oversold signals yes one line, avoids knife-catching
ATR stops clamped by S/R, 1% risk sizing, R:R after fees yes standard, with a fee check most skip
Grid that buys 60% up front only knowingly it's a long bet, not a neutral grid
Martingale / DCA with no entry signal no 20 to 250 wins per loss; it works until the market falls in a straight line

What I didn't verify

  • I didn't run these bots live or backtest them on tick data. The ladder and the
    asymmetry come from the default template and QuantDinger's preview function.
  • Defaults can change after commit 96cec2d, and users can override every one of them.
  • The +0.3% figure for a win is typical, not fixed; it depends on how far price runs
    past the trailing activation.

So far none of this needs AI. The next part looks at the one piece of QuantDinger that is
pure Jev: the gate that approves or blocks entries, and the question it left me with.