Script to turn off EAs after trade

To add comments, please log in or register
gcgipson
488
gcgipson  

Is there a script that will turn off all the EAs on MT4 after one (or more) EAs makes a trade? Thanks.

gcgipson
488
gcgipson  

Or it could simply be a script that will only allow one (or a set amount) of trades to be open at one time.

sa_trader
15
sa_trader  

To allow only a set amount of trades open at a single time just test if OrdersTotal <= K (k= maximum amount of trades you want open at a given time) on the same place you test your order opening condition.

Or

Simply attach your EA here and i'll edit that for you

Bigby Blair
63
Bigby Blair  

Trailing stop Programming

Hi there, am trying to write an EA which will use trailing stops only. Does anyone know how to do this? I mean trailing stops moved by my EA and not the dealer's desk.

Thanks.

Pipsqueak2

Stephen Wilson
239
Stephen Wilson  

Try This EA

pipsqueak2:
Hi there, am trying to write an EA which will use trailing stops only. Does anyone know how to do this? I mean trailing stops moved by my EA and not the dealer's desk.

Thanks.

Pipsqueak2

This is a Trailing Stop EA that I wrote. It should do what you want.

https://www.mql5.com/en/forum/175680

Ahmed Soliman
23837
Ahmed Soliman  
Yoda_Glenn:
Is there a script that will turn off all the EAs on MT4 after one (or more) EAs makes a trade? Thanks.

1- Go to metatrader.info and find my script that sends keyboard keys to MetaTrader.

2- Write a script that sends CTRL+E to MetaTrader (turn off all EAs) after one (or more) EAs makes a trade?

3- How to know there's opened trades:

OrdersTotal > 0;

4- How to know the orders opened by EAs and not manual:

Check OrderMagicNumber() or/and OrderComment() of the opened trades.

Sergey Golubev
Moderator
115505
Sergey Golubev  
pipsqueak2:
Hi there, am trying to write an EA which will use trailing stops only. Does anyone know how to do this? I mean trailing stops moved by my EA and not the dealer's desk.

Thanks.

Pipsqueak2

There are a lot of trailing stop EAs/scripts. See this post in files' thread.

Sergey Golubev
Moderator
115505
Sergey Golubev  
sbwent:
This is a Trailing Stop EA that I wrote. It should do what you want. https://www.mql5.com/en/forum/175680

Thanks a lot.

I updated files' thread.

To add comments, please log in or register