Техническое задание

I've been studying the possibility of developing an EA that connects to other mt5 accounts and "sends" orders from the master account using the login details of the slave accounts, I wrote the code below but I can't compile it and I don't know if it makes sense.


I'm looking for someone to adjust this code and compile this EA


//+------------------------------------------------------------------+
//| Global variables declaration                                      |
//+------------------------------------------------------------------+
input string otherAccountLogin = "";    // Login of the other account
input string otherAccountPassword = ""; // Password of the other account
input string otherAccountServer = "";   // Server of the other account
int otherAccount = 0;                   // Account number of the other account

//+------------------------------------------------------------------+
//| Expert Advisor initialization function                           |
//+------------------------------------------------------------------+
int OnInit()
{
   // Connect to the other account using the provided login, password and server
   otherAccount = AccountOpen(otherAccountLogin, otherAccountPassword, otherAccountServer);
   if(otherAccount == 0)
   {
      Print("Failed to connect to the other account");
      return INIT_FAILED;
   }

   return INIT_SUCCEEDED;
}

//+------------------------------------------------------------------+
//| Expert Advisor tick function                                     |
//+------------------------------------------------------------------+
void OnTick()
{
   // Get the latest trade from the current account
   MqlTradeRequest request;
   MqlTradeResult result;
   if(!AccountTradeLast(request, result))
   {
      Print("Failed to get the latest trade from the current account");
      return;
   }

   // Execute the trade in the other account
   if(!OrderSend(otherAccount, request, result))
   {
      Print("Failed to execute the trade in the other account");
      return;
   }

   Print("Trade replicated in the other account: ", request.symbol, " ", request.action, " ", request.volume);
}


Откликнулись

1
Разработчик 1
Оценка
(186)
Проекты
205
26%
Арбитраж
12
25% / 58%
Просрочено
39
19%
Свободен
2
Разработчик 2
Оценка
(12)
Проекты
16
0%
Арбитраж
0
Просрочено
2
13%
Свободен
3
Разработчик 3
Оценка
(6)
Проекты
8
0%
Арбитраж
8
13% / 75%
Просрочено
0
Работает
4
Разработчик 4
Оценка
(553)
Проекты
627
40%
Арбитраж
2
100% / 0%
Просрочено
1
0%
Свободен
Опубликовал: 9 примеров
5
Разработчик 5
Оценка
(294)
Проекты
469
39%
Арбитраж
100
41% / 23%
Просрочено
77
16%
Загружен
Опубликовал: 2 примера
6
Разработчик 6
Оценка
(11)
Проекты
17
59%
Арбитраж
2
0% / 100%
Просрочено
2
12%
Свободен

Информация о проекте

Бюджет
30 - 500 USD
Сроки выполнения
от 1 до 10 дн.