Exp_MAOscillatorHist
This EA trades based on the MAOscillatorHist custom indicator, which is a moving average oscillator histogram. It opens buy positions when the histogram turns upward from negative territory and sell positions when it turns downward from positive territory, with configurable position closing on opposite signals.
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 strategy concept is based on directional changes in a dual moving average oscillator histogram to capture momentum shifts. Entry conditions: buy when the histogram rises (Ind[2]>Ind[1]) and the prior value is negative (Ind[1]<Ind[0]); sell when the histogram falls (Ind[2]<Ind[1]) and the prior value is positive (Ind[1]>Ind[0]). Exit conditions: close positions on opposite signals — close longs when the histogram declines and close shorts when the histogram rises, with fixed stop-loss and take-profit levels. Position sizing supports multiple margin modes including free margin-based, balance-based, loss-adjusted margin/balance, or fixed lot size. The oscillator uses two configurable smoothing methods (supporting SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA) and multiple applied price types, offering high flexibility. The strategy calculates signals only on new bar formation to avoid repeated trading within the same bar, with signal delay controlled by the SignalBar parameter.
Strengths
- Supports 10 smoothing algorithms and 9 applied price types, offering extremely high strategy flexibility
- New bar detection mechanism prevents repeated position opening within the same bar, reducing overtrading
- Multi-mode money management (fixed lot, balance ratio, etc.) adapts to different risk preferences
- Buy/sell open and close can be independently toggled, convenient for unidirectional trading or signal-only mode
- Fixed stop-loss and take-profit settings ensure controllable risk per trade
Weaknesses
- Depends on custom indicator file MAOscillatorHist; EA cannot run without it
- No spread filter mechanism; high spread environments may cause excessive slippage or false signals
- Stop-loss 1000 points / take-profit 2000 points are excessively large for some instruments and lack dynamic adjustment
- No check for existing positions in the same direction, potentially causing duplicate position opening
- Indicator handle creation failure only prints a log message without detailed error diagnostics
Possible improvements
- Add spread filter and maximum position check to avoid high-spread entries and duplicate positions
- Implement dynamic stop-loss/take-profit (e.g., ATR multiples) instead of fixed points to adapt to different instrument volatilities
- Add indicator data validity checks to ensure CopyBuffer return values are properly handled for all edge cases
Risk assessment
Overall risk: Medium
- No check for existing same-direction positions; duplicate openings may cause excessive risk exposure
- Fixed stop-loss/take-profit points don't suit all instruments — too wide for low-volatility, too narrow for high-volatility pairs
- No spread filter; orders may fill at unfavorable prices during low liquidity or news events
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Margin usage ratio for lot size calculation |
MMMode | LOT | Position sizing mode (free margin/balance/net loss/fixed lots) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage in points |
BuyPosOpen | true | Allow buy positions |
SellPosOpen | true | Allow sell positions |
BuyPosClose | true | Allow close buy positions |
SellPosClose | true | Allow close sell positions |
InpInd_Timeframe | PERIOD_H4 | Indicator calculation timeframe |
MA_Method1 | MODE_SMA_ | fastMAsmoothing method |
Length1 | 13 | Fast MA period |
Phase1 | 15 | Fast MA phase parameter |
MA_Method2 | MODE_SMA_ | slowMAsmoothing method |
Length2 | 24 | Slow MA period |
Phase2 | 15 | Slow MA phase parameter |
IPC | PRICE_CLOSE | Price type applied to calculation |
iPeriod | 0 | Oscillator extra period parameter |
SignalBar | 1 | Bar index for signal (0=current bar) |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.