Exp_CenterOfGravityOSMA
This EA trades based on the Center of Gravity OSMA indicator, which is an oscillator-derived signal combining center of gravity calculations with double-smoothed moving averages. It opens buy positions when the OSMA histogram turns upward from a declining state and sell positions when it turns downward from a rising state, with configurable stop loss and take profit levels.
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 momentum reversal signals from the CenterOfGravityOSMA indicator, which generates oscillator values through center of gravity price calculations processed with two rounds of smoothing to produce a MACD-like histogram. Entry conditions: a buy signal is generated when macd[1]<macd[2] (prior decline) and macd[0]>macd[1] (current recovery), indicating an upward momentum shift; a sell signal is generated when macd[1]>macd[2] (prior advance) and macd[0]<macd[1] (current decline), indicating a downward momentum shift. Exit conditions are controlled by BuyPosClose and SellPosClose boolean parameters that determine whether opposite signals close existing positions, combined with fixed StopLoss and TakeProfit levels for risk management. Position sizing is managed through the MM parameter controlling lot size ratio, with MMMode selecting between fixed lot size or margin-based percentage calculation. Money management relies on the TradeAlgorithms.mqh library providing standardized order placement functions with slippage control (Deviation parameter) and signal timestamps to prevent duplicate orders. The strategy is fundamentally a momentum reversal system capturing short-term oscillator turning points.
Strengths
- Clear strategy logic based on oscillator turning point momentum reversal trading with definite directional signals
- Supports independent buy/sell open and close controls, offering high flexibility to enable or disable based on market conditions
- Uses NewBar check to prevent repeated trading within the same bar, reducing overtrading and signal noise
- Includes fixed stop loss and take profit settings, providing a basic risk control framework
Weaknesses
- Stop loss and take profit use fixed points rather than ATR-based dynamic calculation, poor adaptability across different volatility environments
- Lacks position addition and trailing stop mechanisms, profitable trades may lose gains due to pullbacks
- Many indicator parameters without self-adaptive mechanism, prone to failure when market regime changes
- Does not account for spread and commission impacts on trading costs, which may erode profits in shorter timeframes
- Double smoothing may cause significant signal lag, missing optimal entry timing
Possible improvements
- Replace fixed stop loss/take profit with ATR-based dynamic calculation to adapt to different market volatility environments
- Add trailing stop functionality to protect profitable positions and allow profits to run further
- Add spread filter and trading session filter to avoid opening positions during high-spread and unfavorable periods
- Consider adding self-adaptive optimization for indicator parameters, dynamically adjusting smoothing periods based on recent market conditions
Risk assessment
Overall risk: Medium
- Fixed SL 1000/TP 2000 points are large values that may exceed reasonable ranges on some instruments, resulting in practically no protection
- Oscillator reversal signals can produce frequent false signals during trending markets, leading to consecutive losses
- Lacks maximum drawdown control and daily loss limit, potentially suffering significant losses in extreme market conditions
- Depends on custom indicator CenterOfGravityOSMA; if the indicator file is missing, EA initialization fails
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio controlling lot size |
MMMode | LOT | 5 modes |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage in points |
BuyPosOpen | true | Allow buy position opening |
SellPosOpen | true | Allow sell position opening |
BuyPosClose | true | Close long positions on sell signal |
SellPosClose | true | Close short positions on buy signal |
InpInd_Timeframe | PERIOD_H4 | All timeframes |
SignalBar | 1 | Bar index for trade signal |
Period_ | 10 | Center of gravity oscillator period |
SmoothPeriod1 | 3 | First smoothing MA period |
MA_Method_1 | MODE_SMA | First smoothing MA method |
SmoothPeriod2 | 3 | Second smoothing MA period |
MA_Method_2 | MODE_SMA | Second smoothing MA method |
AppliedPrice | PRICE_CLOSE_ | Price type for indicator calculation |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.