Creating A Trading Bot

Specification

//+------------------------------------------------------------------+
//|                                                  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 

Responded

1
Developer 1
Rating
(304)
Projects
469
18%
Arbitration
29
48% / 24%
Overdue
30
6%
Loaded
2
Developer 2
Rating
(568)
Projects
641
41%
Arbitration
23
52% / 30%
Overdue
46
7%
Working
3
Developer 3
Rating
(3)
Projects
3
33%
Arbitration
0
Overdue
0
Free
4
Developer 4
Rating
(57)
Projects
72
22%
Arbitration
13
46% / 15%
Overdue
5
7%
Free
5
Developer 5
Rating
(72)
Projects
80
10%
Arbitration
35
9% / 54%
Overdue
6
8%
Free
6
Developer 6
Rating
(1156)
Projects
1462
63%
Arbitration
21
57% / 10%
Overdue
43
3%
Free
7
Developer 7
Rating
(12)
Projects
19
26%
Arbitration
4
25% / 25%
Overdue
1
5%
Free
8
Developer 8
Rating
(496)
Projects
737
56%
Arbitration
47
32% / 30%
Overdue
116
16%
Working
Published: 1 code
9
Developer 9
Rating
(535)
Projects
613
34%
Arbitration
34
38% / 47%
Overdue
9
1%
Busy
10
Developer 10
Rating
(3)
Projects
4
0%
Arbitration
0
Overdue
1
25%
Free
Similar orders
I need an Expert advisor based on AOX signal . it must have check and handing of trade operation..errors. The main criterin for opening and dosing a position : moving average direction the price is higher than the previous bar Trade lots is input parameter bar
Here's a detailed description of a Trend Following and Mean Reversion strategy-based Expert Advisor (EA): Strategy Overview The EA will implement a hybrid strategy combining trend following and mean reversion techniques. It will identify trending markets, ride the trend, and also capitalize on mean reversion opportunities
Overview Create a MetaTrader 5 (MT5) indicator that: Pulls live sentiment data from multiple broker APIs. Calculates Net Sentiment (Long% – Short%) and plots each broker as a moving average line on the chart. Displays a weighted average line when ≥2 feeds are active. Saves all data to CSV files per broker for efficient historical loading and performance. Supported Brokers Broker Abbr. Color OandaFX
I Have A project done dusted For sale; Title: Strong Reversal Indicator [No Repaint, No Offset, Low Lag] 17 minutes ago MQL5 Indicators Design Forex Trading robot/indicator debugging Strategy optimization Statistics and mathematics Strategy modules Uploading data to a website Specification EN Overview: A professional MT5 reversal indicator designed to detect market turning points with no repainting, no
Manage my live forex account with a disciplined, low-risk approach that produces steady monthly income. My priority is capital protection, so each trade must be sized conservatively, anchored by firm stop-loss orders, and designed to keep drawdown minimal. High-risk tactics such as martingale, grid systems, or excessive leverage are off the table; a measured, rules-based strategy is essential. I will connect the
Indicator that finds zones. All details in word document Ask questions if need I’d also like to to change from finding bullish marker and main candles to bearish marker and main candles if price crosses past inputted price The document is showing zones for bullish price action. Id like to also change manually in setting for it to show bearish price action ( it will look for bullish candle markers and main) Zones
I already have an Expert Advisor coded in MQL4, but it refuses to trade anything other than its hard-coded symbol. I want that filter gone so the same strategy can fire on any instrument—forex, indices, metals such as XAUUSD—across any timeframe. The trading logic, money management and inputs must stay exactly as they are; I simply need universal symbol support. After the MT4 file is fixed and compiles cleanly, I
Description: Gildepak is a purchasing cooperative for packaging materials. We need a program to calculate and fairly distribute the annual bonus (received from preferred suppliers) among our member companies (partners and members). The program should work with a set of predefined tables and data flows, and it must be able to import and export Excel files. Main Tables: Member Companies Company ID Company Name Partner
PLEASE READ: IF YOU ARE NOT GOING TO ACCEPT THE BELOW THEN PLEASE MOVE ON TO THE NEXT CLIENT. I NEED SOMEONE WHO WILL DO THE WORK FIRST AND THEN CREATE A BUILT-IN DEMO INDI AS PER SPECIFICATIONS BELOW WHICH HAS AN EXPIRY (A DAY OR 2) SO THAT I TEST THE INDI BEFORE WE CREATE THE ORDER. I HAVE HAD PEOPLE WHO PRESSURE ME TO CREATE THE ORDER AND THEN THEY END UP DEVELOPING A FAULTY INDICATOR. AND I HAVE GIVEN THEM THE
Fractal Multi-Timeframe Strategy (H4→M15→M2) — Developer Spec Abstract This document specifies a fractal trading workflow leveraging H4 for regime identification, M15 for Area of Value (AoV) location, and M2 for execution using CHoCH-based triggers. The goal is a robust, developer-friendly specification that minimizes ambiguity and matches the operational style already discussed (Liquidity → Order Block →

Project information

Budget
30+ USD
VAT (19%): 5.7 USD
Total: 35.7 USD
For the developer
27 USD