EA_MALR_v_1-01
This EA trades channel breakouts using a custom MALR (Moving Average Linear Regression) indicator. It enters buy when price breaks above the upper channel and sell when price breaks below the lower channel. It supports position overturn (reversal), averaging down, lot increase based on equity, and trailing stop functionality.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
Why this EA never traded: no entry rule survived the conversion.
Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.
Blow-up risk: No blow-up pattern found
None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.
High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →
Strategy analysis
The core strategy of this EA is based on channel breakouts from the custom MALR indicator. Entry conditions: a buy signal is triggered when the close price transitions from below the upper channel on the previous bar to above it on the current bar; a sell signal is the reverse with the lower channel. Exit conditions include fixed stop-loss/take-profit, trailing stop, and position closure during overturn. Position sizing supports three modes: main entry (mode=1) with standard or equity-scaled lots, averaging (mode=2) which adds same-size positions when floating loss reaches a threshold, and overturn (mode=3) which closes the current position and opens a reverse position with multiplied lot size (lot × koff_multiplication). Money management scales the base lot by AccountEquity/Max_drawdown when use_increase is enabled, creating a proportional relationship between equity and position size. The trailing stop activates after a profit threshold is reached and then follows price by the trail distance. The overturn mechanism combined with lot multiplication introduces Martingale-like risk, as repeated reversals can exponentially increase position size.
Strengths
- Multiple position management modes (main, averaging, overturn) provide high strategic flexibility
- Equity-based dynamic lot sizing helps amplify gains during winning streaks and reduce exposure during drawdowns
- Trailing stop functionality protects realized profits and reduces drawdown risk
- New bar detection mechanism prevents duplicate entries within the same bar
Weaknesses
- Overturn mode doubles lot size on each reversal, leading to dangerous Martingale-like exponential position growth
- Only supports single-symbol single-position trading via Symbol(), incapable of multi-instrument operation
- Averaging function continuously adds positions in trending markets, potentially causing severe floating losses
- Uses PositionSelect(Symbol()) instead of iterating all positions, which may select wrong position on hedging accounts
- SL/TP modification retry uses Sleep(1000) which blocks execution and may miss trading opportunities
Possible improvements
- Remove or cap the lot multiplication in overturn mode, set maximum reversal count or maximum lot ceiling
- Add spread filter and volatility filter to avoid opening positions during extreme market conditions
- Replace PositionSelect(Symbol()) with PositionGetTicket iteration for hedging account compatibility
- Replace Sleep-blocking SL/TP modification with event-driven approach
Risk assessment
Overall risk: High risk
- Overturn mode doubles lot size each reversal, creating Martingale-like exponential growth that can blow the account
- Averaging function adds unlimited positions in trending markets with no maximum averaging count
- Stop-loss of 2550 points is excessively large (about 255 pips), causing potentially huge single-trade losses
- Relies solely on PositionSelect(Symbol()), which may operate on wrong position in hedging account mode
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Lot | 0.1 | Base lot size |
sl | 2550 | Stop loss in points |
tp | 2578 | Take profit in points |
Slippage | 65 | Allowed slippage |
magic | 20121017 | Order magic number |
N_modify_sltp | 7 | SL/TP modification retry count |
use_Averaging | false | Enable position averaging |
loss_forAveraging | 500 | Floating loss in points to trigger averaging |
Position_overturn | true | Enable position reversal |
koff_multiplication | 2.0 | Lot multiplier on reversal |
use_increase | true | Enable equity-based position increase |
Max_drawdown | 5000 | Max drawdown amount for dynamic lot calculation |
Trail_StopLoss | false | Enable trailing stop |
trail | 200 | Trailing stop distance in points |
Activate_by_profit | true | Require profit threshold to activate trailing stop |
profit | 50 | Profit in points to activate trailing stop |
MAPeriod | 120 | MA period of the MALR indicator |
MAShift | 0 | MA shift of the MALR indicator |
AppliedPrice | PRICE_CLOSE | Applied price type for the MALR indicator |
ChannelReversal | 1.1 | Channel reversal coefficient |
ChannelBreakout | 1.1 | Channel breakout coefficient |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.