Auto Master-Slave positions

MQL4 Experts Scripts Forex

Trabalho concluído

Tempo de execução 2 dias
Comentário do cliente
Great job. The EA works like a charm!

Termos de Referência

Hi,

First of all, I'm new to this, so sorry for the lack of technical knowledge and lexique

I am using MT4. I need a robot (script?) to be automatically executed every X seconds (configurable variable into the file, no dialog needed) and do the following:

  • Get the list of open positions that have no comment
  • For each position (let's call it THIS_POSITION):
    • Get the position info symbol and type
    • Get the list of all other open positions with same symbol and type AND having a comment AND that have SL and/or TP
      • If none is found
        • Close THIS_POSITION
      • Else (let's call them ALL_OTHER_POSITIONS)
        • Get the best* SL and TP from ALL_OTHER_POSITIONS
        • Set those safest SL and TP to THIS_POSITION

*best SL and TP:

  • Closest TP from Open Price (and is > Open Price in case of BUY, opposite for SELL)
  • Farthest SL from Open Price (and is < Open Price in case of BUY, opposite for SELL)

I hope I made it clear

Last point, I said it has to be executed every X seconds, but I don't know if there are better ways to achieve the same (if there are event triggers on Current Price, Position Close...)

Please do not hesitate to ask for clarification


Best,

Respondido

1
Desenvolvedor 1
Classificação
(90)
Projetos
136
14%
Arbitragem
43
21% / 28%
Expirado
14
10%
Livre
Publicou: 2 códigos
2
Desenvolvedor 2
Classificação
(885)
Projetos
1410
67%
Arbitragem
123
32% / 41%
Expirado
218
15%
Livre
Publicou: 1 código
3
Desenvolvedor 3
Classificação
(4)
Projetos
4
0%
Arbitragem
1
0% / 100%
Expirado
1
25%
Livre
4
Desenvolvedor 4
Classificação
(145)
Projetos
169
50%
Arbitragem
22
14% / 55%
Expirado
22
13%
Livre
5
Desenvolvedor 5
Classificação
(136)
Projetos
196
43%
Arbitragem
17
29% / 59%
Expirado
28
14%
Livre
6
Desenvolvedor 6
Classificação
(180)
Projetos
283
64%
Arbitragem
3
100% / 0%
Expirado
65
23%
Livre
7
Desenvolvedor 7
Classificação
(45)
Projetos
58
33%
Arbitragem
12
42% / 42%
Expirado
7
12%
Livre
8
Desenvolvedor 8
Classificação
(169)
Projetos
204
30%
Arbitragem
25
40% / 44%
Expirado
12
6%
Livre
9
Desenvolvedor 9
Classificação
(171)
Projetos
195
42%
Arbitragem
13
8% / 54%
Expirado
9
5%
Livre
Publicou: 3 códigos
10
Desenvolvedor 10
Classificação
(67)
Projetos
97
35%
Arbitragem
11
27% / 45%
Expirado
13
13%
Livre
11
Desenvolvedor 11
Classificação
(571)
Projetos
662
32%
Arbitragem
42
45% / 45%
Expirado
12
2%
Trabalhando
12
Desenvolvedor 12
Classificação
(17)
Projetos
33
45%
Arbitragem
1
0% / 100%
Expirado
8
24%
Livre
13
Desenvolvedor 13
Classificação
(271)
Projetos
553
50%
Arbitragem
57
40% / 37%
Expirado
227
41%
Trabalhando
14
Desenvolvedor 14
Classificação
(54)
Projetos
65
52%
Arbitragem
5
40% / 60%
Expirado
22
34%
Trabalhando
Pedidos semelhantes
RSI indicator 130 - 150 USD
The Relative Strength Index (RSI) is a technical momentum indicator measuring the speed and change of price movements, scaled from 0 to 100 to identify overbought (>70) or oversold (<30) conditions. Developed by J. Welles Wilder Jr., it helps traders spot potential trend reversals or corrections.Imagine a stock, XYZ, is trending upwards.Overbought Signal: The price increases sharply, and the RSI rises to 75. This
Close Vol (%N): Closes half (or any percentage you want) of the lot size of your open positions. For example, if you have five open orders of 0.06 lots and want to close half of each, you simply click it, and it will close the specified volume from each individual order. Close Order (%N): Closes half (or any amount you want) of the total number of your open orders. For example, if you have ten open orders and want to
I need a professional MQL5 developer to build a fully automated Expert Advisor (EA) named " Hassanien Daily Breakout ". The EA is based on daily price levels and specific execution times. ​ Technical Specifications: ​ Time Settings (Iraq Time - GMT+3): ​ Execution Time: 10:00 AM. ​ Full Clean-up Time: 10:50 PM (Close all open positions and delete pending orders). ​ Entry Logic: ​ Case 1 (Pending Orders): At 10:00 AM
Articles How to create Requirements Specification for ordering a trading robot 28 MetaQuotes 225 780 Table of Contents Prerequisites for ordering a trading robot Why is it important to have a well-prepared Requirements Specification? Requirements Specification examples What is contained in the Requirements Specification? Where do I get Requirements Specification if I can't create it? Terms to use How to write an
📌 Project Overview: I need a full Smart Trade Management System for MetaTrader 4/5. This is a complete trading ecosystem, not a simple EA. 📌 Core Features: Smart Money Management (risk-based lot calculation) Advanced Trading Toolbox (TradingView-style drawing tools) Central Master Dashboard (risk, filters, account control) Multi-account monitoring (MT4/MT5 synchronization) Real-time monitoring (spread, equity
Hi basically I'm wanting an already made EA scalper that's constantly in and out of trades on the M1 time frame that has good risk management. It knows what it's doing. Most of its trades are profitable and that can start with £100. I am willing to pay up to £1000 for the right scalping bot. If you please have one and you're very confident in it, please allow me to use a live version to see how it does and if I'm
https://youtu.be/mUoczuxL0XE?si=2IzxX4jhML_-4f47&nbsp ; ...... “Secret London Session CRT Model - Insane Accuracy | ICT Secrets.” The model is called London Twilight and focuses on quick scalps near the end of London session. Source summary notes it uses CRT + Turtle Soup + PO3/AMD , mainly between 3:00 AM and 5:00 AM EST/New York time . ( Video Highlight | AI Video Summarizer ) Give your MQL5 coder these rules
Auto trading system on mobile with high probability win rate. Trades and auto trading system that works well on gold and forex, most important risk reward ratio. It must be 1:3 or more then that whenever possible
I want to buy proven profitable EA, any kind of strategy is considerable, working on any forex pairs or XAUUSD. I don't want to build from the scratch, so only apply if you already have profitable EA. Please send your EX4 file in advance with your application (MANDATORY), with additional information as below : - Pair and timeframe to use, minimum initial capital requirement, and so on - Type of EA (scalping, in day
Alert indicator 30+ USD
I want an alert indicator using moving average and another one is customized indicator, but i don't have it's source file. is it possible? if yes let me know we will discuss further

Informações sobre o projeto

Orçamento
100+ USD
Prazo
de 3 para 5 dias