Exp_CenterOfGravity
This EA trades based on the Center of Gravity indicator, which is an oscillator-type indicator that identifies overbought and oversold conditions. It opens buy positions when the signal line crosses upward and sell positions when it crosses downward, with configurable stop loss and take profit levels. The EA uses a custom CenterOfGravity indicator handle and processes signals on a specified timeframe with new bar detection.
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 the Center of Gravity indicator, a mean reversion oscillator that identifies overbought and oversold market conditions by calculating the center of gravity of price. Entry conditions: a buy signal is generated when buffer 1 value transitions from 2 to 1 (signal line crossing upward), and a sell signal is generated when the value transitions from 1 to 2 (signal line crossing downward). Exit conditions rely on reverse signal triggers for position closure plus configurable stop loss and take profit levels in points. Position sizing uses either fixed lot size or deposit-percentage-based money management controlled by the MM parameter, where negative values represent fixed lots and positive values represent deposit share. The EA employs the IsNewBar mechanism to ensure signals are calculated only once per bar, preventing duplicate entries. It also provides buy/sell permission switches and close position toggles for flexible control over trading direction and exit behavior.
Strengths
- New bar detection mechanism prevents duplicate entries on the same bar, reducing overtrading risk
- Configurable stop loss and take profit with a default 1:2 risk-reward ratio
- Buy/sell/close permission switches provide flexible trade control
- Signal line smoothing reduces false signal generation
- Supports multiple price types and MA methods for strategy adaptability
Weaknesses
- No spread filter, which may lead to unfavorable fills in high-spread environments
- No position check logic, potentially opening duplicate positions in the same direction
- Depends on a custom CenterOfGravity indicator; EA fails completely if the indicator is unavailable
- Stop loss and take profit are fixed in points without ATR-based dynamic adjustment
- Lacks maximum drawdown control and maximum position count limits
Possible improvements
- Add spread filter and maximum position count check to improve trading safety
- Introduce ATR-based dynamic stop loss and take profit for volatility-adaptive risk management
Risk assessment
Overall risk: Medium
- No spread filter may cause unfavorable fills in high-slippage environments
- No duplicate position check may lead to excessive risk exposure from same-direction entries
- Strong dependency on custom indicator; EA produces no signals if indicator is missing
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | -0.1 | Money management ratio controlling risk per trade |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum price slippage in points |
BuyPosOpen | true | Allow buy position opening |
SellPosOpen | true | Allow sell position opening |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H4 | Indicator timeframe |
Period_ | 10 | Indicator MA period |
SmoothPeriod | 3 | Signal line smoothing period |
MA_Method_ | MODE_SMA | Signal line MA method |
AppliedPrice | PRICE_CLOSE_ | Price type for indicator calculation |
SignalBar | 1 | Bar index for entry signal |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.