Exp_BvsB
This EA uses the BvsB (Bears vs Bulls) custom indicator to generate trading signals based on crossover logic between the indicator line and its signal line. It opens buy positions when the indicator crosses below the signal line from above, and sell positions when it crosses above from below, with configurable position sizing, stop loss, and take profit. The EA supports multiple smoothing methods and applied price types through the SmoothAlgorithms library.
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 crossover signal trading based on the BvsB indicator, which falls under the momentum/reversal category. Entry conditions: a buy signal is triggered when the indicator line (Ind) was above the signal line (Sign) on the previous bar and crosses to below-or-equal on the current bar; conversely, a sell signal triggers when Ind was below Sign and crosses above-or-equal. Exit conditions rely on fixed StopLoss and TakeProfit in points, while also supporting signal-based position closing (BUY_Close/SELL_Close when the opposite signal appears). Position sizing is controlled via the MM parameter and MMMode enumeration, supporting five modes: free margin-based, balance-based, loss-adjusted free margin, loss-adjusted balance, or fixed lot size. Money management is delegated to the TradeAlgorithms.mqh library functions BuyPositionOpen and SellPositionOpen. The EA uses an IsNewBar mechanism to ensure signals are calculated only once per bar, preventing duplicate trades, and includes a Deviation parameter to control slippage tolerance.
Strengths
- Supports 10 smoothing algorithms, providing strong flexibility to adapt to different market conditions
- Uses IsNewBar mechanism to prevent duplicate trades within the same bar, avoiding overtrading
- Buy and sell open/close operations can be independently toggled, offering flexible strategy configuration
- Supports 5 position sizing modes to accommodate different risk preferences in money management
- Recount mechanism ensures retry on indicator data fetch failure, improving robustness
Weaknesses
- Fixed StopLoss and TakeProfit in points do not account for market volatility (ATR), leading to inconsistent risk across varying volatility environments
- Lacks position checking before opening new trades, potentially leading to duplicate positions in the same direction
- No spread filter mechanism, may open positions during wide spreads, increasing trading costs
- Depends on custom BvsB indicator and external libraries, increasing deployment and debugging complexity
- SignalBar=1 as default uses completed bar signals, but the condition also allows SignalBar=0 for real-time signals which may be unstable
Possible improvements
- Add ATR-based dynamic StopLoss/TakeProfit to automatically adjust distance based on market volatility
- Add position checking logic to avoid duplicate same-direction trades and implement maximum position limits
- Add spread filter and trading session filter to avoid trading during wide spreads and inactive periods
Risk assessment
Overall risk: Medium
- Lacks position checking, potentially opening duplicate same-direction positions leading to overexposure
- Fixed SL/TP does not adapt to market volatility — too wide in low volatility wasting profit, too narrow in high volatility getting stopped out easily
- No spread filter means trading costs are uncontrolled in wide spread environments
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management parameter controlling lot size or ratio |
MMMode | LOT | Position sizing mode: free margin/balance/free margin minus floating P&L/balance minus floating P&L/fixed lot |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow opening buy positions |
SellPosOpen | true | Allow opening sell positions |
BuyPosClose | true | Allow closing buy positions |
SellPosClose | true | Allow closing sell positions |
InpInd_Timeframe | PERIOD_H4 | Indicator calculation timeframe |
BvsB_Method | MODE_SMA | BvsB smoothing method (SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA) |
XLength | 12 | BvsB indicator calculation period length |
XPhase | 15 | Smoothing phase parameter |
IPC | PRICE_CLOSE | Price type used for indicator calculation |
SignalBar | 1 | Bar index for signal detection |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.