Creating A Trading Bot

Tarea técnica

//+------------------------------------------------------------------+
//|                                                  Emmanuels Bot  |
//|                                       Copyright © 2023 Emmanuel  |
//|                                          https://www.example.com |
//+------------------------------------------------------------------+

//|----------------------------------------------------|
//|            Trading Strategy Parameters             |
//|----------------------------------------------------|
input double Key_Value = 2.0;      // Key Value to adjust sensitivity
input int ATR_Period = 10;         // ATR Period
input double Lot_Size = 0.05;      // Lot Size for orders
input int Take_Profit = 20;        // Take Profit in pips

//|----------------------------------------------------|
//|                      Indicator                     |
//|----------------------------------------------------|
double xATRTrailingStop;           // Trailing Stop value

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnTick()
  {
   double atr = iATR(_Symbol, _Period, ATR_Period, 0);  // ATR value
   double nLoss = Key_Value * atr;                     // Dynamic Loss value
   double stopLoss = 0;                                // Stop Loss value

// Calculate the Trailing Stop
   if(Close[1] < xATRTrailingStop && Close[0] > xATRTrailingStop))
     {
      xATRTrailingStop = MathMax(xATRTrailingStop[1], Close[0] - nLoss);
     }
   else
      if(Close[1] > xATRTrailingStop && Close[0] < xATRTrailingStop)
        {
         xATRTrailingStop = MathMin(xATRTrailingStop[1], Close[0] + nLoss);
        }
      else
        {
         if(Close[0] > xATRTrailingStop)
           {
            xATRTrailingStop = Close[0] - nLoss;
           }
         else
           {
            xATRTrailingStop = Close[0] + nLoss;
           }
        }

// Check for entry signal
   if(Close[1] < xATRTrailingStop && Close[0] > xATRTrailingStop)
     {
      if(PositionsTotal() == 0)
        {
         // Open Buy Order
         double stopLoss = xATRTrailingStop - nLoss;
         double takeProfit = xATRTrailingStop + Take_Profit * _Point;
         OrderSend(_Symbol, OP_BUY, Lot_Size, Ask, 3, stopLoss, takeProfit, "Buy Order", 0, 0, CLR_GREEN);
        }
     }
   else
      if(Close[1] > xATRTrailingStop && Close[0] < xATRTrailingStop)
        {
         if(PositionsTotal() == 0)
           {
            // Open Sell Order
            double stopLoss = xATRTrailingStop + nLoss;
            double takeProfit = xATRTrailingStop - Take_Profit * _Point;
            OrderSend(_Symbol, OP_SELL, Lot_Size, Bid, 3, stopLoss, takeProfit, "Sell Order", 0, 0, CLR_RED);
           }
        }

