Script for placing a pending order when reaching a pre-set price level for MT5

MQL5 Scripts

Termos de Referência

I will first describe the process step by step:
We have a current price of the GBP / JPY pair, for example (Bid 156.97 / Ask 156.99). At this current price, I set a level 

through the settings of the script, when it is reached, a pending order is automatically placed at a set distance from this level. Maximum number of set levels - 6 levels 

regardless of above or below the current price. Validity of the set levels - unlimited term. The set level must be visible on the price chart, and it can be set and removed 

manually by the user (in case the current price has not reached it). When manually removing a set level, the associated pending order is also removed. Once the level is 

reached, a pending order such as Sell Stop, Sell Limit, Buy Stop or Buy Limit is automatically placed. The pending order is at a distance set by the script from the reached 

level and is defined simultaneously with the setting of the level (this is done through the settings of the script). Through the script it should be possible to set Take 

profit and Stop Loss of the pending order, and this should not be mandatory (entering 0 in the script settings does not set Take profit and Stop Loss). Validity of the 

pending order - unlimited term (or one month if it is impossible to set an unlimited term). IMPORTANT: When the current price reaches the price level set by the script, the 

pending order is placed at the distance set in the script, and the level automatically ceases to operate (deleted automatically). IMPORTANT: At a set level above the current 

price - the level is activated at Bid price. At a set level below the current price - the level is activated at Ask price.
For clarity, I am attaching a file.

Arquivos anexados:

JPG
CONDITION.JPG
151.2 Kb

Respondido

1
Desenvolvedor 1
Classificação
(390)
Projetos
416
30%
Arbitragem
74
19% / 70%
Expirado
52
13%
Trabalhando
2
Desenvolvedor 2
Classificação
(13)
Projetos
15
7%
Arbitragem
1
100% / 0%
Expirado
0
Livre
3
Desenvolvedor 3
Classificação
(42)
Projetos
52
50%
Arbitragem
6
83% / 0%
Expirado
0
Livre
4
Desenvolvedor 4
Classificação
(34)
Projetos
60
23%
Arbitragem
11
73% / 9%
Expirado
3
5%
Livre
5
Desenvolvedor 5
Classificação
(16)
Projetos
29
48%
Arbitragem
0
Expirado
6
21%
Livre

Informações sobre o projeto

Orçamento
40+ USD
Prazo
para 3 dias