Get all my open trades and modify the t/p and s/l?

 

Hey Guys,

I'm searching for a solution, to get all my open trades. I know, there is a method called OrdersTotal(). But how do I use this method and is the method returning the total numbers of open trades, for example 5 or 7 or 6, or is the methode returning the ticket numbers of the open trades?

Once I have the open trades and the ticket numbers I want to modify the s/l and t/p prices. How can I do that? - Should I use the OrderModify() methode for that scheme?

How can I implement these purposes?

 

Thanks and Greetings! 

 

Please do a search here on the forum. There has been MANY related threads in the past on this subject. It is no use answering the same questions over and over again when the answers are already available. There are also many examples of order management EA's and Scripts in the CodeBase section.

 
If you had used this you would have found this.
Reason: