Debug existing code to take trades based on existing logic

MQL5 Experts

Specification

I have an EA that throws the following error when I backtest it:
2024.04.22 17:37:15.788 2023.09.07 18:54:51   Attempting to place Buy Stop Order - Entry: 15206.34, SL: 15206.14, TP: 15206.54, Ask: 15190.07
2024.04.22 17:37:15.788 2023.09.07 18:54:51   failed buy stop 1 NAS100 at 15206.34 (0.00) sl: 15206.14 tp: 15206.54 [Invalid request]
2024.04.22 17:37:15.788 2023.09.07 18:54:51   CTrade::OrderSend: buy stop 1.00 NAS100 at 15206.34 (0.00) sl: 15206.14 tp: 15206.54 [invalid request]


I need someone to apply a quick fix to it so that it takes trades according to this logic:

Requirement for Entering Trades with 2 Exponential Moving Averages (EMA):

  1. Setup:

    • Utilize two Exponential Moving Averages (EMA): a fast moving average (FMA) and a slow moving average (SMA).
  2. Entry Conditions:

    • Scenario 1: If the slow moving average (SMA) is above the fast moving average (FMA):

      • When three consecutive candles close above the fast moving average (FMA), enter a pending trade.
      • Set the pending trade entry point 'x' points above the high of the third closed candle.
    • Scenario 2: If the slow moving average (SMA) is below the fast moving average (FMA):

      • When three consecutive candles close above the fast moving average (FMA), enter a pending trade.
      • Set the pending trade entry point 'x' points above the high of the third closed candle.
  3. Stop Loss (SL):

    • If the slow moving average (SMA) is above the fast moving average (FMA):
      • Place the stop loss 'x' points below the fast moving average (SMA).
    • If the slow moving average (SMA) is below the fast moving average (FMA):
      • Place the stop loss 'x' points below the slow moving average (SMA).
  4. Take Profit (TP):

    • If the slow moving average (SMA) is above the fast moving average (FMA):
      • Set the take profit 'x' points below the slow moving average (SMA).
    • If the slow moving average (SMA) is below the fast moving average (FMA):
      • Omit setting a take profit.
  5. Trade Management if Take Profit (TP) is Hit:

    • If the take profit is reached:
      • If the take profit is below the slow moving average (SMA):
        • Place a pending order if three candles close above the slow moving average (SMA).
        • Set the pending order entry 'x' points above the high of the third closed candle.
        • Place the stop loss 'x' points below the slow moving average (SMA).
        • Omit setting a take profit for this pending order


Responded

1
Developer 1
Rating
(192)
Projects
196
27%
Arbitration
0
Overdue
3
2%
Free
2
Developer 2
Rating
(7)
Projects
8
38%
Arbitration
2
50% / 0%
Overdue
0
Loaded
Similar orders
Unicorn model entry for boom and crash only to catch spikes and crashes... Selling crash and buying boom Please have knowledge about boom and crash before applying Also demo to confirm quick selection
Hi - I need an EA built based on a custom indicator and simple crossing rules there should be a buy trade on some criteria with some take profit and SL. It should run on 30 min to 60 min timeframe thanks, Bas
Need to add code that will open and close transactions in the strategy tester. one buy and one sell trade on each new bar of the selected timeframe. with fixed stop loss and take profit of 100 and 100. on any trading instrument. The EA must pass a test from the market to load the product. no errors. Please provide the code separately, I will enter it into the bot myself. After successfully uploading the product to
Hanson Robotics 100+ USD
وهي متخصصة في إنشاء "روبوتات تشبه الإنسان" باستخدام الذكاء الاصطناعي لمختلف التطبيقات، مثل الرعاية الصحية والبحث والترفيه. بعد تفعيلها في 14 فبراير 2016، اكتسبت صوفيا اهتمامًا عالميًا بسبب مظهرها الشبيه بالبشر وتعبيرات وجهها
Witam Szanownych Freelancerów, Mam problem z konwersją strategii EA z MQL4 do MQL5. W zasadzie konwertuje za pomocą skryptu: mq4to5rewrite_sample_v4_2 kończy się sukcesem, ale daje wynik w pliku mq5, który nie daje się skompilować. System występowania o błędach, których ja z braku dostępu do języka MQL nie jest możliwy do zastosowania. W związku z tym mam prośbę o: a) konwersję i przygotowanie pliku żródłowego MQL5
BUDGET IS NEGOTIABLE. PHOTOS SAYS DOJI, BUT IS SUPPOSE TO BE PINBAR -------MAIN FUNCTIONS----------- Trade will enter buy trade after current candle goes below previous candle then within the same candle closes at or near the highest point. (PIN BAR) Trade will enter SELL trade after current candle goes below previous candle then within the same candle closes at or near the lowest point. (PIN BAR) ENTRY CANDLE
Hi all and thanks for reading. I need a coder to modify the name and design of an Expert Advisor working on MT4. I DON't HAVE SOURCES, BUT ONLY COMPILED EXE files. The EA has been given me from my partner. To be honest, the purpose of changing its design and name is to share it in my community (on my own brand form). After that, I would like to be informed on what's in the EA code: like comments, strategies or
PLEASE NOT THAT MY BUDGET IS 60usd FOR BOTH MT4 AND MT4 PLATFORMS The EA should have 1. An option that I can change it parameters, that's the period, method and application 2. The EA should sell when on every bullish candle that closes under the MA 3. The EA should buy on every bearish candle that forms Above the EA. It's should close trades on reverse cross. I mean when it's in a buy trade and crosses the MA for a
I want to create an EA that manages open trades, in a way that if a winning trade reach X% of profit it will close and partially close another open trade in the opposite direction ( the net profit for both trades to be X for example 10usd ) , in the input data I`ll choose the trades by either ticket number or magic number or comment
MT4 to Telegram 30 - 50 USD
Hello, I want to add a system send messages to Telegram Send a message with a specific picture and details of the new signal When closing with a profit, send the details of the closing and profit with a specific picture And close with a loss and send a specific picture, in addition to the details of the closure and the amount of the loss

Project information

Budget
30+ USD
For the developer
27 USD
Deadline
to 1 day(s)