This is an MQL5 trading bot designed for automated trading strategies in MetaTrader 5. The bot is built to identify market conditions and execute trades based on a combination of technical analysis and a risk-reward strategy. It specifically targets EUR/USD and GBP/USD pairs on the 1-minute timeframe.
- Significant Bearish Zones: The bot identifies significant bearish zones that occur after a bullish push.
- Support & Resistance: The bot detects support and resistance zones based on price action and failure to break key levels.
- Fair Value Gap (FVG): Looks for fair value gaps where no wicks or candles have filled the gap, aligning with nearby resistance zones.
- MACD Confirmation: The bot uses the MACD (12, 26, 9) to confirm momentum before executing trades.
- Risk-Reward Strategy: The bot aims for a 1:3 risk-reward ratio and automatically moves the stop loss to breakeven once a 1:1 risk-reward is reached.
- Trade Size Calculation: Risk management ensures a constant risk of $50 per trade.
- MetaTrader 5 with an active trading account.
- MQL5 Expert Advisor (
EA
) file compiled and ready for use. - MACD Indicator: The bot uses the standard MACD with settings (12, 26, 9).
-
Download the
EA-Trader.mq5
file and place it into theMQL5/Experts
directory of your MetaTrader 5 installation folder.- For example,
C:/Program Files/MetaTrader 5/MQL5/Experts/EA-Trader.mq5
.
- For example,
-
Open MetaTrader 5.
-
In the Navigator window, locate the EA-Trader under the Expert Advisors section.
-
Drag and drop the EA onto the chart you want to trade.
-
Make sure AutoTrading is enabled in MetaTrader 5 for the bot to start functioning.
Once installed, you can configure the bot by attaching it to any chart. The bot will automatically start scanning for the following conditions:
- Bullish push followed by a bearish zone.
- Support zone detection.
- Resistance zone failure.
- Confirmation from the MACD indicator for buy/sell momentum.
The bot will place sell limit orders at supply zones, aiming for a 1:3 risk-reward ratio. Once the trade reaches a 1:1 risk-reward, the stop loss will automatically be moved to break even.
- The bot will calculate trade sizes based on a fixed risk amount of $50 per trade.
- Stop loss and take profit are dynamically adjusted based on the price levels identified by the strategy.
You can customize various parameters in the bot to fit your trading preferences:
- Risk Amount: Modify the amount of risk per trade.
- MACD Settings: Adjust the MACD periods to fit your strategy.
- Timeframe: The bot is designed to work on the 1-minute timeframe, but you can modify it for other timeframes.
- Pairs: It currently targets EUR/USD and GBP/USD but can be adjusted to other pairs.
To test the bot on historical data:
- Open MetaTrader 5 and go to the Strategy Tester.
- Select EA-Trader as the Expert Advisor.
- Choose the trading pair and timeframe (1-minute).
- Click on Start to run the backtest and analyze the results.
Feel free to fork this repository and submit improvements or bug fixes. Open issues if you encounter problems or have suggestions for enhancement.
This project is licensed under the MIT License.
Author