Happy Trading EA
- エキスパート
- バージョン: 1.0
- アクティベーション: 6
A trend-following Expert Advisor for MetaTrader 5, combining EMA crossover signals with a trend filter, candle confirmation and adjustable risk controls.
OVERVIEW
Happy Trading is a trend-following Expert Advisor for MetaTrader 5. It looks for momentum shifts using a moving average crossover, then confirms the direction with a longer term trend filter and a candle-based confirmation step before opening a position. The EA is designed to run unattended, with built-in equity protection, breakeven management and a configurable trading schedule.
KEY FEATURES
- Momentum entry logic based on a fast/slow moving average crossover;
- Longer-term trend filter to avoid trading against the dominant direction;
- Internal candle-confirmation step (tuned by the developer, not user adjustable) to reduce reaction to noisy signals;
- Automatic pip-size detection: works correctly on both 2-decimal and 3-decimal quoting brokers without manual adjustment;
- Configurable stop loss, risk/reward ratio and maximum number of trades;
- Equity protection: automatically closes all positions once a floating profit or loss threshold is reached, scaled to your lot size (optional pause period before trading resumes);
- Breakeven management with adjustable trigger distance and buffer;
- Trading hours filter to restrict activity to chosen hours of the day;
- Opposite-direction positions are closed automatically before a new signal is taken, to avoid conflicting exposure;
- Broker-safe order placement: automatically respects each broker's minimum stop distance before sending an order.
HOW IT WORKS
1. The EA monitors a moving average crossover on a fixed internal timeframe.
2. When a crossover occurs, it checks that the crossover is confirmed by a longer-term trend filter, so trades are only taken in the direction of the broader trend.
3. An internal candle-confirmation step filters out weak or noisy signals.
4. Once confirmed, the EA opens a position with a stop loss, take profit (based on the configured risk/reward ratio) and applies breakeven management as the trade moves into profit.
5. Total floating profit/loss across all open positions is monitored continuously; if it reaches the configured threshold, all positions are closed automatically.
TRADING STYLE AND EXPECTATIONS
This EA follows a low win-rate, high reward-per-trade approach: most individual trades end at a loss, and profitability comes from the winning trades being significantly larger than the losing ones over a large number of trades. As a result:
- Long losing streaks are a normal part of this strategy's behavior, not a sign of malfunction. Review the backtest results below for the actual range observed.
- Equity can swing noticeably between trades; the strategy is designed for traders comfortable with this pattern, not for a smooth trade-by-trade equity curve.
- Results depend on letting the strategy run over a sufficient number of trades. Judging it after only a handful of trades is not representative.
BACKTEST RESULTS
Tested on XAUUSD, M3 timeframe, every tick based on real ticks (100% history quality), starting deposit 10,000 USD, fixed lot 0.01:
- Total net profit: 23,717.87 USD
- Profit factor: 1.26
- Total trades: 11,924 (win rate 28.3%)
- Average winning trade: 34.52 USD / Average losing trade: -10.79 USD
- Maximum balance drawdown: 13.23% / Maximum equity drawdown: 14.70%
- Maximum consecutive losing trades: 128
- Recovery factor: 7.07 / Sharpe ratio: 2.78
See the attached Strategy Tester report and equity curve screenshots for full detail. Past results do not guarantee future performance; always validate on your own broker's historical data and on a demo account before going live.
RECOMMENDED SETTINGS
- Symbol: XAUUSD (Gold) — the settings above were tuned and tested on this symbol; results on other symbols will differ and should be re-tested;
- Timeframe: the EA trades on a fixed M3 timeframe internally regardless of the chart timeframe you attach it to;
- Account type: works on hedging accounts;
- Recommended: a broker with tight spreads and reliable execution during your chosen trading hours;
- Test on a demo account first and review the Strategy Tester report before moving to a live account;
INPUT PARAMETERS
Equity Management
- Lot Size: fixed trade volume for every order;
- SL Distance (pips): stop-loss distance used when placing new orders;
- Risk/Reward Ratio: take-profit distance as a multiple of the stop-loss distance.
Order Quantity
- Max Trades Per Loop: maximum number of trades opened per crossover cycle;
- Max Total Trades: maximum number of open trades at any time.
Equity Protection (USD, scaled per 0.01 lot)
- Max Loss (per 0.01 lot): floating loss threshold that triggers closing all positions;
- Max Profit (per 0.01 lot): floating profit threshold that triggers closing all positions;
- Pause Hours After Limit: optional pause period before new trades are allowed again after the threshold is hit.
Trend Filter
- Trend EMA Period: period of the long-term trend filter.
Time Filter
- Use Time Filter: enable/disable restricted trading hours;
- Allowed Hours: comma-separated list of server hours during which the EA is allowed to open new trades.
Breakeven
- Enable Breakeven: enable/disable automatic breakeven;
- Breakeven Trigger Distance: profit distance (pips) required before breakeven is applied;
- Breakeven Buffer: buffer distance (pips) added beyond entry price.
Execution
- Slippage (points): maximum allowed price deviation on order execution;
- Magic Number: identifier used to separate this EA's trades from other EAs or manual trades on the same account.
IMPORTANT NOTES
- This strategy has a low win rate and can experience long losing streaks (up to 128 consecutive losing trades were observed in backtesting) before a large winning trade restores profitability. Make sure you understand and are comfortable with this behavior before using real funds. Past performance shown in the Strategy Tester does not guarantee future results. Trading CFDs and leveraged instruments carries a risk of loss.
- Always test on a demo account and understand the input parameters before running this EA on a live account. The developer does not guarantee any specific profit or outcome.
ABOUT THE AUTHOR
Mr. Thomas
