script for mt5 to close all open orders reach a certain profit

 

Please i am looking for someone who can help me with a script to close all open orders when profit or loss reaches a certain limit on all open trades cumulatively.

I tried to top up via paypal to get a developer but seems to be a bit of an issue there.

 
Henry Jove:

Please i am looking for someone who can help me with a script to close all open orders when profit or loss reaches a certain limit on all open trades cumulatively.

I tried to top up via paypal to get a developer but seems to be a bit of an issue there.

If you don't want to learn to code, that's not a problem.

You can look at the CodeBase section where you will find free and open source code, or at the Market for paid products (also sometimes free). Finally, you also have the option of hiring a programmer in the Freelance section.

 
Miguel Angel Vico Alba #:

If you don't want to learn to code, that's not a problem.

You can look at the CodeBase section where you will find free and open source code, or at the Market for paid products (also sometimes free). Finally, you also have the option of hiring a programmer in the Freelance section.


I have not found any for MT5. I found them for mt4. 

I have written code for mt5 and waiting to test it when the markets open, however I am a newbee in coding,

reasons why, I wanted an expert to provide me with verbose code.


As I earlier said, support is trynna sort out my paypal deposit, I can't hire right now.

 
Use:
AccountInfoDouble(ACCOUNT_PROFIT); // function to get the current account profit.

Then:

ticket=PositionGetTicket(0); //get the ticket
trade.PositionClose(ticket);    // function to close the order


Very simple!!