Description
EA LAB / TREND FOLLOWING + PULLBACK / EA021 v1.07 / FREE
Follow the trend. Wait for the pullback.
Two EMAs define direction.
Stochastic identifies the pullback.
A closed candle confirms the entry.
EA #021 Dual EMA Stochastic Pullback is a free MetaTrader 5 Expert Advisor for testing and automating a configurable trend-continuation setup. It combines a fast/slow EMA filter with a recent Stochastic oversold or overbought condition and one of three entry confirmations. Every trade has a physical ATR stop loss.
Free software, full setup: price 0 EUR. Complete the free order to receive the customer package and your EA021 activation key. No payment is required. Demo/live activation uses the standard two MT5 account/server combinations. Strategy Tester and optimization work without online activation.
Read the 17-page user manualExplore trade examples
What this EA does
The robot reads confirmed signal-timeframe candles, checks whether a recent closed Stochastic candle reached an extreme, then places a market order on the next eligible tick when all conditions permit. Signal TF, Stochastic TF and trailing TF are independent. Each offers M5, M15, M30, H1, H4 and D1; the tester chart period does not replace the Signal TF input.
BUY SETUP
Pull back into an uptrend
Fast EMA is above slow EMA and the last signal close is above slow EMA. At least one closed %K value reached the oversold threshold within the lookback. If enabled, %K must now be rising. The selected confirmation completes the setup.
SELL SETUP
Retrace into a downtrend
Fast EMA is below slow EMA and the last signal close is below slow EMA. A recent closed %K reached the overbought threshold. If enabled, %K must now be falling. The selected SELL confirmation mirrors BUY.
Three configurable entry confirmations
| Mode | BUY / SELL rule |
|---|---|
| 0 · Stochastic K/D cross | BUY: previous K ≤ D, latest K > D. SELL: previous K ≥ D, latest K < D. Both oscillator candles are closed. |
| 1 · Close crosses fast EMA | BUY: previous close at/below its fast EMA, latest close above its fast EMA. SELL: previous close at/above its fast EMA, latest close below it. |
| 2 · Direction candle | Bullish completed signal candle for BUY; bearish completed candle for SELL. A doji does not confirm. |
The recent extreme does not need to occur on the entry candle. The lookback is measured in closed Stochastic candles. A K/D cross is required only in mode 0. Entry does not wait for the signal candle’s high/low breakout; the inside-bar gate belongs to optional trailing.
Risk, stops and exits
The initial SL uses the previous closed Signal TF ATR multiplied by InpStopATR, adjusted outward to valid broker stop distance and tick size. Balance-risk sizing calculates volume from the actual entry-to-stop distance; fixed lots are an alternative. Broker volume rules, a lot cap and available margin can block entry. One own position is allowed per symbol/magic, without pyramiding.
The optional trend exit closes BUY when fast EMA falls below slow EMA and SELL when it rises above. Optional fixed-R TP, break-even, candle trailing and next-session closing can be enabled separately. Candle trailing uses 1–4 completed candles on its own TF and only tightens the stop. Its inside-bar gate waits for Bid above the mother high for BUY or Ask below the mother low for SELL.
Trading-hours filters limit new entries using broker-server time. Existing positions remain managed when entry hours or licensing block new trades. The DD threshold in Custom Max is an optimization filter, not a live-account loss cutoff.
Trade examples



