Development of Momentum-Based Trading Bot for MetaTrader 4 (MT4) on CMC Markets

MQL4 Experts

Job finished

Execution time 2 days

Specification

Project Overview

Develop a custom automated trading bot (Expert Advisor) for MetaTrader 4 (MT4) that executes trades on the S&P 500 index CFDs via CMC Markets. The bot will implement a momentum-based trading strategy that utilizes technical indicators for market entry and exit signals, incorporates dynamic stop-loss orders, adjusts position sizes based on market momentum, and adheres to strict risk management principles.

As part of this project, the developer will also install and configure the trading bot on the client's MT4 platform and ensure it operates correctly on the client's account.


Technical Requirements

  1. Trading Platform: MetaTrader 4 (MT4)

  2. Broker: CMC Markets (ensure compatibility with their MT4 offering)

  3. Trading Instrument: S&P 500 Index CFDs

  4. Programming Language: MQL4 (MetaQuotes Language 4)


Strategy Details

1. Market Momentum Identification

  • Technical Indicators:

    • Moving Averages (MA): Use a combination of short-term and long-term MAs (e.g., 50-period and 200-period EMAs).
    • Relative Strength Index (RSI): 14-period RSI to gauge overbought and oversold conditions.
    • Moving Average Convergence Divergence (MACD): Standard settings (12, 26, 9) for momentum confirmation.
  • Entry Conditions:

    • Long Positions:
      • Price crosses above the 50-period EMA.
      • RSI is above 50 but below 70.
      • MACD histogram crosses above the signal line.
    • Short Positions:
      • Price crosses below the 50-period EMA.
      • RSI is below 50 but above 30.
      • MACD histogram crosses below the signal line.
    • Confirmation: All three indicators must align to confirm a bullish or bearish trend before entering a trade.

2. Stop-Loss Implementation

  • Initial Stop-Loss:

    • Long Positions: Set stop-loss at the nearest significant support level below the entry price.
    • Short Positions: Set stop-loss at the nearest significant resistance level above the entry price.
    • Alternative: If support/resistance levels are not clear, use a fixed stop-loss of 1% of the instrument's price.
  • Trailing Stop-Loss:

    • Implement a trailing stop-loss that adjusts the stop price as the trade moves favorably.
    • Parameters:
      • Trail by X Points: Specify the number of points to trail (e.g., 10 points).
      • Activation: Trailing stop activates once the trade is in profit by a predefined amount (e.g., 5 points).

3. Position Sizing and Scaling

  • Risk Per Trade:

    • Limit risk to 1-2% of total account equity per trade.
    • Calculate position size accordingly.
  • Scaling In (Pyramiding):

    • Conditions for Adding to Position:
      • Trade is in profit by a predefined amount (e.g., 10 points).
      • Indicators continue to confirm the trend.
    • Additional Entries:
      • Add positions at predetermined price intervals (e.g., every 10 points of favorable movement).
      • Each additional position must also adhere to the 1-2% risk rule.
    • Maximum Number of Additions: Limit the number of additional positions to prevent overexposure (e.g., maximum of 3 additions).
  • Scaling Out:

    • Optionally implement scaling out of positions by taking partial profits at certain levels.

4. Exit Strategy

  • Indicator-Based Exit:
    • Close the position when any of the following occurs:
      • Price crosses the opposite side of the 50-period EMA.
      • RSI crosses back below 50 (for longs) or above 50 (for shorts).
      • MACD histogram crosses the signal line in the opposite direction.
  • Profit Target:
    • Optionally set a take-profit level at a predefined percentage gain (e.g., 5% profit).
  • Time-Based Exit:
    • Close any open positions at the end of the trading day to avoid overnight risk (configurable option).

5. Time Frame and Trading Sessions

  • Time Frames:

    • Primary chart time frame: 15-minute chart for intraday trading.
    • Indicators should be calculated based on this time frame.
  • Trading Sessions:

    • Operate during specific market hours (e.g., 9:30 AM to 4:00 PM EST).
    • Option to configure active trading hours.

