Clean up and fix EA MT4

MQL4 Indicadores Asesores Expertos

Trabajo finalizado

Plazo de ejecución 3 horas

Tarea técnica

Hello. I need to clean up the code of an EA. There are some things to delete, some to be remade better and above all, errors to fix.


Errors are two:

1) The EA gives an error in live trading, in backtesting not, but in live it gives sometimes the error "Order failed - Invalid TP/SL",
and when this error happens the order is not opened. Some say that is because the Stoploss and TakeProfit are too small, but I tried increasing them and the issue persist.
The developer should check on his own on M1 timeframe in Live that the error is fixed.

2) Testing with some brokers, in backtest it returns error "OrderSendError 130". This error should be fixed.


Then, regarding deleting parts and remake some parts better, I scrolled down the code and signed the parts to delete and the ones to check to be fixed:

  • From line 77 to 86 in the properties under "Close Order Settings" and the relative parts in the code, should be deleted (down below I state where are these parts.
  • The lines 75, 76 in the properties and the relative function in the code "IsFarEnough()", should be deleted (down below I state where are these parts).
  •  From line 114 to 119 in the properties under "Martingale Settings" and the relative parts in the code that use Martingale, should be deleted (down below I state where are these parts).
  • From line 412 to 417 I think is useless, so it can be deleted, together with the relative parts in the code.
  • At line 450 and 460 I added on my own the functions: (LastActionTime != Time[0]) and isDelayed(), which both together allow the EA to open only one order per candle after the open of the candle (if signal is true),
    and when the order is closed by StopLoss or TakeProfit, the next order is always opened on the next candle if the signal on that candle is true. But these functions are not the best way to do this, so they should be replaced with better code.
    I summarize how it should be: if signal is true, the EA should open only one order per candle, then after some candles the order is closed by Take Profit, then if signal is true on the same candle where order has been closed the EA should NOT open a new order on that candle,
    but it should wait the next candle to open, so if the signal is true the EA should open an order only one time on that new candle...and so on.
  • From 477 to 513 are Alerts, you can delete them, I don't use them.
  • From Line 518 to 530 is CloseByTime() a function to close order that can be deleted, I don't use it.
  • From 532 to 545 is function IsGoodTime, it's the timefilter, this one I use and you should check if there are no errors. And also for function IsFridayEvening(line 550-555) and function IsCloseTime(Line 560-567)
  • From Line 569 to 760 is the main part, it should be checked if there are errors or bugs.
  • From line 823 to 830 is Martingale, delete it.
  • From 832 to 1020 should be checked for errors, it a buggy part: function Normalize Lots at line 905 is not used, but some parts of it are still used, it should be revised, or better deleted.
  • Recovery() at line 1004 I don't know what is...
  • From 1026 to 1086 are the functions that are called at lines 450, 460...as I said they should be replaced with better solution.
  • From line 1090 to the end, delete all.

    As you can see there are more things to delete than to fix. I hope that doing part of the work can speed up yours. I cannot delete them on my own because I'm afraid to delete something that is useful, it's better the developer do that.

    I guess bugs are in the main parts, the ones to send orders or SL, TP, TrailingStop parts...


    I request final mq4 file source code.

    Thanks.

    Regards





      Han respondido

      1
      Desarrollador 1
      Evaluación
      (115)
      Proyectos
      129
      18%
      Arbitraje
      11
      27% / 55%
      Caducado
      4
      3%
      Libre
      2
      Desarrollador 2
      Evaluación
      (43)
      Proyectos
      74
      50%
      Arbitraje
      5
      0% / 60%
      Caducado
      19
      26%
      Libre
      3
      Desarrollador 3
      Evaluación
      (258)
      Proyectos
      269
      29%
      Arbitraje
      2
      50% / 0%
      Caducado
      3
      1%
      Trabaja
      Ha publicado: 2 ejemplos
      4
      Desarrollador 4
      Evaluación
      (126)
      Proyectos
      151
      48%
      Arbitraje
      6
      83% / 17%
      Caducado
      2
      1%
      Libre
      5
      Desarrollador 5
      Evaluación
      (317)
      Proyectos
      355
      72%
      Arbitraje
      7
      43% / 29%
      Caducado
      20
      6%
      Trabaja
      6
      Desarrollador 6
      Evaluación
      (7)
      Proyectos
      12
      42%
      Arbitraje
      1
      0% / 100%
      Caducado
      2
      17%
      Libre
      7
      Desarrollador 7
      Evaluación
      (28)
      Proyectos
      30
      63%
      Arbitraje
      0
      Caducado
      4
      13%
      Libre
      Ha publicado: 1 ejemplo
      8
      Desarrollador 8
      Evaluación
      (271)
      Proyectos
      553
      50%
      Arbitraje
      57
      40% / 37%
      Caducado
      227
      41%
      Trabaja
      9
      Desarrollador 9
      Evaluación
      (14)
      Proyectos
      14
      21%
      Arbitraje
      1
      0% / 100%
      Caducado
      1
      7%
      Libre
      10
      Desarrollador 10
      Evaluación
      (69)
      Proyectos
      146
      34%
      Arbitraje
      13
      8% / 62%
      Caducado
      26
      18%
      Libre
      Ha publicado: 6 ejemplos
      Solicitudes similares
      Is there anyone with an indicator that give signal after head and shoulder pattern is formed in Volatility indices? The indicator will wait for the second shoulder to be formed before giving an arrow of buy or sell
      Hi, I want to develop a highly accurate, custom technical indicator for MetaTrader 5 (MT5) specifically tailored for 1-minute Binary Options trading (Quotex). I do NOT need an automated trading bot. I only need visual buy/sell arrows on the chart, an advanced alert system, and an on-chart performance statistics dashboard. The indicator must be 100% non-repainting. --- 1. STRATEGY CONFLUENCE LOGIC The indicator should
      Create a bot that can trade and read indicators easy to read for first time users. Bot that can be used on a phone and connect to MT5. It should be easy to install or use on any device especially phone and laptop, preferably the bot that can run over night and controllable when needed
      These are orderflow footprint indicator I would like to know if you can algorithmisie and build a stacked imbalance bot from them .. Kindlt let me know if you can do it and check the file before replying me
      I have 2 trading view indicators by GainzAlgo that I want code to mt5 , could u advise? I need you to give me response if you can convert This
      I DO NOT need any programming or strategy development. I already have a working NinjaTrader 8 automated strategy based on a 3/5 EMA crossover. I need you to run my existing strategy through NinjaTrader Strategy Analyzer/Optimizer, test the existing adjustable parameters, and find robust settings with the best profit factor and lowest reasonable drawdown. I will provide the existing NinjaScript ZIP. I do not want the
      Platform: TradingView Programming Language: Pine Script v6 Type: Custom Indicator Project Name: Scalping Reaction Zones + Valid Order Blocks MAIN GOAL I need a custom TradingView indicator for scalping. The indicator must detect: 1. Reaction / Explosion Zones 2. Valid Order Blocks 3. Combined Reaction Zone + Order Block zones The indicator should NOT generate: Buy signals Sell signals TP SL Entry signals Trading
      Project Description I am looking for an experienced MQL5/MT5 Expert Advisor developer to develop an automated trading EA for XAUUSD on the M3 timeframe , running on an Exness account . The EA will automate a manual strategy based on SNR/GAP zones , using two setup types: Price Rejection Price Correction The EA should identify valid BUY/SELL setups around predefined SNR/GAP areas, apply configurable RSI, SMA, EMA and
      Indicador Maximas e Minimas + Super Trend O Indicador MAX/MIN é um indicador de análise técnica para o MetaTrader 5 , desenvolvido para ajudar você a identificar regiões importantes de preço e possíveis oportunidades de compra e venda. O que ele faz MAX/MIN: identifica máximas e mínimas relevantes do mercado e mostra os preços no gráfico. HH / HL / LH / LL: ajuda a visualizar a estrutura do mercado, mostrando quando
      Hello Traders, Have a trading strategy or idea you want to automate? I specialize exclusively in MQL5 development, helping traders turn their concepts into professional trading solutions. Custom Expert Advisors — automate your strategy and reduce manual execution Custom Indicators — transform your market ideas into powerful trading tools Fix & Debug — identify errors and get your existing code working properly

      Información sobre el proyecto

      Presupuesto
      40+ USD
      Plazo límite de ejecución
      a 7 día(s)