The supplied GOLD.pro M15 configuration
| Input | Example SET |
|---|---|
| Signal / Stochastic TF | M15 / M5 |
| Fast / slow EMA | 19 / 55 |
| Stochastic K / D / slowing | 11 / 3 / 3 |
| Oversold / overbought / lookback | 20 / 80 / 9 closed M5 candles |
| Confirmation / Stochastic turn | Mode 1: close crosses fast EMA / ON |
| Initial stop / risk | ATR 14 × 2.0 / 1% of balance |
| Trend exit / TP / BE / trailing | ON / OFF / OFF / OFF |
| Trading hours / next-session close | OFF / OFF |
The supplied SET differs from factory defaults. Loading a preset changes the inputs. Its TP RR field is marked for optimization while TP is OFF; uncheck it to avoid redundant passes. Keep InpApplySuggestedRanges=false to preserve your own saved optimization ranges.
Example historical backtest
Source expert v1.07; GOLD.pro; OANDA TMS Brokers S.A., OANDATMS-MT5 (Build 6230); 1 January 2025–1 October 2026; M15 chart and signals, M5 oscillator; initial deposit 5,000 USD; leverage 1:100; 1% balance risk. The balance curve above uses the original Deals table, including recorded swap, without smoothing or invented points.
Using this specific configuration, the report records 11,536.98 USD net profit, Profit Factor 1.29, 25.60% maximum relative equity drawdown and 579 trades. There were 145 winning trades (25.04%), 434 losing trades and a longest sequence of 19 losses. The final balance is 16,536.98 USD. The result depends on larger winners offsetting frequent losses.
History quality: 99%, 145,069,618 ticks. The modeling-mode label and spread schedule are not explicitly stated. Recorded commission is 0.00 USD; total swap is -1,211.21 USD. The report and EX5 were supplied by the owner; no new independent compile, MT5 rerun, live activation or out-of-sample result is claimed.
Download the original MT5 report ZIP. Balance from closed deals is not the full intratrade equity curve. Maximum equity DD comes from the original MT5 statistics.
What you receive
- EA021 v1.07 EX5 for MetaTrader 5.
- GOLD.pro M15 example SET with independent M5 Stochastic settings.
- The 17-page English user manual with illustrated BUY/SELL setups and risk examples.
- Quick-start installation and activation instructions.
- An EA021 license after the completed free order, for two MT5 account/server combinations.
The MQ5 source is not included in the customer package. Manual and report are public; the customer ZIP is delivered through WooCommerce downloads after the free order. MT5 is the available platform; cTrader or TradingView availability is subject to a separate development request.
Install and activate
- Copy EX5 into MT5 Data Folder / MQL5 / Experts and refresh Navigator.
- Load the supplied SET and review symbol, timeframe inputs, risk and exits.
- For demo/live, allow https://ea-lab.dev under Tools → Options → Expert Advisors → WebRequest.
- Enter your EA021 license in InpLicenseKey, enable Algo Trading and verify LICENSE ACTIVE.
- Test on demo and your broker’s data before live use. TESTER MODE needs no key and consumes no activation slot.
Optimization suggestions
Use MT5 Custom max with default SMOOTH EQUITY to rank qualified tests. The default gates are 40 trades and 35% relative equity DD. Smooth Equity also requires positive profit, at least 7 samples across 35 days and four evaluated weekly windows. NET PROFIT is a manual alternative. Neither ranking mode predicts future returns.
Optimize small groups: EMA pair, oscillator TF/lookback and confirmation mode; compare exits separately. Keep risk fixed. Avoid sweeping inactive TP, BE or trailing fields. Compare neighboring parameters, reserved data and costs; perform a final real-tick test when broker data is available. Read Strategy Lab for general testing guidance.
Version 1.07
Hidden computational ATR in tester; corrected EA LAB version labeling; OPT descriptions and optional numeric range seeding. Original trading logic and existing input names/defaults retained. Licensing, independent timeframes and Smooth Equity remain in place.
Frequently asked questions
Is this robot really free?
Yes. The product price is 0 EUR. Complete the free order to obtain the protected download and activation key; there is no required payment.
Do I need a license in Strategy Tester?
No. Tester and optimization bypass online activation. Demo/live accounts require your EA021 key.
Which markets and timeframes can I use?
The supplied example was tested on GOLD.pro with M15 signals and M5 Stochastic. Other symbols or broker suffixes need separate validation. Available input TFs are M5, M15, M30, H1, H4 and D1.
Why is there no trade when Stochastic reaches 20 or 80?
The EMA trend, recent extreme, selected confirmation, optional oscillator turn and execution checks must all pass. An extreme alone is not an entry.
Does TP RR change the supplied preset’s exits?
No. TP is OFF in that preset. The physical ATR SL and enabled reverse EMA trend exit manage exits.
Why is ATR not visible?
ATR is used internally to calculate the stop loss. It is hidden in the visual tester; hiding its plot does not disable the calculation.
Where are my downloads and license?
Use your completed order and My Account. Keep the key private. Contact ea@ea-lab.dev with the order number if delivery is missing.
Risk disclosure
Historical and illustrative results are not forecasts. Results will vary depending on broker, spread, commission, symbol and settings. Trading can cause partial or total loss of capital. Stop orders do not guarantee execution at the intended price. You choose settings, risk and whether to trade live.





Reviews
There are no reviews yet.