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
      72
      49%
      Arbitraje
      4
      0% / 50%
      Caducado
      19
      26%
      Libre
      3
      Desarrollador 3
      Evaluación
      (182)
      Proyectos
      186
      27%
      Arbitraje
      0
      Caducado
      3
      2%
      Libre
      4
      Desarrollador 4
      Evaluación
      (126)
      Proyectos
      151
      48%
      Arbitraje
      6
      83% / 17%
      Caducado
      2
      1%
      Libre
      5
      Desarrollador 5
      Evaluación
      (220)
      Proyectos
      249
      61%
      Arbitraje
      3
      33% / 67%
      Caducado
      5
      2%
      Trabaja
      6
      Desarrollador 6
      Evaluación
      (7)
      Proyectos
      12
      42%
      Arbitraje
      0
      Caducado
      2
      17%
      Libre
      7
      Desarrollador 7
      Evaluación
      (28)
      Proyectos
      30
      63%
      Arbitraje
      0
      Caducado
      4
      13%
      Libre
      8
      Desarrollador 8
      Evaluación
      (259)
      Proyectos
      533
      50%
      Arbitraje
      54
      41% / 37%
      Caducado
      224
      42%
      Trabaja
      9
      Desarrollador 9
      Evaluación
      (14)
      Proyectos
      14
      21%
      Arbitraje
      1
      0% / 100%
      Caducado
      1
      7%
      Libre
      10
      Desarrollador 10
      Evaluación
      (66)
      Proyectos
      143
      34%
      Arbitraje
      10
      10% / 60%
      Caducado
      26
      18%
      Trabaja
      Solicitudes similares
      Convert Trading View indicator to MT5. The source code is available for free on Trading View. Changing the colors of buffers used for each color must be allocated to separate buffers This is so that there is no difficulty in making a robot through the indicator need source file
      I have the source code attached which is my attempt at merging / converting: Into MQL5 code, but instead of being an indicator I just need it to return the same values as the indicator. What I need help with: I need the values in the comments to return similar to the demo indicator below - currently it is showing values near the price, but would instead expect - values from -80 to 80 like the indicator How to test: -
      Hello, I have a TMA dashboard and want to modify it. The dashboard tracks if price is above or below the TMA bands, and creates a signal based on the daily or weekly open. Changes: Replace 2 columns that track the daily and weekly open (with arrows) to track the previous Heiken Ashi candle instead(Up arrow for previous bullish candle, Down arrow for previous bearish candle. Correct the Dashboard signals since we are
      EA is based on Zig Zag indicator and candlestick patterns and is not catching all valid trades due to Zig Zag limitations, lagging last leg or repainting I guess. Before I will select you please present me a solution for this issue. I am so sorry, but I haven't got time for an amateur programmers. I am searching a programmer for a longer co-operation
      I'm looking for an experienced developer to make some modifications to my MT4 Currency Strength Table indicator. Key Requirements: - I would like to have the add on feature of delta or the difference of the strength of currencies displayed in the new table and showing as B or S of only the currency pair when the delta or difference arises. the delta will change values as the difference of strength of compared
      I'm looking for an experienced developer to make some modifications to my MT4 Currency Strength Table indicator. Key Requirements: - I would like to have the add on feature of delta or the difference of the strength of currencies displayed in the new table and showing as B or S of only the currency pair when the delta or difference arises. the delta will change values as the difference of strength of compared
      Hello! I want to create an exact replica of a momentum indicator (MQL4) that also uses Bollinger bands. See pics attached. I do not have source code. I generally take entry when mom candle exits BB. I will appreciate a push alert when this happens on candle close. Keep it simple, keep it accurate. Inputs I generally use are attached. I don't show the EMA lines on the indicator. To the developer that will support me
      Hello there and how have you been !!I I need a developer who is ready to take up a project ..I would like to convert Ninjatrader indicator to Tradingview all the details about the project will be sent directly to you via the inbox…
      Looking for a developer to create an MT4 indicator and an EA / Robot. Indicator-based strategy consisting of several moving averages, PSAR Indicator and Pinescript indicator called Coral Trend Indicator by LazyBear (pinescript source code will be provided and will need converting to MT4 code - 34 lines of code). Strategy to be an intra-day trading period on 5-minute timeframe for the European session but “Trading”
      Modify EA 30+ USD
      please make it work so the EA places the Trade once the indicators are on the same direction. say No3 SELL signal is showing but the trend is BUY, so once the trend changes to SELL then EA places the trade. like wise with MACD ZZ Level - Enable / Disable zTrend - Enable / Disable MACD - Enable / Disable also a Smart TP/SL (Enable/Disable) feature = for ones when the trend changes, then EA uses this indicator signal

      Información sobre el proyecto

      Presupuesto
      40+ USD
      IVA (22%): 8.8 USD
      Total: 48.8 USD
      Para el ejecutor
      36 USD
      Plazo límite de ejecución
      a 7 día(s)