I pay 30 dollars to the one that can make this code compilate and run on Metatrader5 adding some minor modification

MQL5 Indicadores Asesores Expertos

Trabajo finalizado

Plazo de ejecución 1 hora
Comentario del Cliente
Amazing job and help
Comentario del Ejecutor
Good guy and straight to the point! We knocked this out quick

Tarea técnica

#property copyright "regression"
#property link      "https://www.mql5.com"
#property version   "1.00"

// Déclaration des variables
double lotSize;
string instrument;
int takeProfit;
int stopLoss;
int distance;
int timer;

// Initialisation des variables
lotSize = 0.01; // Choisissez la taille du lot que vous souhaitez utiliser
instrument = "EURUSD"; // Choisissez l'instrument financier que vous souhaitez trader
takeProfit = 100; // Choisissez la distance en pips du take profit
stopLoss = 50; // Choisissez la distance en pips du stop loss
distance = 1000; // Choisissez la distance en pips de la moyenne mobile à utiliser pour le trade
timer = 60; // Choisissez le temps de pause en secondes après la clôture de chaque trade

// Initialisation du programme
void OnStart()
  {
// Activer le trading automatique
   Trade.SetExpertMagicNumber(123); // Numéro magique pour identifier les trades du robot
   Trade.SetAutoTrading(true);

// Boucle infinie pour exécuter le trading en continu
   while(!IsStopped())
     {
      // Récupération du prix actuel
      double currentPrice = SymbolInfoDouble(instrument, SYMBOL_BID);

      // Calcul de la moyenne mobile
      double ma = iMA(instrument, 0, 1000, 0, MODE_SMA, PRICE_CLOSE, 0);

      // Calcul de la distance entre le prix actuel et la moyenne mobile
      double distanceToMa = currentPrice - ma;

      // Si la distance est supérieure à la distance choisie, on vend
      if(distanceToMa >= distance)
        {
         // Ouverture d'une position de vente
         ulong ticket = Trade.Sell(lotSize, currentPrice, 0, currentPrice + takeProfit * _Point, currentPrice - stopLoss * _Point, "Vente");
         // Si l'ordre a été ouvert avec succès, on affiche un message dans le journal
         if(ticket > 0)
           {
            Print("Ordre de vente ouvert avec succès (ticket = " + StringFormat("%I64u", ticket) + ")");
           }
        }
      // Sinon, si la distance est inférieure à la distance choisie, on achète
      else
         if(distanceToMa <= -distance)
           {
            // Ouverture d'une position d'achat
            ulong ticket = Trade.Buy(lotSize, currentPrice, 0, currentPrice - takeProfit * _Point, currentPrice + stopLoss * _Point, "Achat");
            // Si l'ordre a été ouvert avec succès, on affiche un message dans le journal
            if(ticket > 0)
              {
               Print("Ordre d'achat ouvert avec succès (ticket = " + StringFormat("%I64u", ticket) + ")");
              }
           }

      // Pause avant la prochaine itération
      Sleep(timer * 1000);
     }
  }
//+------------------------------------------------------------------+

Han respondido

1
Desarrollador 1
Evaluación
(4)
Proyectos
10
30%
Arbitraje
1
0% / 100%
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(36)
Proyectos
45
2%
Arbitraje
6
33% / 17%
Caducado
1
2%
Libre
3
Desarrollador 3
Evaluación
(378)
Proyectos
401
31%
Arbitraje
63
19% / 70%
Caducado
51
13%
Trabajando
4
Desarrollador 4
Evaluación
(9)
Proyectos
4
0%
Arbitraje
11
0% / 82%
Caducado
0
Libre
5
Desarrollador 5
Evaluación
(140)
Proyectos
194
76%
Arbitraje
4
50% / 25%
Caducado
18
9%
Libre
Solicitudes similares
I would like to create an EA based on the Shved Supply and Demand indicator. you can find the Shved Supply and Demand v1.7 indicator in the following link https://www.mql5.com/en/code/29395 NB: Checks the trading robot must pass before publication in the Market ( https://www.mql5.com/en/articles/2555 ) MQ5 file to be provided
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

Información sobre el proyecto

Presupuesto
30+ USD
IVA (20%): 6 USD
Total: 36 USD
Para el ejecutor
27 USD
Plazo límite de ejecución
a 1 día(s)