Help refactoring an existing MT4 HFT EA

Trabalho concluído

Tempo de execução 18 horas

Termos de Referência

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!



Arquivos anexados:

Respondido

1
Desenvolvedor 1
Classificação
(8)
Projetos
11
0%
Arbitragem
6
33% / 67%
Expirado
2
18%
Livre
2
Desenvolvedor 2
Classificação
(21)
Projetos
30
57%
Arbitragem
0
Expirado
1
3%
Livre
3
Desenvolvedor 3
Classificação
(12)
Projetos
19
42%
Arbitragem
3
0% / 67%
Expirado
3
16%
Livre
4
Desenvolvedor 4
Classificação
(146)
Projetos
204
69%
Arbitragem
7
29% / 43%
Expirado
22
11%
Trabalhando
5
Desenvolvedor 5
Classificação
(64)
Projetos
144
46%
Arbitragem
19
42% / 16%
Expirado
32
22%
Livre
Pedidos semelhantes
I am looking for an experienced MT5 Expert Advisor developer. Goal: Create a custom MT5 EA that replicates the behavior of a profitable copy trading strategy (behavior-based, not code copying). Specifications: - Symbol: XAUUSD only - Max 1 trade at a time - Fixed risk per trade: 1% - Trades per week: 2–4 - Trading days: Monday to Thursday only - No trading during high-impact USD news (news filter required) - No
I need a custom MT5 Expert Advisor named “Dark Venus”. Strategy details: - Timeframe: M5 / M15 - Market: Forex (all major pairs) - Strategy type: Trend + Scalping - Indicators: • EMA (Fast & Slow) • RSI filter • ATR for Stop Loss & Take Profit - Trades only during low-spread sessions (London & New York) Trade Rules: - Buy when fast EMA crosses above slow EMA + RSI confirmation - Sell when fast EMA crosses below
//+------------------------------------------------------------------+ //| FXE Trader Smart AI EA (Deriv MT5 Forex) | //+------------------------------------------------------------------+ #property strict #include <Trade/Trade.mqh> CTrade trade; // ===== INPUTS ===== input double RiskPercent = 1.0; // % risk per trade input int FastEMA = 50; input int SlowEMA = 200; input int RSI_Period = 14; input int
I have an issue with my ninja script and i would like you to help me straighten things I wanted to create an indicator and i have the source code already but i am getting compiling errors on my NinjaTrader And i tried fixing the error it still same I sent 3 images here for you to understand the errors and i would like to ask if you can help me fix it so i can go ahead and compile my source code. Thanks
Good day, I would like to build an automated trading system for Ninjatrader using 2 MACD, a Supertrend, and a moving average indicator. I want the option to adjust the indicator settings, the ability to trade at three different times, and the option to receive alerts. I want to get an idea of what that will cost me. It will enter trades on all blue take one contract out at a fixed point, move the stop to break even
I need an MQL5 indicator that identifies reversals without repainting or placing signals with an offset. The goal is to minimize lag and reduce whipsaw trades. Desired results are similar to the attached image. Requirements: - No repainting - No signal offset - Emphasis on reducing lag - MQL5 compatible - Clear, concise code If you have the expertise to create a reliable, high-performance indicator, let's discuss
I'm looking for a skilled trader/developer to share a proven scalping strategy on M1-M5 timeframes without using Martingale, Grid trading, or Hedge. Requirements: - Minimum trade duration: 2 minutes - Lot size: <20 - Proof of skill: Provide MT4/MT5 trade history report (PDF/HTML) - No High Frequency Trades - GMT+1 timezone, flexible hours - Price negotiable, performance-based compensation possible If you're a
Good day, I would like to build an automated trading system for Ninjatrader using 2 MACD, a Supertrend, and a moving average indicator. I want the option to adjust the indicator settings, the ability to trade at three different times, and the option to receive alerts. I want to get an idea of what that will cost me. It will enter trades on all blue take one contract out at a fixed point, move the stop to break even
I have an indicator i need automated i use it manually and it plots arrows. Can you automate it for my Ninjatrader8? Do you need to see file? Expert Ninjatrader Developer can Bid for this project
I want to create an SMC bot base on ICT and Market structure,the bot must be able to keep adding on more positions while started.The bot must have a perfect risk management

Informações sobre o projeto

Orçamento
35+ USD
Prazo
de 2 para 3 dias