Clean up and fix EA MT4

MQL4 Indicators Experts

Job finished

Execution time 3 hours

Specification

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





      Responded

      1
      Developer 1
      Rating
      4.98
      (115)
      Projects
      129
      18%
      Arbitration
      10
      30% / 50%
      Overdue
      4
      3%
      Working
      2
      Developer 2
      Rating
      4.79
      (34)
      Projects
      55
      40%
      Arbitration
      4
      0% / 50%
      Overdue
      19
      35%
      Working
      3
      Developer 3
      Rating
      5
      (93)
      Projects
      94
      30%
      Arbitration
      0
      Overdue
      3
      3%
      Free
      4
      Developer 4
      Rating
      4.98
      (111)
      Projects
      135
      46%
      Arbitration
      6
      83% / 17%
      Overdue
      2
      1%
      Working
      5
      Developer 5
      Rating
      5
      (13)
      Projects
      16
      13%
      Arbitration
      3
      0% / 67%
      Overdue
      0
      Loaded
      6
      Developer 6
      Rating
      4.71
      (7)
      Projects
      12
      42%
      Arbitration
      1
      0% / 0%
      Overdue
      2
      17%
      Working
      7
      Developer 7
      Rating
      5
      (28)
      Projects
      30
      63%
      Arbitration
      0
      Overdue
      4
      13%
      Free
      8
      Developer 8
      Rating
      4.9
      (238)
      Projects
      492
      51%
      Arbitration
      48
      42% / 38%
      Overdue
      214
      43%
      Working
      9
      Developer 9
      Rating
      5
      (11)
      Projects
      11
      18%
      Arbitration
      1
      0% / 100%
      Overdue
      1
      9%
      Working
      10
      Developer 10
      Rating
      4.81
      (63)
      Projects
      139
      34%
      Arbitration
      9
      11% / 67%
      Overdue
      25
      18%
      Free
      Similar orders
      I need an indicator for MT5 that will show fractals and simple moving average in a different way.. -Simple moving average changes 3 colors based on price and SMA movement -Last 2 upper and lower fractals are shown on the right edge of the chart (ability to change amount of fractals shown) More details of indicator discussed with developer
      I have existing indicators made by friend then he limited the usage of the indicators and when I open the charts of my mt5 account there are notifications pops out and says update it, and I don't have the source of the indicators but I have the indicators in ex5 forms , I need coder who can code them accordingly to their initial source and give full time licensed with no updating or notifications pops tomorrow out
      I have a Custom Indicator(a) with over 1500 lines of code. This indicator also, uses the information from another indicator(b) with over 600 lines of code. By default, the history is set to 100 in the indicator(a) But, accuracy of the indicator increases with infinite history (until the chart on MT4 is available). When set to 1000 as history, it works. Anything above 5000 as history, the system gets hangs. This
      the fractals indicator must be able to work "on several screens" while on a single chart. The indicator have to show fractals from six timeframes The indicator have to display fractals from the MN, W1, D1, H4, H1, M30, M15, M5 and M1 timeframes simultaneously. I would like for the indicator to have horizontal lines that you can customize the colors. I would like the horizontal lines to change automatically when
      I've a Custom Made Indicator, which has many iterations to work!! It has around 1500 lines of code and it's a MTF indicator. Right now, by default the history is Set to 100. And IT works on my i9 processor till 2000 candles. But, the accuracy of the indicator increases, when it's Set to 0(infinite) as long as the history available in the Chart / metatradr Platform, the system hangs/ doesn't Respond. I need a Coder
      Hello i need a developer to convert Pinescript Indicator to MT4. I need the source code of indicator. The indicator must buy or sell exactly as in TradingView. Interested dev to contact me. After converting i will also give you a job to make it EA
      I need an alert added to an indicator whenever the indicator line changes color from Yellow to Red, and Red to Yellow (cross above/ cross below). An up or Down arrow should be placed above or below the close of the last candle after the alert occur. Show screen alert and indicate which currency pair and specify if it's a Buy or Sell (Up arrow Buy, Down arrow Sell) All settings should be manually adjustable: Original
      Recreate these lines please. It is believed that around 60% of the time price trades within it's normal average daily range (ADR) and pushes beyond these levels 40% we want to see if that is true and how to take advantage of such a finding. These are the examples of ADR extension averages shown by the information shown in the images: it should be able to show more. Price exceeded 100% of ADR10 roughly 42% of the
      Did you know this indicator? If yes is your answer then write a program with the indicator to do the following: 1. If the indicator thumbs is down from +100 to -100 find the last decline ca value and time at the main chart and insert an arrow at the top of that ca. See image!!! 2. If the indicator thumbs is up from -100 to +100 find the last rise ca value and time at the main chart and insert an arrow at the
      I Need a Developer, Who's like in an Advanced Level. Please apply for the job if you could spare today and tomorrow for this job.!! This job won't Take more than a day for an Advanced level coder. Will give the source code and job description over applications

      Project information

      Budget
      40+ USD
      VAT (22%): 8.8 USD
      Total: 48.8 USD
      For the developer
      36 USD
      Deadlines
      to 7 day(s)