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

MQL4 Эксперты

Техническое задание

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.


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.






Откликнулись

1
Разработчик 1
Оценка
(204)
Проекты
208
28%
Арбитраж
0
Просрочено
3
1%
Свободен
2
Разработчик 2
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Работает
3
Разработчик 3
Оценка
(97)
Проекты
119
39%
Арбитраж
9
89% / 0%
Просрочено
0
Работает
4
Разработчик 4
Оценка
(597)
Проекты
930
46%
Арбитраж
31
39% / 29%
Просрочено
93
10%
Свободен
5
Разработчик 5
Оценка
(21)
Проекты
20
10%
Арбитраж
2
50% / 50%
Просрочено
0
Свободен
6
Разработчик 6
Оценка
(91)
Проекты
102
57%
Арбитраж
0
Просрочено
0
Свободен
7
Разработчик 7
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
8
Разработчик 8
Оценка
(10)
Проекты
25
28%
Арбитраж
3
0% / 0%
Просрочено
1
4%
Загружен
9
Разработчик 9
Оценка
(379)
Проекты
407
70%
Арбитраж
3
100% / 0%
Просрочено
2
0%
Загружен
10
Разработчик 10
Оценка
(348)
Проекты
368
71%
Арбитраж
4
100% / 0%
Просрочено
0
Загружен
11
Разработчик 11
Оценка
(206)
Проекты
335
16%
Арбитраж
23
39% / 30%
Просрочено
17
5%
Занят
12
Разработчик 12
Оценка
(17)
Проекты
37
68%
Арбитраж
0
Просрочено
6
16%
Работает
Похожие заказы
Lotsize Manipulator: Write a simple program that will calculate how many times 25$ unit of fund will open a trade with the lotsize of 0.01 in the balance of 100$. Eg, the 25$unit of fund will open trade 4 times with the 100$ user balance using the lotsize of 0.04. Consider these pre-requisite statements in your coding: 1. Lotsize Conversion behaviour. 1A. If balance is 26$ Lotsize Conversion is to be 0.01 because
I would like for someone to create an expert advisor around the Ichimoku Kinko Hyo Indicator. Something on the lines of the 61294 from the MQL5 market place but with less inputs. Please let me know your time zone when replying ... I am GMT
Halo Coders These ACS&Csdash indicators work in the same way but provide signals of different currency pairs. And Either of these two ACS indicators should be selected any one and set to trade. It provides signals of multiple currency pairs in the interface So the EA should work like that to trade multiple currency pairs on one chart. CsDash should analyze whether it is a strong signal to show on the dash board and
Hello, I’m looking for an experienced coder to help with algorithm development. Specifically, I need assistance with converting a MetaTrader Expert Advisor (EA) into TradeLocker. Additionally, I would like to have a new EA built in TradeLocker that mirrors the logic of the original MetaTrader EA, including the specific rules and conditions I need. Please contact me only if you have prior experience converting scripts
Hello, I need a seasoned PineScript and MQL coder to help with an algorithm development by converting an indicator on TradingView to MeTaTrader 5 then build an EA with the same logic of the indicator and in addition to the ideas I want in the expert advisor(Rules & Conditions) of exactly the features needed for implementation to have the expert advisor designing as my expected products, ONLY REACH OUT IF YOU HAVE
Hello Developers, I'm looking for someone who has had past success and is familiar with the above concepts—something similar to the popular LuxAlgo SMC indicator on Tradingview. The objective is to develop the indicator to create an expert adviser that incorporates the above. Dedication to help achieve this project is what I'm looking for. If you're someone who will go above and beyond for the client and is willing
The BOT will send information about the trading account to Google Sheets - Information to send: Date, Currency Symbols, Spreads, Leverage, Swap in Points, Swap in Dollar Arrange them by Day and Month and put into appropirate tabs
Busco idea, ea grid 30 - 50 USD
Hola BUSCO IDEA tengo un robot que funciona de maravilla en tendencia, pero cuando el mercado se lateraliza se pone enrango en dos ZONAS se pierde mucho dinero. Busco la manera para que el robot NO OPERE EN ESOS MOMENTOS, que espere el momento del break out y empiese a ejecutar operaciones. A base de la idea se puede crear la version v2.0 del mi robot
My requirements are the following. I am ordering, I need an expert consultant on EA matters and an indicator in the trade pairs of XAUUSD and XAGUSD, we also need powerful robots for changing prices in the market. the market conditions, i.e. flexibility, then the business should be beneficial for all
Hello programmers, I’m looking only for veteran programmers with profound knowledge and experience in strategy optimization to improve my EA. The backtests are incredible, even with REAL TICKS of 100% quality Dukascopy data, but real results are quite disappointing on my specific brokerage. I would really love to adapt the EA so that back testing results and forward testing can better match. The strategy uses a

Информация о проекте

Бюджет
500+ USD
Сроки выполнения
до 28 дн.

Заказчик

Размещено заказов1
Количество арбитражей0