Clean up and fix EA MT4

MQL4 Indicateurs Experts

Tâche terminée

Temps d'exécution 3 heures

Spécifications

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





      Répondu

      1
      Développeur 1
      Évaluation
      (115)
      Projets
      129
      18%
      Arbitrage
      11
      27% / 55%
      En retard
      4
      3%
      Gratuit
      2
      Développeur 2
      Évaluation
      (43)
      Projets
      72
      49%
      Arbitrage
      4
      0% / 50%
      En retard
      19
      26%
      Gratuit
      3
      Développeur 3
      Évaluation
      (185)
      Projets
      190
      27%
      Arbitrage
      0
      En retard
      3
      2%
      Gratuit
      4
      Développeur 4
      Évaluation
      (126)
      Projets
      151
      48%
      Arbitrage
      6
      83% / 17%
      En retard
      2
      1%
      Gratuit
      5
      Développeur 5
      Évaluation
      (220)
      Projets
      249
      61%
      Arbitrage
      3
      33% / 67%
      En retard
      5
      2%
      Travail
      6
      Développeur 6
      Évaluation
      (7)
      Projets
      12
      42%
      Arbitrage
      0
      En retard
      2
      17%
      Gratuit
      7
      Développeur 7
      Évaluation
      (28)
      Projets
      30
      63%
      Arbitrage
      0
      En retard
      4
      13%
      Gratuit
      8
      Développeur 8
      Évaluation
      (261)
      Projets
      535
      50%
      Arbitrage
      54
      41% / 37%
      En retard
      224
      42%
      Travail
      9
      Développeur 9
      Évaluation
      (14)
      Projets
      14
      21%
      Arbitrage
      1
      0% / 100%
      En retard
      1
      7%
      Gratuit
      10
      Développeur 10
      Évaluation
      (66)
      Projets
      143
      34%
      Arbitrage
      11
      9% / 55%
      En retard
      26
      18%
      Travail
      Commandes similaires
      Hello, I am a trader and I have a certain strategy I want to code to an automated EA , so I am seeking for an experienced developer to code a custom trading strategy into an Expert Advisor (EA) for MetaTrader 4 (MT4). The strategy is based on a meticulously backtested algorithm and requires precise execution in live market conditions. If you have the skills and experience to undertake this project, please reach out
      I need my mq4 script to be modified and made for mql5, i need statistics added and a protection in the form of licence to be added. ALSO i need the licence to work with metatrade id number
      I have an EA that is based on an indicator and I need to fix and upgrade the EA a bit, The EA is based on a technical indicator of the mql5 store and the original indicator has been updated, therefore the EA is stuck
      Hello, i am looking for developer who can create custom price alert indicator or EA for MT5. Basically either or is fine, prefered indicator if possible. The function of alerts in MT5 is fine but it does not allow setting custom sounds for specific charts with ease. For example, one can attach custom sound to new price alert, but if you use a lot of alerts daily (which i do) and want to have each ticker/pair to have
      I need a indicator that will be based on RSI combined with MACD and algorithm, when I plug the indicator it must be able to give me signal of buy or sell and entry point and take profit 1 2 3 and stop loss if is a buy it must be blue arrow if is a sellthe arrow must be red
      Hello i need a Pinescript indicator for Tradingview, please read in attached the requirements apply only if you can work with my budget and you have knowledge of pinescript (ex. you have already work with pinescript) the indicator to be able to predict D point Based on XABC Points, some times it will fails and it will be cancelled
      If auto trading disabled and trades closed (like to avoid news), then when auto trading enabled, EA needs to start trading again right away, but it doesn't. If the terminal is restarted with active EA, the EA should pick up where it left off, not make new trades because terminal restart. EA has terminal GVs. If EA is re initialized with same set file it overwrites the GVs, it should not overwrite the GV values, but
      I need assistance setting up both manual and automated trading strategies. I want the flexibility to add multiple strategies in the same order as needed. Additionally, I need any profits made to automatically convert to USDT (Tether) rather than remaining in the same coin. The setup should be compatible for both PC and mobile use, and across platforms including Binance, Bybit, Bitget, Gate.io, and TradingView. If you
      I want to convert my tradingview indicator to MT4. I need a developer who can get it completed under the course of 24-48hrs. And I need some who is more experience at this level and possibly if you have experience with NinjaTrader too, we can collaborate and work on it as well
      I am currently seeking the expertise of a skilled MQL5 developer to assist with a custom trading bot project tailored to specific requirements. The project entails the development of a versatile trading bot capable of implementing both manual and automated strategies, with flexibility to switch between strategies seamlessly. Additionally, the bot should be designed to convert profits automatically into USDT, allowing

      Informations sur le projet

      Budget
      40+ USD
      TVA (22%): 8.8 USD
      Total: 48.8 USD
      Pour le développeur
      36 USD
      Délais
      à 7 jour(s)