Risk Management Principles

  • Diversification:

    • The bot should not open multiple positions on highly correlated instruments simultaneously.
  • Maximum Concurrent Trades:

    • Limit the number of open positions at any given time (e.g., no more than 5).
  • Error Handling:

    • Implement safeguards to handle trade execution errors, disconnections, or other technical issues.
    • Include logging of errors and notifications.
  • Capital Protection:

    • If account equity drops by a certain percentage (e.g., 10%), the bot should cease trading and send an alert.

Additional Features

1. User-Defined Parameters

  • Allow customization of key parameters without modifying the code:
    • Moving Average periods and types.
    • RSI period and threshold levels.
    • MACD settings.
    • Stop-loss and take-profit levels.
    • Trailing stop parameters.
    • Risk percentage per trade.
    • Trading hours.
    • Maximum number of positions.

2. Logging and Reporting

  • Trade Logging:
    • Record all trade entries and exits with timestamps, prices, and reasons for actions.
  • Performance Metrics:
    • Provide summary reports on trading performance, including profit/loss, win rate, and drawdowns.
  • Alerts and Notifications:
    • Send alerts for significant events (e.g., new trades, errors, reached profit targets) via email or MT4 notifications.

3. Backtesting and Optimization

  • Ensure the bot is compatible with MT4's Strategy Tester for backtesting.
  • Code should be optimized for efficient performance during backtests.

Technical Specifications

  • Coding Standards:

    • Clean, well-documented code with comments explaining key functions and logic.
    • Modular design to facilitate future updates or modifications.
  • Compliance:

    • Adhere to all of CMC Markets' trading rules and MT4's technical requirements.
    • Ensure the bot complies with regulatory standards applicable to automated trading.
  • Security:

    • Implement measures to protect against unauthorized access or execution of the bot.

Delivery Requirements

  1. Timeline:

    • Estimated project duration: 4 weeks
  2. Deliverables:

    • Compiled Expert Advisor (.ex4 file) ready for installation on MT4.
    • Source code (.mq4 file) with full documentation.
    • User manual detailing installation, configuration, and usage instructions.
    • Backtesting results on historical data demonstrating the bot's performance.
  3. Testing:

    • Perform thorough testing to ensure the bot operates as intended.
    • Fix any bugs or issues identified during the testing phase.
  4. Support:

    • Provide a period of post-delivery support for troubleshooting and minor adjustments (30 days)

Acceptance Criteria

  • The bot must execute trades accurately based on the specified strategy.
  • All user-defined parameters must be adjustable through the bot's settings interface.
  • The bot should run smoothly on the MT4 platform without causing crashes or significant performance issues.
  • Comprehensive documentation and user guides are provided.
  • Successful backtesting results align with the strategy's expected performance.

Confidentiality and Ownership

  • All code and materials developed are the exclusive property of the client upon full payment.
  • The developer agrees to keep all project details confidential.






Responded

