EA that logs in and sends orders

指定

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% / 88%
逾期
0
空闲
4
开发者 4
等级
(600)
项目
676
41%
仲裁
2
100% / 0%
逾期
1
0%
空闲
发布者: 9 代码
5
开发者 5
等级
(298)
项目
477
40%
仲裁
105
40% / 24%
逾期
81
17%
已载入
发布者: 2 代码
6
开发者 6
等级
(11)
项目
17
59%
仲裁
2
0% / 100%
逾期
2
12%
空闲
相似订单
(Please read carefully to fully understand the job) I am looking for a developer who has real knowledge in HFT strategies and the ability to create an EA that can run on a real account and be profitable. I already have an EA that performs well on a demo account, but not on a real account. This EA can be used as an example to build a new strategy. I repeat: it should only be used as a reference, not to modify or
Desenvolvi um script com ajuda de IA, para operar uma carteira de uma casa de análise, onde basicamente quero comprar ou vender, um ou mais ativos no leilão ou abertura de mercado, onde eu escolho os ativos, e opero em paralelo com o python metatrader 5 na operadora RICO, desenvolvi 3 modos de operação, Leilão, Agressão e Leilão + Agressão, onde basicamente eu tento limitar um preço de acordo com o preço de

项目信息

预算
30 - 500 USD
截止日期
 1  10 天