Exp_Volume_Weighted_MA
This EA trades based on the Volume Weighted Moving Average indicator, generating buy signals when the VWMA turns upward and sell signals when it turns downward. It compares three consecutive VWMA values to detect trend direction changes and uses configurable money management modes for position sizing. Entries and exits are controlled separately with boolean toggles, and StopLoss/TakeProfit levels are applied to all positions.
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 trend following based on the Volume Weighted Moving Average (VWMA), which uses volume weighting to confirm the authenticity of price trends. Entry conditions: a buy signal is generated when Value[1]<Value[2] (VWMA turns from declining to rising) and Value[0]>Value[1] (current value continues rising); a sell signal is generated when Value[1]>Value[2] (VWMA turns from rising to declining) and Value[0]<Value[1]. Exit conditions: positions are closed on trend reversal — long positions close when VWMA declines, short positions close when VWMA rises, with fixed StopLoss (1000 points) and TakeProfit (2000 points) applied. Position sizing supports multiple modes including percentage of free margin, percentage of balance, percentage of margin/balance minus floating loss, and fixed lot size. Money management is controlled by the MM parameter (default 0.1 risk ratio) combined with the MMMode selector for the specific calculation method. The strategy employs a new bar detection mechanism (IsNewBar) to prevent repeated entries within the same bar, while also supporting per-tick signal calculation when SignalBar is set to 0.
Strengths
- Uses volume-weighted moving average which better reflects true market trend strength compared to simple moving averages
- Entry and exit logic is independently controllable, offering high flexibility to enable only opening or only closing
- Implements new bar detection mechanism to prevent repeated entries within the same bar, reducing overtrading risk
- Supports multiple money management modes, accommodating traders with different risk preferences
Weaknesses
- Fixed StopLoss of 1000 points and TakeProfit of 2000 points are not dynamically adjusted based on market volatility (ATR), making them unsuitable for varying market conditions
- Lacks checking for existing positions, which may lead to duplicate entries in the same direction causing position stacking
- Does not account for spread and commission costs, which could impact profitability on high-spread instruments
- Signal logic relies solely on simple comparison of three VWMA values, lacking filters such as trend strength confirmation or range market identification
Possible improvements
- Introduce ATR-based dynamic StopLoss/TakeProfit to automatically adjust distance based on market volatility, improving strategy adaptability
- Add position checking logic to avoid duplicate entries in the same direction, with a maximum position count limit
- Add a trend filter indicator (such as ADX or higher timeframe MA direction) to reduce false signals in ranging markets
Risk assessment
Overall risk: Medium
- Lacks position checking, which may lead to excessive risk exposure from duplicate entries in the same direction
- Fixed StopLoss/TakeProfit does not adapt to different volatility environments — too wide in low volatility, too tight in high volatility
- VWMA generates frequent false signals in ranging markets, leading to consecutive losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio or lot value |
MMMode | LOT | Lot mode: free margin/balance/post-loss free margin/post-loss balance/fixed lot |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Slippage deviation allowance |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H4 | Timeframe for iDeMarkerSign indicator |
Length | 12 | Volume-weighted MA period length |
IPC | PRICE_CLOSE_ | Price type applied to indicator calculation |
VolumeType | VOLUME_TICK | Volume type: tick volume or real volume |
Shift | 0 | Indicator offset relative to current bar |
PriceShift | 0 | Vertical price shift in points |
SignalBar | 1 | Bar index for signal reading (0=current, 1=last completed) |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.