Clean up and fix EA MT4

MQL4 지표 EA

작업 종료됨

실행 시간 3 시간

명시

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





      응답함

      1
      개발자 1
      등급
      (115)
      프로젝트
      129
      18%
      중재
      11
      27% / 55%
      기한 초과
      4
      3%
      무료
      2
      개발자 2
      등급
      (43)
      프로젝트
      74
      50%
      중재
      5
      0% / 60%
      기한 초과
      19
      26%
      무료
      3
      개발자 3
      등급
      (258)
      프로젝트
      269
      29%
      중재
      2
      50% / 0%
      기한 초과
      3
      1%
      작업중
      게재됨: 2 코드
      4
      개발자 4
      등급
      (126)
      프로젝트
      151
      48%
      중재
      6
      83% / 17%
      기한 초과
      2
      1%
      무료
      5
      개발자 5
      등급
      (317)
      프로젝트
      355
      72%
      중재
      7
      43% / 29%
      기한 초과
      20
      6%
      작업중
      6
      개발자 6
      등급
      (7)
      프로젝트
      12
      42%
      중재
      1
      0% / 100%
      기한 초과
      2
      17%
      무료
      7
      개발자 7
      등급
      (28)
      프로젝트
      30
      63%
      중재
      0
      기한 초과
      4
      13%
      무료
      게재됨: 1 코드
      8
      개발자 8
      등급
      (271)
      프로젝트
      553
      50%
      중재
      57
      40% / 37%
      기한 초과
      227
      41%
      작업중
      9
      개발자 9
      등급
      (14)
      프로젝트
      14
      21%
      중재
      1
      0% / 100%
      기한 초과
      1
      7%
      무료
      10
      개발자 10
      등급
      (69)
      프로젝트
      146
      34%
      중재
      13
      8% / 62%
      기한 초과
      26
      18%
      무료
      게재됨: 6 코드
      비슷한 주문
      Hello! I want to automatically trade on Sierra Charts (IronBeam Brokerage). NQ ($20 per "handle") or MNQ ($2 per point or handle) - futures Broker: IronBeam mostly for the low capital requirement for futures Chart: Sierra Charts I almost exclusively trade a 5-20 bracket with 2 contracts (first contract closes at a +5 and second bracket closes at a +20.) When the +5 is reached, I move my stop from -15 to BE
      Let’s use Chart M3. Stochastic 8,3,3. 85/15 trigger for sell stochastic >85, and the reversal move need to engulf the last bar for 1 point. SL over the engulfed bar. Same trigger for buys… Stochastic <15, engulfed bar by 1 point = entrance. SL under the engulfed bar… more details as soon we start to work on it
      Scalping EA/straddle 30 - 200 USD
      Title: Custom EA: Dynamic Trailing Limit Grid with Volatility/Velocity Filter and Auto SL/TP Description: I am looking for an experienced MQL5 programmer to develop a high-performance, robust Expert Advisor (EA) for MetaTrader 5. The strategy relies on dynamic trailing limit orders that automatically adjust to market price changes, featuring a safety buffer during high-velocity price spikes. The EA must include the
      Freelance Task — EA Recovery Layer Hello. I have a ready-made MQL5 EA. The signals, SL/TP and lot calculation should essentially not be touched. I need a recovery system added. I am not a programmer — below is how the robot should behave. What stays Entry only from an EA signal. Stop-loss is not a new signal. Trailing is already built into my EA — recovery does not implement its own trailing. If trailing is disabled
      Watcher position 30 - 100 USD
      //+------------------------------------------------------------------+ //| synthetic tick generator based on two assets | //+------------------------------------------------------------------+ class CSyntheticTickGenerator { private : string symbol_a; string symbol_b; string synth_name; double ratio; double last_price_a; double
      # SNRZ BOT — SESSION PROGRESS LOG Last updated: 2026-09-16 (local late-evening session) ## SAN BOT (new — cloned from SNRZ) - `MQL5\Experts\AutomatedOrderBot_SAN.mq5` / `.ex5` — v1.0, compiled 0 errors/0 warnings - Signal source: custom indicator "SAN" (InpSANName, buy buf 0 / sell buf 1, target bar 1), same SNRZ-style read, MA fallback if missing - Magic number 234567 (separate from SNRZ 123456 so both bots can run
      Multi-Asset EA (XAUUSD / FRA40) with Time Filters, High-Impact News Avoidance, Advanced Risk/Lot Sizing, and H1 Breakout Strategy 1. RISK SETTINGS * Max Daily Loss Limit: (bool) Toggle true/false. If true, input double for max loss in currency (e.g., $500). If hit, close all positions and stop trading until next day. * Lot Sizing Mode: Dropdown menu: 1. Fixed Lots (e.g. 0.10); 2. Percentage Risk (%) based on Account
      Should be as it but no alarms, also we need to add a deep search so he can see all the preves candles and a memory function so its not slowing down the indicator. for higher time frames daily 4h 1h around 365 days and for lower time frames we do up to 20k bars but both flexible so i can change it later. the memory is important so the indicator is not always recalculating everything when a new candle shows especially
      Creating a bot using the Parabolic indicator with a simple interface.. I want a bot that uses the Parabolic SAR indicator only, with these orders attached to it. Boot name : HEMIN .FX Magic number : 000000 …………………………………………………. Trade behavior : regular OR inverse OR only long "buy" OR only short "sell" Timeframe : ………… Period: ……… ………………………………………………….. Lot size : ……………… Break even in points : …
      I am looking for an experienced MQL5 EA developer to develop an MT5 EA by the observable trading behaviour from a supplied live XAUUSD trade history . The EA appears to use a simple grid/recovery/hedging strategy with alternating BUY/SELL positions and progressive lot sizes. I need the developer to Develop the EA for MT5 / XAUUSD . Reproduce the observed entry, grid/add-on, recovery/hedging, lot progression and

      프로젝트 정보

      예산
      40+ USD
      기한
       7 일