Need errors to be fixed on my mql5 language mt5 code

Specification

this is not the whole code though(//+------------------------------------------------------------------+
//|                                                        Trade.mqh |
//|                             Copyright 2000-2024, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#include <Object.mqh>
#include "OrderInfo.mqh"
#include "HistoryOrderInfo.mqh"
#include "PositionInfo.mqh"
#include "DealInfo.mqh"
#include <Trade\Trade.mqh>

//+------------------------------------------------------------------+
//| enumerations                                                     |
//+------------------------------------------------------------------+
enum ENUM_LOG_LEVELS
{
    LOG_LEVEL_NO = 0,
    LOG_LEVEL_ERRORS = 1,
    LOG_LEVEL_ALL = 2
};

//+------------------------------------------------------------------+
//| Class CTrade.                                                    |
//| Appointment: Class trade operations.                             |
//|              Derives from class CObject.                         |
//+------------------------------------------------------------------+
class CTrade : public CObject
{
protected:
    MqlTradeRequest m_request;              // request data
    MqlTradeResult m_result;                 // result data
    MqlTradeCheckResult m_check_result;      // result check data
    bool m_async_mode;                      // trade mode
    ulong m_magic;                           // expert magic number
    ulong m_deviation;                      // deviation default
    ENUM_ORDER_TYPE_FILLING m_type_filling;
    ENUM_ACCOUNT_MARGIN_MODE m_margin_mode;
    //---
    ENUM_LOG_LEVELS m_log_level;

public:
    CTrade(void);
    ~CTrade(void);
    //--- methods of access to protected data
    void LogLevel(const ENUM_LOG_LEVELS log_level) { m_log_level = log_level; }
    void Request(MqlTradeRequest &m_request) const;
    ENUM_TRADE_REQUEST_ACTIONS RequestAction(void) const { return (m_request.action); }
    string RequestActionDescription(void) const;
    ulong RequestMagic(void) const { return (m_request.magic); }
    ulong RequestOrder(void) const { return (m_request.order); }
    ulong RequestPosition(void) const { return (m_request.position); }
    ulong RequestPositionBy(void) const { return (m_request.position_by); }
    string RequestSymbol(void) const { return (m_request.symbol); }
    double RequestVolume(void) const { return (m_request.volume); }
    double RequestPrice(void) const { return (m_request.price); }
    double RequestStopLimit(void) const { return (m_request.stoplimit); }
    double RequestSL(void) const { return (m_request.sl); }
    double RequestTP(void) const { return (m_request.tp); }
    ulong RequestDeviation(void) const { return (m_request.deviation); }
    ENUM_ORDER_TYPE RequestType(void) const { return (m_request.type); }
    string RequestTypeDescription(void) const;
    ENUM_ORDER_TYPE_FILLING RequestTypeFilling(void) const { return (m_request.type_filling); }
    string RequestTypeFillingDescription(void) const;
    ENUM_ORDER_TYPE_TIME RequestTypeTime(void) const { return (m_request.type_time); }
    string RequestTypeTimeDescription(void) const;
    datetime RequestExpiration(void) const { return (m_request.expiration); }
    string RequestComment(void) const { return (m_request.comment); }
    //---
    void Result(MqlTradeResult &m_result) const;
    uint ResultRetcode(void) const { return (m_result.retcode); }
    string ResultRetcodeDescription(void) const;
    int ResultRetcodeExternal(void) const { return (m_result.retcode_external); }
    ulong ResultDeal(void) const { return (m_result.deal); }
    ulong ResultOrder(void) const { return (m_result.order); }
    double ResultVolume(void) const { return (m_result.volume); }
    double ResultPrice(void) const { return (m_result.price); }
    double ResultBid(void) const { return (m_result.bid); }
    double ResultAsk(void) const { return (m_result.ask); }
    string ResultComment(void) const { return (m_result.comment); }
    //---
    void CheckResult(MqlTradeCheckResult &m_check_result) const;
    uint CheckResultRetcode(void) const { return (m_check_result.retcode); }
    string CheckResultRetcodeDescription(void) const;
    double CheckResultBalance(void) const { return (m_check_result.balance); }
    double CheckResultEquity(void) const { return (m_check_result.equity); }
    double CheckResultProfit(void) const { return (m_check_result.profit); }
    double CheckResultMargin(void) const { return (m_check_result.margin); }
    double CheckResultMarginFree(void) const { return (m_check_result.margin_free); }
    double CheckResultMarginLevel(void) const { return (m_check_result.margin_level); }
    string CheckResultComment(void) const { return (m_check_result.comment); }
    //--- trade methods
    void SetAsyncMode(const bool mode) { m_async_mode = mode; }
    void SetExpertMagicNumber(const ulong magic) { m_magic = magic; }
    void SetDeviationInPoints(const ulong deviation) { m_deviation = deviation; }
    void SetTypeFilling(const ENUM_ORDER_TYPE_FILLING filling) { m_type_filling = filling; }
    bool SetTypeFillingBySymbol(const string symbol);
    void SetMarginMode(void) { m_margin_mode = (ENUM_ACCOUNT_MARGIN_MODE)AccountInfoInteger(ACCOUNT_MARGIN_MODE); }
    //--- methods for working with positions
    bool PositionOpen(const string symbol, const ENUM_ORDER_TYPE order_type, const double volume,
                      const double price, const double sl, const double tp, const string comment = "");
    bool PositionModify(const string symbol, const double sl, const double tp);
    bool PositionModify(const ulong ticket, const double sl, const double tp);
    bool PositionClose(const string symbol, const ulong deviation = ULONG_MAX);
    bool PositionClose(const ulong ticket, const ulong deviation = ULONG_MAX);
    bool PositionCloseBy(const ulong ticket, const ulong ticket_by);
    bool PositionClosePartial(const string symbol, const double volume, const ulong deviation = ULONG_MAX);
    bool PositionClosePartial(const ulong ticket, const double volume, const ulong deviation = ULONG_MAX);
    //--- methods for working with pending orders
    bool OrderOpen(const string symbol, const ENUM_ORDER_TYPE order_type, const double volume,
                   const double limit_price, const double price, const double sl, const double tp,
                   ENUM_ORDER_TYPE_TIME type_time = ORDER_TIME_GTC, const datetime expiration = 0,
                   const string comment = "");
    bool OrderModify(const ulong ticket, const double price, const double sl, const double tp,
                     const ENUM_ORDER_TYPE_TIME type_time, const datetime expiration, const double stoplimit = 0.0);
    bool OrderDelete(const ulong ticket);
    //--- additions methods
    bool Buy(const double volume, const string symbol = NULL, double price = 0.0, const double sl = 0.0, const double tp = 0.0, const string comment = "");
    bool Sell(const double volume, const string symbol = NULL, double price = 0.0, const double sl = 0.0, const double tp = 0.0, const string comment = "");
    bool BuyLimit(const double volume, const double price, const string symbol = NULL, const double sl = 0.0, const double tp = 0.0,
                  const ENUM_ORDER_TYPE_TIME type_time = ORDER_TIME_GTC, const datetime expiration = 0, const string comment = "");
    bool BuyStop(const double volume, const double price, const string symbol = NULL, const double sl = 0.0, const double tp = 0.0,
                 const ENUM_ORDER_TYPE_TIME type_time = ORDER_TIME_GTC, const datetime expiration = 0, const string comment = "");
    bool SellLimit(const double volume, const double price, const string symbol = NULL, const double sl = 0.0, const double tp = 0.0,
                   const ENUM_ORDER_TYPE_TIME type_time = ORDER_TIME_GTC, const datetime expiration = 0, const string comment = "");
    bool SellStop(const double volume, const double price, const string symbol = NULL, const double sl = 0.0, const double tp = 0.0,
                  const ENUM_ORDER_TYPE_TIME type_time = ORDER_TIME_GTC, const datetime expiration = 0, const string comment = "");
    //--- method check
    double CheckVolume(const string symbol, double volume, double price, ENUM_ORDER_TYPE order_type);
    bool OrderCheck(const MqlTradeRequest &m_request, MqlTradeCheckResult &m_check_result);
    bool OrderSend(const MqlTradeRequest &m_request, MqlTradeResult &m_result);
    //--- info methods
    void PrintRequest(void) const;
    void PrintResult(void) const;
    //--- positions
    string FormatPositionType(string &str, const uint type) const;
    //--- orders
    string FormatOrderType(string &str, const uint type) const;
    string FormatOrderStatus(string &str, const uint status) const;
    string FormatOrderTypeTime(string &str, const uint type) const;
   string            FormatOrderPrice(string &str,const double price_order,const double price_trigger,const uint digits) const;
   //--- trade request
   string            FormatRequest(string &str,const MqlTradeRequest &m_request) const;
   string            FormatRequestResult(string &str,const MqlTradeRequest &m_request,const MqlTradeResult &m_result) const;
//--- trade result description
    string GetRetcodeDescription(const int code);
    //--- helpers
    double RoundToStep(double value, const string symbol);
    double GetRisk(double volume, double entry, double sl, string symbol);
protected:
   bool              FillingCheck(const string symbol);
   bool              ExpirationCheck(const string symbol);
   bool              OrderTypeCheck(const string symbol);
   void              ClearStructures(void);
   bool              IsStopped(const string function);
   bool              IsHedging(void) const { return(m_margin_mode==ACCOUNT_MARGIN_MODE_RETAIL_HEDGING); }
   //--- position select depending on netting or hedging
   bool              SelectPosition(const string symbol);
  };
//+------------------------------------------------------------------+
//| Constructor                                                      |
//+------------------------------------------------------------------+
CTrade::CTrade(void) : m_async_mode(false),
                       m_magic(0),
                       m_deviation(10),
                       m_type_filling(ORDER_FILLING_FOK),
                       m_log_level(LOG_LEVEL_ERRORS)
  {
   SetMarginMode();
//--- initialize protected data
   ClearStructures();
//--- check programm mode
   if(MQL5InfoInteger(MQL5_TESTING))
      m_log_level=LOG_LEVEL_ALL;
   if(MQL5InfoInteger(MQL5_OPTIMIZATION))
      m_log_level=LOG_LEVEL_NO;
  }
//+------------------------------------------------------------------+
//| Destructor                                                       |
//+------------------------------------------------------------------+
CTrade::~CTrade(void)
  {
  }
// Placeholder function definitions (assuming these return strings and take no parameters)

// Returns a string for the request action
string FormatRequest()
{
   return "Request Action";
}

// Returns a string for the order type
string FormatOrderType() 
{
   return "Order Type";
}

// Returns a string for the order type filling
string FormatOrderTypeFilling()
{
   return "Order Type Filling";
}

// Returns a string for the order type time
string FormatOrderTypeTime()
{
   return "Order Type Time";
}

// Returns a string for the request result
string FormatRequestResult()
{
   return "Request Result";
}

//+------------------------------------------------------------------+ 
//| Get the request structure                                        |
//+------------------------------------------------------------------+
void Request(MqlTradeRequest &m_request)
{
   m_request.action      = m_request.action;
   m_request.magic       = m_request.magic;
   m_request.order       = m_request.order;
   m_request.symbol      = m_request.symbol;
   m_request.volume      = m_request.volume;
   m_request.price       = m_request.price;
   m_request.stoplimit   = m_request.stoplimit;
   m_request.sl          = m_request.sl;
   m_request.tp          = m_request.tp;
   m_request.deviation   = m_request.deviation;
   m_request.type        = m_request.type;
   m_request.type_filling = m_request.type_filling;
   m_request.type_time   = m_request.type_time;
   m_request.expiration  = m_request.expiration;
   m_request.comment     = m_request.comment;
   m_request.position    = m_request.position;
   m_request.position_by = m_request.position_by;
}

//+------------------------------------------------------------------+
//| Get the trade action as string                                   |
//+------------------------------------------------------------------+
string RequestActionDescription(void)
{
   return FormatRequest(); // Calls FormatRequest to get action description
}

//+------------------------------------------------------------------+
//| Get the order type as string                                     |
//+------------------------------------------------------------------+
string RequestTypeDescription(void)
{
   return FormatOrderType(); // Calls FormatOrderType to get type description
}

//+------------------------------------------------------------------+
//| Get the order type filling as string                             |
//+------------------------------------------------------------------+
string RequestTypeFillingDescription(void)
{
   return FormatOrderTypeFilling(); // Calls FormatOrderTypeFilling to get filling description
}

//+------------------------------------------------------------------+
//| Get the order type time as string                                |
//+------------------------------------------------------------------+
string RequestTypeTimeDescription(void)
{
   return FormatOrderTypeTime(); // Calls FormatOrderTypeTime to get time description
}

//+------------------------------------------------------------------+
//| Get the result structure                                         |
//+------------------------------------------------------------------+
void Result(MqlTradeResult &m_result)
{
   m_result.retcode         = m_result.retcode;
   m_result.deal            = m_result.deal;
   m_result.order           = m_result.order;
   m_result.volume          = m_result.volume;
   m_result.price           = m_result.price;
   m_result.bid             = m_result.bid;
   m_result.ask             = m_result.ask;
   m_result.comment         = m_result.comment;
   m_result.request_id      = m_result.request_id;
   m_result.retcode_external = m_result.retcode_external;
}

//+------------------------------------------------------------------+
//| Get the retcode value as string                                  |
//+------------------------------------------------------------------+
string ResultRetcodeDescription(void)
{
   return FormatRequestResult(); // Calls FormatRequestResult to get retcode description
}

//+------------------------------------------------------------------+
//| Get the check result structure                                   |
//+------------------------------------------------------------------+
void CheckResult(MqlTradeCheckResult &m_check_result)
{
   m_check_result.retcode     = m_check_result.retcode;
   m_check_result.balance     = m_check_result.balance;
   m_check_result.equity      = m_check_result.equity;
   m_check_result.profit      = m_check_result.profit;
   m_check_result.margin      = m_check_result.margin;
   m_check_result.margin_free = m_check_result.margin_free;
   m_check_result.margin_level = m_check_result.margin_level;
   m_check_result.comment     = m_check_result.comment;
}

//+------------------------------------------------------------------+
//| Get the check retcode value as string                            |
//+------------------------------------------------------------------+
string CheckResultRetcodeDescription(void)
{
   return FormatRequestResult(); // Calls FormatRequestResult to get check retcode description
}

//+------------------------------------------------------------------+
//| Open position                                                    |
//+------------------------------------------------------------------+
bool CTrade::PositionOpen(const string symbol, const ENUM_ORDER_TYPE order_type, const double volume,
                          const double price, const double sl, const double tp, const string comment)
{
   //--- check stopped
   if (IsStopped(__FUNCTION__))
      return(false);
   //--- clean
   ClearStructures();
   //--- check
   if (order_type != ORDER_TYPE_BUY && order_type != ORDER_TYPE_SELL)
   {
      m_result.retcode = TRADE_RETCODE_INVALID;
      m_result.comment = "Invalid order type";
      return(false);
   }
   //--- setting request
   m_request.action = TRADE_ACTION_DEAL;
   m_request.symbol = symbol;
   m_request.magic = m_magic;
   m_request.volume = volume;
   m_request.type = order_type;
   m_request.price = price;
   m_request.sl = sl;
   m_request.tp = tp;
   m_request.deviation = m_deviation;
   //--- check order type
   if (!OrderTypeCheck(symbol))
      return(false);
   //--- check filling
   if (!FillingCheck(symbol))
      return(false);
   m_request.comment = comment;
   //--- action and return the result
   return(OrderSend(m_request, m_result));
}
//+------------------------------------------------------------------+
//| Modify specified opened position                                 |
//+------------------------------------------------------------------+
bool CTrade::PositionModify(const string symbol, const double sl, const double tp)
{
   //--- check stopped
   if (IsStopped(__FUNCTION__))
      return(false);
   //--- check position existence
   if (!SelectPosition(symbol))
      return(false);
   //--- clean
   ClearStructures();
   //--- setting request
   m_request.action = TRADE_ACTION_SLTP;
   m_request.symbol = symbol;
   m_request.magic = m_magic;
   m_request.sl = sl;
   m_request.tp = tp;
   m_request.position = PositionGetInteger(POSITION_TICKET);
   //--- action and return the result
   return(OrderSend(m_request, m_result));
}
//+------------------------------------------------------------------+
//| Modify specified opened position                                 |
//+------------------------------------------------------------------+
bool CTrade::PositionModify(const ulong ticket, const double sl, const double tp)
{
   //--- check stopped
   if (IsStopped(__FUNCTION__))
      return(false);
   //--- check position existence
   if (!PositionSelectByTicket(ticket))
      return(false);
   //--- clean
   ClearStructures();
   //--- setting request
   m_request.action = TRADE_ACTION_SLTP;
   m_request.position = ticket;
   m_request.symbol = PositionGetString(POSITION_SYMBOL);
   m_request.magic = m_magic;
   m_request.sl = sl;
   m_request.tp = tp;
   //--- action and return the result
   return(OrderSend(m_request, m_result));
}
//+------------------------------------------------------------------+
//| Close specified opened position                                  |
//+------------------------------------------------------------------+
bool CTrade::PositionClose(const string symbol, const ulong deviation)
{
   bool partial_close = false;
   int retry_count = 10;
   uint retcode = TRADE_RETCODE_REJECT;
   //--- check stopped
   if (IsStopped(__FUNCTION__))
      return(false);
   //--- clean
   ClearStructures();
   //--- check filling
   if (!FillingCheck(symbol))
      return(false);
   do
   {
      //--- check
      if (SelectPosition(symbol))
      {
         if ((ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
         {
            //--- prepare request for close BUY position
            m_request.type = ORDER_TYPE_SELL;
            m_request.price = SymbolInfoDouble(symbol, SYMBOL_BID);
         }
         else
         {
            //--- prepare request for close SELL position
            m_request.type = ORDER_TYPE_BUY;
            m_request.price = SymbolInfoDouble(symbol, SYMBOL_ASK);
         }
      }
      else
      {
         //--- position not found
         m_result.retcode = retcode;
         return(false);
      }
      //--- setting request
      m_request.action = TRADE_ACTION_DEAL;
      m_request.symbol = symbol;
      m_request.volume = PositionGetDouble(POSITION_VOLUME);
      m_request.magic = m_magic;
      m_request.deviation = (deviation == ULONG_MAX) ? m_deviation : deviation;
      m_request.position = PositionGetInteger(POSITION_TICKET);
      //--- check volume
      double max_volume = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MAX);
      if (m_request.volume > max_volume)
      {
         m_request.volume = max_volume;
         partial_close = true;
      }
      else
         partial_close = false;
      //--- hedging? just send order
      if (IsHedging())
         return(OrderSend(m_request, m_result));
      //--- order send
      if (!OrderSend(m_request, m_result))
      {
         if (--retry_count != 0)
            continue;
         if (retcode == TRADE_RETCODE_DONE_PARTIAL)
            m_result.retcode = retcode;
         return(false);
      }
      //--- WARNING. If position volume exceeds the maximum volume allowed for deal,
      //--- and when the asynchronous trade mode is on, for safety reasons, position is closed not completely,
      //--- but partially. It is decreased by the maximum volume allowed for deal.
      if (m_async_mode)
         break;
      retcode = TRADE_RETCODE_DONE_PARTIAL;
      if (partial_close)
         Sleep(1000);
   }
   while (partial_close);
   //--- succeed
   return(true);
}

//+------------------------------------------------------------------+
//| Close specified opened position                                  |
//+------------------------------------------------------------------+
bool CTrade::PositionClose(const ulong ticket, const ulong deviation)
{
   //--- check stopped
   if(IsStopped(__FUNCTION__))
      return(false);
   //--- check position existence
   if(!PositionSelectByTicket(ticket))
      return(false);
   string symbol = PositionGetString(POSITION_SYMBOL);
   //--- clean
   ClearStructures();
   //--- check filling
   if(!FillingCheck(symbol))
      return(false);
   //--- check position type
   if((ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
   {
      //--- prepare request for close BUY position
      m_request.type = ORDER_TYPE_SELL;
      m_request.price = SymbolInfoDouble(symbol, SYMBOL_BID);
   }
   else
   {
      //--- prepare request for close SELL position
      m_request.type = ORDER_TYPE_BUY;
      m_request.price = SymbolInfoDouble(symbol, SYMBOL_ASK);
   }
   //--- setting request
   m_request.action = TRADE_ACTION_DEAL;
   m_request.position = ticket;
   m_request.symbol = symbol;
   m_request.volume = PositionGetDouble(POSITION_VOLUME);
   m_request.magic = m_magic;
   m_request.deviation = (deviation == ULONG_MAX) ? m_deviation : deviation;
   //--- close position
   return(OrderSend(m_request, m_result));
}

//+------------------------------------------------------------------+
//| Close one position by other                                      |
//+------------------------------------------------------------------+
bool CTrade::PositionCloseBy(const ulong ticket, const ulong ticket_by)
{
   //--- check stopped
   if(IsStopped(__FUNCTION__))
      return(false);
   //--- check hedging mode
   if(!IsHedging())
      return(false);
   //--- check position existence
   if(!PositionSelectByTicket(ticket))
      return(false);
   string symbol = PositionGetString(POSITION_SYMBOL);
   ENUM_POSITION_TYPE type = (ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE);
   if(!PositionSelectByTicket(ticket_by))
      return(false);
   string symbol_by = PositionGetString(POSITION_SYMBOL);
   ENUM_POSITION_TYPE type_by = (ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE);
   //--- check positions
   if(type == type_by)
      return(false);
   if(symbol != symbol_by)
      return(false);
   //--- clean
   ClearStructures();
   //--- check filling
   if(!FillingCheck(symbol))
      return(false);
   //--- setting request
   m_request.action = TRADE_ACTION_CLOSE_BY;
   m_request.position = ticket;
   m_request.position_by = ticket_by;
   m_request.magic = m_magic;
   //--- close position
   return(OrderSend(m_request, m_result));
}

//+------------------------------------------------------------------+
//| Partial close specified opened position (for hedging mode only)  |
//+------------------------------------------------------------------+
bool CTrade::PositionClosePartial(const string symbol, const double volume, const ulong deviation)
{
   uint retcode = TRADE_RETCODE_REJECT;
   //--- check stopped
   if(IsStopped(__FUNCTION__))
      return(false);
   //--- for hedging mode only
   if(!IsHedging())
      return(false);
   //--- clean
   ClearStructures();
   //--- check filling
   if(!FillingCheck(symbol))
      return(false);
   //--- check position
   if(SelectPosition(symbol))
   {
      if((ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
      {
         //--- prepare request for close BUY position
         m_request.type = ORDER_TYPE_SELL;
         m_request.price = SymbolInfoDouble(symbol, SYMBOL_BID);
      }
      else
      {
         //--- prepare request for close SELL position
         m_request.type = ORDER_TYPE_BUY;
         m_request.price = SymbolInfoDouble(symbol, SYMBOL_ASK);
      }
   }
   else
   {
      //--- position not found
      m_result.retcode = retcode;
      return(false);
   }
   //--- check volume
   double position_volume = PositionGetDouble(POSITION_VOLUME);
   if(position_volume > volume)
      position_volume = volume;
   //--- setting request
   m_request.action = TRADE_ACTION_DEAL;
   m_request.symbol = symbol;
   m_request.volume = position_volume;
   m_request.magic = m_magic;
   m_request.deviation = (deviation == ULONG_MAX) ? m_deviation : deviation;
   m_request.position = PositionGetInteger(POSITION_TICKET);
   //--- hedging? just send order
   return(OrderSend(m_request, m_result));
}

//+------------------------------------------------------------------+
//| Partial close specified opened position (for hedging mode only)  |
//+------------------------------------------------------------------+
bool CTrade::PositionClosePartial(const ulong ticket, const double volume, const ulong deviation)
{
   //--- check stopped
   if(IsStopped(__FUNCTION__))
      return(false);
   //--- for hedging mode only
   if(!IsHedging())
      return(false);
   //--- check position existence
   if(!PositionSelectByTicket(ticket))
      return(false);
   string symbol = PositionGetString(POSITION_SYMBOL);
   //--- clean
   ClearStructures();
   //--- check filling
   if(!FillingCheck(symbol))
      return(false);
   //--- check position type
   if((ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
   {
      //--- prepare request for close BUY position
      m_request.type = ORDER_TYPE_SELL;
      m_request.price = SymbolInfoDouble(symbol, SYMBOL_BID);
   }
   else
   {
      //--- prepare request for close SELL position
      m_request.type = ORDER_TYPE_BUY;
      m_request.price = SymbolInfoDouble(symbol, SYMBOL_ASK);
   }
   //--- check volume
   double position_volume = PositionGetDouble(POSITION_VOLUME);
   if(position_volume > volume)
      position_volume = volume;
   //--- setting request
   m_request.action = TRADE_ACTION_DEAL;
   m_request.position = ticket;
   m_request.symbol = symbol;
   m_request.volume = position_volume;
   m_request.magic = m_magic;
   m_request.deviation = (deviation == ULONG_MAX) ? m_deviation : deviation;
   //--- close position
   return(OrderSend(m_request, m_result));
}
)


Responded

1
Developer 1
Rating
(70)
Projects
99
52%
Arbitration
24
21% / 54%
Overdue
8
8%
Working
2
Developer 2
Rating
(240)
Projects
301
28%
Arbitration
33
24% / 61%
Overdue
9
3%
Working
3
Developer 3
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
4
Developer 4
Rating
(8)
Projects
7
0%
Arbitration
3
0% / 100%
Overdue
2
29%
Free
Similar orders
My expert already has the rest of the required features implemented . Bring in your support and resistance expert to save time . My expert already has money management , session filter etc . Trailing is threshold based . Please send a picture as well to show your expert on a live chart . Most specific is the 5m tf , to 1m execution
Ai bot 100 - 300 USD
I’m looking for one person who is both a Forex trader and a programmer . I don’t want a coder who only writes code without understanding the market, and I don’t want a trader who can’t program. I want someone who actively trades and understands market behavior, liquidity, volatility, and risk management. Most importantly, the bot must be built using real artificial intelligence that learns and adapts , not just
can anyone help me with building a complete automated pine code strategy and indicator that work for both FXs & CFDs and have a high winning rate proved through back testing. I have a very complex current code that developed mostly using AI but lots of gaps are there although it translate exactly what I have in my mind. So, you are free to decide whether wo build a complete new code or fix my current working code ( i
Project Title: Convert Pinescript TradingView Strategy to MQL5 to EA bot Project Description: I am looking for an experienced MQL5 developer to convert a TradingView Pine Script strategy into a fully automated MetaTrader 5 Expert Advisor (EA). The goal is to have an identical replication of the strategy logic and backtest results. Key Requirements: Logic Conversion: Translate all Pine Script indicators, entry
Hello, I have the code for an indicator file that works with binary options. I want to make a simple modification to it that won't take much effort for professionals. In short, the modification I want is that if the strategy's conditions are met, a buy or sell signal should appear at 17:55. The strategy works exclusively on the 5-minute timeframe, and I want to delay the signal by 7 minutes so that it appears and
描述(项目概述): 我需要为 MetaTrader 5 平台开发一个功能完整的智能交易系统( 专家顾问 ),用于交易 XAUUSD (伦敦金)。该 艺电 的核心是基于一份详细的技术规格书,实现一个多指标共振、多层条件过滤的短线反转策略。 1. 核心策略逻辑简述: 交易品种与周期:主交易周期为 M30 ,需在代码内部动态读取 H4 周期进行趋势过滤,并监控 M5 周期以执行复杂的出场逻辑。 入场机制:采用 “ 价格触发 -> 成交量确认 -> 多指标渐进式达标 ” 的严格流程。入场信号需在特定时间窗口内,同时满足布林带突破及 5 个动量指标( CCI、RSI、MFI, 威廉指标, 随机指标)的超买 / 超卖条件,并受 H4 级别趋势过滤器约束。 出场机制:采用三层递进逻辑,包括动态保本移动、 M5 周期指标集体反转信号以及基于 K 线形态的趋势反转终极止损。
SMC, etc.) - Backtest results and the set files you used - Whether you’re willing to make minor tweaks so I can use it as my own If the performance looks good, we can discuss adjustments and next steps. My requirements are screenshot, backtes results, demo fileS Let me know if you have anything that fits the bill
iF you already have an successful MT4 EA for scalping in M5 XAUUSD [and eventually EURUSD and USDJPY] working essentially ON the trend when there is an Break Of Structure but also on reversal eventually with strategy Martingale with param ON/OFF eventually with strategy Grid with param ON/OFF eventually with HEDGING with param ON/OFF and on each trade : Stop loss, Trailing sl without High Frequency Trades [means
Hi all, I would like to get a bot that trades based on a Tradingview indicator. The indicator is called sniper entries. It is very simple. If the indicator says "BUY" then the EA buys, if the indicator says "SELL" then the EA sells. I want the bot to possibly trade forex market pairs like XAUUSD, EURUSD, GBPUSD. Would you please inform me what i need to do to make it possible. I also want the bot to trade on a small
Good day, I am searching the very high level expert, which could create the auto-trade robot and I would like to order the trading robot for GOLD XAU/USD auto-trade on MetaTrader. I could pay a lot for the institutional grade auto-trade robot, just contact me and let me know what level of the robot you could offer and we will negotiate the price

Project information

Budget
30+ USD
Deadline
from 1 to 2 day(s)