指定
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
評価
プロジェクト
205
26%
仲裁
12
25%
/
58%
期限切れ
39
19%
暇
2
評価
プロジェクト
16
0%
仲裁
0
期限切れ
2
13%
暇
3
評価
プロジェクト
8
0%
仲裁
8
13%
/
88%
期限切れ
0
暇
4
評価
プロジェクト
642
40%
仲裁
2
100%
/
0%
期限切れ
1
0%
暇
パブリッシュした人: 9 codes
5
評価
プロジェクト
471
39%
仲裁
102
40%
/
24%
期限切れ
78
17%
多忙
パブリッシュした人: 2 codes
6
評価
プロジェクト
17
59%
仲裁
2
0%
/
100%
期限切れ
2
12%
暇
類似した注文
Construção de um EA baseado em um video
30 - 100 USD
Tenho uma foto e video(não deu para anexar) de um robo trabalhando com buy stop e sell stop com indicadores de força e volatilidade. Gostaria de saber se consegue construir um
Robo baseado em estocasticos
50 - 100 USD
Criterios de entrada: 1 stochastico em um tempo gráfico maior, por ex: 1h 1 stochastico em um tempo grafico menor, por ex: 5m *venda: quando o stoch do tempo maior estiver vendido, espera-se o stochastico do tempo menor entrar na zona de overbought e cruzar pra venda, a venda deve ser a mercado na abertura do candle seguinte ao candle que fez o stoch virar pra venda, ou seja a ordem só deve ser aberta quando o candle
プロジェクト情報
予算
30 - 500 USD
締め切り
最低 1 最高 10 日