// Check for exit signal
   if(PositionsTotal() > 0)
     {
      if(Close[1] > xATRTrailingStop && Close[0] < xATRTrailingStop && PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
        {
         // Close Buy Order
         OrderClose(PositionGetTicket(0), Lot_Size, Bid, 3, CLR_GREEN);
        }
      //+------------------------------------------------------------------+

      //+------------------------------------------------------------------+

I NEED TO DEBUG THIS CODE 

Archivos adjuntos:

Han respondido

1
Desarrollador 1
Evaluación
(201)
Proyectos
327
17%
Arbitraje
23
35% / 30%
Caducado
17
5%
Ocupado
2
Desarrollador 2
Evaluación
(568)
Proyectos
641
41%
Arbitraje
21
57% / 29%
Caducado
47
7%
Trabaja
3
Desarrollador 3
Evaluación
(3)
Proyectos
3
33%
Arbitraje
0
Caducado
0
Libre
4
Desarrollador 4
Evaluación
(57)
Proyectos
72
22%
Arbitraje
13
46% / 15%
Caducado
5
7%
Libre
5
Desarrollador 5
Evaluación
(71)
Proyectos
80
10%
Arbitraje
36
8% / 53%
Caducado
6
8%
Trabaja
6
Desarrollador 6
Evaluación
(1131)
Proyectos
1433
62%
Arbitraje
21
57% / 10%
Caducado
43
3%
Libre
7
Desarrollador 7
Evaluación
(12)
Proyectos
19
26%
Arbitraje
4
25% / 25%
Caducado
1
5%
Libre
8
Desarrollador 8
Evaluación
(467)
Proyectos
702
56%
Arbitraje
44
30% / 32%
Caducado
115
16%
Trabaja
9
Desarrollador 9
Evaluación
(474)
Proyectos
536
33%
Arbitraje
27
41% / 44%
Caducado
8
1%
Ocupado
10
Desarrollador 10
Evaluación
(3)
Proyectos
4
0%
Arbitraje
0
Caducado
1
25%
Libre
Solicitudes similares
Using 3 MA’s, Bollinger Bands and price action, I need an EA made for mt4 and mt5 (preferably) should have good knowledge of forex, risk management and candle stick patterns, and how to incorporate them in the codes. I need a very efficient code. * For the price, I just out anything there, but if you can do it I’ll pay the negotiated price*
Hello programmers, I'm looking for a skilled and knowledgeable programmer that can code me a Signals copier EA that takes the signals from Telegram channels. The program needs to feature the following settings: Signal format (Entry, TP and SL prices); Choose between multiple TP/SL levels with partial closure at each level; Add/Remove random points to TP and SL; Enter with random delay (with option to enter only if
Estoy buscando un desarrollador que pueda crear un indicador especializado para el mercado Boom 1000. El indicador debe ser capaz de detectar y señalar con precisión el momento exacto en que se produce un "spike" o una ráfaga de spikes en el mercado. Características clave que necesito: Detección precisa de spikes: El indicador debe ser capaz de identificar la aparición de un spike de manera oportuna y fiable. Alertas
need hedging grid EA for MT5 with these properties: continues to open a buy and a sell trade simultaneously at the same price after a specific points move. (the points should be set in input) Hits TP for each trade after specific price (should be set in input) If a buy trade hits its TP and is closed, it should open a buy trade again at the same price where the closed buy trade was opened, whereas the sell trade
Kagi Chart on MT4 50 - 100 USD
Hello, I need a developer who can develop new indicator for mt4 in order to have Kagi Chart on Meta Trader 4. I found this indicator from current web site but it can not load history as well. Please some body help me. If you can develop it for motivewave platform so let me know. Thanks
My requirements are these. I am asking for a powerful EA indicator and robot to combat the ups and downs during trading in the market, also for all market conditions to bring a high value of profit in the business in the market during trading
I wish to add a customisable varying pipstep as martingale takes deeper trades in. I have a current EA that I am happy with , apart from that is has a pipstep rate that you can only control them all with. I’m finding if I put it to 300 it is much safer and of course spreads out the open martingale trades better for market trend runaways, but I am missing the fast $1 TP scalping turnarounds (normally 120 pipstep)
I want to create an EA where we have impulse Candle with big body close and the next candle is a red candle. I want to take a buy order when there is a break of the high of the candle for long with 1:1.5 RR and the Stoploss is setup below the low. Please see the screenshots attached for long and short trades and let me know how you will implement it. I will need to have inputs for Risk% or static lots, RR changes
I want to create an EA MT5 that can 1. identify support and resistance (based on close candles) 2. mark snr breakout 3. multitimeframe breakout scanner 4. scan the valid setup that appears 5. available for manual marking, INFO SPREAD & TIME NEXT BAR 6. sends alert notification to Telegram I need a professional and experienced developer with fast and good work according to what I want. if you are interested I will
Hola, me gustaría solicitar la duplicación de un indicador que ya utilizo en MetaTrader 5, desarrollado en lenguaje MQL5. La idea es tener una copia idéntica del indicador existente, estaré dejando una imagen a continuación para qué se guíen

Información sobre el proyecto

Presupuesto
30+ USD
IVA (19%): 5.7 USD
Total: 35.7 USD
Para el ejecutor
27 USD