Debug existing code to take trades based on existing logic

MQL5 Asesores Expertos

Trabajo finalizado

Plazo de ejecución 63 días

Tarea técnica

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


Han respondido

1
Desarrollador 1
Evaluación
(204)
Proyectos
209
28%
Arbitraje
0
Caducado
3
1%
Libre
2
Desarrollador 2
Evaluación
(11)
Proyectos
16
25%
Arbitraje
4
25% / 25%
Caducado
1
6%
Libre
Solicitudes similares
Im looking for an coder to code an EA: Trade management 1. opening trades according to the indicator 2. trades settings to choose from like: open all trades according to the signal open only trade 1,2,3 or 4 % per trade ( example 50/30/20 of the lot settings, with 4 trades it would be for example 50/30/10/10) 3. SL/Trailing settings: Move SL to entry after hitting TP1/TP2 or TP3 moving SL by % keep the original SL
Hi I'm looking to have 2 of my pinescript strategies converted to MQL5 and was wondering if you could first give me a quote for the more simple strategy and then for both the simple and complex strategy together. The simple strategy is a MACD crossover type thing that uses a special EMA script that filters out some ranging price action and also fractal candles for the stop loss. The second strategy is market
I want grate robot for making profits that know when to start a good trade and close a trade and must be active all time to avoid lost of money
I have developed a very strong TradingView strategy in Pine Script but unfortunately, a third-party connector is requiired and in my opinion, I want a more direct connection. I am not brilliant at coding, but I have coded the majority of the MT5 code and I would like you to make sure that the MT5 code matches my TradingView script and executes the same way as the TradingView script that I will provide if you are
Mbeje fx 50+ USD
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Dr Pattern 30+ USD
good day i need the service of the seaso coder to help me fix my ea The Job required 1 knowledge of Mt4 and Mt5 indicator coding 2. Telegram code 3. ability to code indicator to work on multiple Time frame combine to trade 4 Ability to Join two or three indicator on same ir different time frame if you have these skill please let chart i will discuss the details of the Job inside to you The required day including
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
Hello, I am looking for a professional programmer to optimize my existing EA integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. i want it to be an EA that can be trusted to carry trade with the help of chat gpt and also have a very low drawdown
Hello, I am looking for a professional programmer to create a trading expert on the MT4 platform, integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. Further details will be provided to the applicants later

Información sobre el proyecto

Presupuesto
30+ USD
Para el ejecutor
27 USD
Plazo límite de ejecución
a 1 día(s)