1
Developer 1
Rating
(258)
Projects
269
29%
Arbitration
2
50% / 0%
Overdue
3
1%
Working
Published: 2 codes
2
Developer 2
Rating
(8)
Projects
8
0%
Arbitration
2
50% / 0%
Overdue
1
13%
Working
3
Developer 3
Rating
(161)
Projects
209
61%
Arbitration
10
80% / 0%
Overdue
0
Free
Published: 1 code
4
Developer 4
Rating
(636)
Projects
1008
47%
Arbitration
33
36% / 36%
Overdue
99
10%
Working
Published: 6 codes
5
Developer 5
Rating
(22)
Projects
21
10%
Arbitration
4
25% / 75%
Overdue
0
Free
6
Developer 6
Rating
(235)
Projects
246
78%
Arbitration
0
Overdue
0
Free
7
Developer 7
Rating
(5)
Projects
8
13%
Arbitration
3
0% / 33%
Overdue
2
25%
Free
Published: 1 code
8
Developer 8
Rating
(16)
Projects
35
23%
Arbitration
4
0% / 50%
Overdue
2
6%
Working
9
Developer 9
Rating
(462)
Projects
489
70%
Arbitration
6
67% / 0%
Overdue
2
0%
Working
10
Developer 10
Rating
(472)
Projects
491
75%
Arbitration
6
67% / 17%
Overdue
0
Working
11
Developer 11
Rating
(329)
Projects
515
19%
Arbitration
35
46% / 31%
Overdue
34
7%
Working
12
Developer 12
Rating
(20)
Projects
51
75%
Arbitration
0
Overdue
8
16%
Free
13
Developer 13
Rating
(52)
Projects
67
43%
Arbitration
8
0% / 100%
Overdue
3
4%
Free
Similar orders
Hello I need an EA for MT4 The EA uses only indicator, which shows a buy arrow for buy signal , and a sell arrow for sell signal. Conditions to open a trade: Open BUY trade, when we have a buy arrow show up, CANDLE CLOSES , AND THE ARROW IS STILL THERE .Then open BUY TRADE Open SELL trade, when we have a sell arrow show up, CANDLE CLOSES , AND THE ARROW IS THIS THERE .Then open BUY TRADE Open Close on opposite
​ Indicators: Fast MA (Period 10, Exponential) and Slow MA (Period 50, Exponential). ​ Buy Signal: When Fast MA crosses above Slow MA. ​ Sell Signal: When Fast MA crosses below Slow MA. ​ Risk Management & Parameters: ​Customizable Lot Size (Default: 0.01). ​Stop Loss (SL) and Take Profit (TP) in pips. ​Trailing Stop options. ​Max Spread filter. ​ Platform: MetaTrader 5 (MQL5)
​ Indicators: Fast MA (Period 10, Exponential) and Slow MA (Period 50, Exponential). ​ Buy Signal: When Fast MA crosses above Slow MA. ​ Sell Signal: When Fast MA crosses below Slow MA. ​ Risk Management & Parameters: ​Customizable Lot Size (Default: 0.01). ​Stop Loss (SL) and Take Profit (TP) in pips. ​Trailing Stop options. ​Max Spread filter. ​ Platform: MetaTrader 5 (MQL5)
A robot 30+ USD
Je souhaite trouver un développeur pour réaliser ce travail et effectuer les paiements via cette application. Je m'engage à ne communiquer avec les candidats que par cette application, y compris par messageries tierces, correspondance personnelle ou courriel. Je comprends que toute personne ne respectant pas ces conditions sera interdite de publier des commandes sur la plateforme Freelance
I am looking for an experienced MQL5/MT5 developer to develop a custom Expert Advisor based on a complete technical architecture already prepared by the client. This is not a request to design a trading strategy from scratch . The strategy architecture, entry/exit concepts, filters, risk-management requirements and testing requirements are already documented. The main responsibility will be MQL5 development
EAs 100+ USD
To apply, you must already have your EA running on an active MT5 trading account connected to the market. The account must have genuine trading history that can be independently reviewed and verified. EA Requirements 1. Prop-Firm Compatible Risk Management - The EA must include daily and overall drawdown protection. - Required inputs: "MaxDailyLoss = 5%" "MaxTotalDrawdown = 10%" - Once either limit is
Strategy 40 - 60 USD
yo i have a strategy i would really like to turn into a signal bot basically please this is very technical and serious to me the strategy needs more time 1 time frame and the bot most be 100% accurate
Ready to use bot 100+ USD
seller must provide the following to be considered... i will answer to all who fit this description, and can purchase more than 1 EA... - brief strategy description - overall EA expectancy - 1 week limited trial version, with whatever settings you consider best (can be blocked on demo, i don't really care) - investor password from a reputable broker (if history is available... live / demo, same thing, doesn't really
I want you to develop a professional HFT trading robot for MT5/MQL5 , initially focused on XAUUSD . The robot should be designed for high-speed tick-level trading , analyzing real-time bid/ask movement, spread, tick velocity, momentum, volatility, price acceleration and short-term market microstructure to identify very short-term opportunities. The core strategy should be capable of opening 5–10+ positions in a
can you help me use a Tickblaze Algo NRBO on the NT platform? I have it somewhat set up, but I have other questions about running it & knowing how to operate it in NT. Thank you if anyone have experience in this kindly bib and let do it asap

Project information

Budget
500+ USD
Deadline
to 28 day(s)