Help refactoring an existing MT4 HFT EA

Job finished

Execution time 18 hours

Specification

Hello,


I need help refactoring an existing EA code and changing the Trailing system to start only when order in profit.

Review and clean the code

- remove unused variables

- rename variables and functions to be more easy to follow / relevant

- make comments so it is easy to follow and understand the EA code

Key Areas for Refactoring:

  1. Variable Naming: Some variables have unclear names like Gi_180 or Gd_232 . Meaningful names will make the code easier to follow.
  2. Magic Numbers: There are multiple switch cases, conditions, and calculations with constants (like 3 , 0.1 , etc.). These should be replaced with named constants or parameters.
  3. Repeated Code: There is a lot of duplicated logic, especially in the start() function. Consolidating common logic into separate functions could improve readability.
  4. Function Decomposition: The start() function is long and complex. Breaking it down into smaller functions with single responsibilities will improve maintainability.
  5. Error Handling: The error handling is mostly repeated across multiple order operations. This could be abstracted into a function.
  6. Array Management: The array manipulation in ArrayCopy() and other places can be simplified.
  7. Add / repair the StopLoss to work independent for each order
  8. Add trailing system. This should have the option to apply only when order / orders profit > predetermined value as extern input. trailing profit to be > order commision + swap

The EA needs to perform well also on live accounts = closed order to be in profit ( trailing profit to be > order commision + swap ) and also work with past data for backtesting!

Thank you!



Files:

Responded

1
Developer 1
Rating
(8)
Projects
11
0%
Arbitration
6
33% / 67%
Overdue
2
18%
Free
2
Developer 2
Rating
(22)
Projects
33
52%
Arbitration
1
100% / 0%
Overdue
1
3%
Free
3
Developer 3
Rating
(12)
Projects
19
42%
Arbitration
3
0% / 67%
Overdue
3
16%
Free
4
Developer 4
Rating
(151)
Projects
211
69%
Arbitration
8
38% / 38%
Overdue
23
11%
Free
5
Developer 5
Rating
(64)
Projects
144
46%
Arbitration
20
40% / 15%
Overdue
32
22%
Working
Similar orders
I am looking for a professional MQL5 developer to build a MetaTrader 5 Expert Advisor from scratch. The EA will be called LadyKiller EA. It must trade only the following instruments: • XAUUSD (Gold) • US30 / Dow Jones Index Requirements: • Strong and reliable buy and sell entry logic • Stop Loss and Take Profit system • Risk management (lot size control) • Maximum trades protection • Drawdown protection • Trend
I need an mql5 EA which can be used with 100$ capital very low drawdown The EA should be high frequency trading special for XAUUSD and btcusd or binary options but also the EA should be testable via strategy tester and demo test for five days is needed NO SELECTION CAN BE DONE WITHOUT TESTING when applying make sure you send the backtester results with demo EA testable via strategy tester
I currently have a powerful and well-structured Expert Advisor available on the MT5 platform. This EA is designed with: ✅ Advanced entry and exit logic ✅ Smart risk management system ✅ Automatic lot sizing option ✅ Break-even and trailing stop protection ✅ Spread and session filters ✅ Drawdown control features ✅ Optimized for XAUUSD and scalping strategies ✅ Suitable for prop firm challenges like FTMO It is built for
Do you need a profitable and well-structured trading strategy converted into a fully automated Expert Advisor on the MT5 platform? I specialize in developing advanced, high-performance EAs with: ✅ Smart entry & exit logic ✅ Risk-based lot size calculation ✅ Break-even & trailing stop system ✅ Spread & session filters ✅ Daily drawdown protection ✅ Prop firm (FTMO-style) risk compliance ✅ Fully automated trade
Hello, I'm looking to find out the cost of creating a mobile trading robot. I've tried to describe it as thoroughly as possible in the following document. I look forward to your response. I'd like to know the costs, delivery time, and how you plan to implement it before making a decision
I am offering a ready-to-use trading system that connects MetaTrader 4 signals with automated trading on Polymarket. The system is already fully developed and working. What the system does: The bot copies signals from a custom MT4 indicator and executes trades automatically on Polymarket prediction markets. How it works: A custom MT4 indicator generates BUY or SELL signals using buffers. When a signal appears, it is
DO NOT RESPOND TO WORK WITH ANY AI. ( I CAN ALSO DO THAT ) NEED REAL DEVELOPING SKILL Hedge Add-On Rules for Existing EA Core Idea SL becomes hypothetical (virtual) for the initial basket and for the hedge basket . When price hits the virtual SL level , EA does not close the losing trades. Instead, EA opens one hedge basket in the opposite direction. Original basket direction Hedge basket direction (opposite) Inputs
Billionflow 30 - 100 USD
Trading specifications: Indicators: Bollinger band ( Period 40, Deviation 1 apply to close) Moving Average (Exponential ) Period 17 applied to high Moving Average ( Exponential ) Period 17 applied to low But Signal enter a buy trade when prices crosses the lower band of the bollinger band up and also crosses the moving average channel of high and low the reverse is true for sell signal
Hello, I am a user of the "BUY STOP SELL STOP V6" trading bot, which is an advanced Grid System bot. The bot is primarily designed for Gold (XAUUSD), but I want it to work on all currency pairs. "The bot contains a privacy/protection code that prevents it from running on other accounts or being modified on any platform, as it has a client account number lock mechanism" --- Bot Description & Current Settings Bot Type
Looking to purchase a Good forex or gold/ BTC trading EA and it's source code. Must be compatible with low budget like less than $500 accounts, Must need no manual intervention and run fully automated. If you are interested in selling me the source code, please share the Read only account access where the EA has already been running on, so i can check past performance and get an idea on how it works or runs. Dont

Project information

Budget
35+ USD
Deadline
from 2 to 3 day(s)