MT4 FUNCTION to Close Any Open Orders that Exceeds X% Loss or Y% Gain

MQL4 Scripts

Trabalho concluído

Tempo de execução 15 minutos
Comentário do cliente
very fast! ty

Termos de Referência

I'm looking for a simple function, similar in format to the attached image, that I can call to close any orders based on either a MaxLossPercent or MaxGainPercent , both variables will be user parameters.

For Example

extern double MaxLossPercent = 0.03;

extern double MaxGainPercent = 0.10;


Any open traders that equal or exceed either of these conditions will be closed by the script. Should include error checking and sleep()


These 2 values are calculated based on the *** current account value **  (i.e. 100 account * MaxLossPercent = $3.00 ) or 100 account * MaxGainPercent = $10.00 ).

If you bid, please specify your turn around time.



 

Arquivos anexados:

Respondido

2
Desenvolvedor 2
Classificação
(885)
Projetos
1410
67%
Arbitragem
123
32% / 41%
Expirado
218
15%
Livre
Publicou: 1 código
Pedidos semelhantes
I need a fully automated end-to-end system where a backend continuously runs my deterministic CORE EDGE validator on live market data, generates numeric JSON trade tickets (GO) or alert levels (NO-GO), and automatically pushes those instructions to the MT5 EA for execution. There are no manual signals. ROLE SPLIT (IMPORTANT) Backend (analysis & decision engine): Continuously evaluates live data using my CORE EDGE
Job Description: We are looking for an experienced MQL5 developer to create a script or Expert Advisor (EA) that automatically updates the price of a token CFD on MT5, using a live BTCUSD feed. The goal is to make token fully CFD-tradable , with real-time price updates, charts, and client P/L. Clients should be able to trade long or short and view live candles, just like other MT5 CFDs. Scope of Work / Requirements

Informações sobre o projeto

Orçamento
30+ USD
Prazo
de 1 para 2 dias