'Close all'/'Open' tools - page 5

 
Tickwatcher:
Hi guys, does anyone know where I can download the 'include' file 'WinUser32.mqh' file? Thanks

Attached (just unzip it).

Files:
winuser32.zip  4 kb
 

Very Simple EA

Hi all! Long time no see on here. I have a request!

I'm looking for an EA. It may already be out there but I've searched high and low and can't find it. It should go like this.

I, like a lot of people, trade a breakout system as part of my arsenal. On some mornings I set both a buy stop and a sell stop pending order. I still want to do this manually and I can even include a comment. All I want the EA to do is when one of the orders executes, cancel the other order. That's it. Not when the first order hits tp or sl... whichever order opens first... cancel the other. And the EA should take into account the comment line so that it only affects pending orders that have the specified comment line (should be a variable).

Does anyone have anything like this already?

Thanks!

8

 
8toenails:
Hi all! Long time no see on here. I have a request!

I'm looking for an EA. It may already be out there but I've searched high and low and can't find it. It should go like this.

I, like a lot of people, trade a breakout system as part of my arsenal. On some mornings I set both a buy stop and a sell stop pending order. I still want to do this manually and I can even include a comment. All I want the EA to do is when one of the orders executes, cancel the other order. That's it. Not when the first order hits tp or sl... whichever order opens first... cancel the other. And the EA should take into account the comment line so that it only affects pending orders that have the specified comment line (should be a variable).

Does anyone have anything like this already?

Thanks!

8

You may use ScheduleTrader_v1 EA from here https://www.mql5.com/en/forum/177102

But in this case you must set the time and so on for pending orders, EA will open it, and then EA will delete opposite pending order. And as many pending orders as you want with your re-determine settings.

May be it is not exactly what you want but at least something.

 

Script request

Would somebody kindly whip up a script (or modify an existing script like "close all open orders") to do the following:

Close a partial % of all opened profitable trades. In other words, if I have 3 positions opened and the extern set to 50%, the following would occur upon execution of the script:

1. @ 4 pips

2. @ 6 pips

3. @ -10 pips

The script would close a total of 5 pips leaving the orders as such:

1. @ 2 pips

2. @ 3 pips

3. @ -10 pips

I have been looking for this up and down on TSD... there was a brief discussion about it but no follow through. Perhaps its not as easy to code as it seems.

P.S.

If my explanation is not clear, let me know and I will try to clarify.

Thanks,

MM

 

Close and Reverse Script Modification

I found this Close and Reverse Script here on TSD and was wondering if anyone might be able to add the following functions to the code.

Currently this Script will Close an open Position and immediately place a Trade in the OPPOSITE Direction with the same Lot Size as the Position it just closed. I am looking for someone who can modify this so that the Lot Size of the NEW Position can be entered into the Script as an External Parameter and also be able to set a TP Level in the Script.

Can anyone help?

Thanks

Dan

Files:
 

Close all

Can you people inform me about some EA that closes all open positions if floating P/L goes below a predefined level?

Thanks

 
Cross:
Can you people inform me about some EA that closes all open positions if floating P/L goes below a predefined level? Thanks

Here you go, I made this. Hope it helps. In the external parameter enter a number as a dollar amount for Take_Profit and Stop_Loss. This EA will execute according to the TOTAL VALUE of all open orders, it also deletes any pending orders.

example:

Take_Profit=200

Stop_Loss=-200

Files:
 
FXTradepro:
I found this Close and Reverse Script here on TSD and was wondering if anyone might be able to add the following functions to the code.

Currently this Script will Close an open Position and immediately place a Trade in the OPPOSITE Direction with the same Lot Size as the Position it just closed. I am looking for someone who can modify this so that the Lot Size of the NEW Position can be entered into the Script as an External Parameter and also be able to set a TP Level in the Script.

Can anyone help?

Thanks

Dan

Can anybody help out with this request (SEE POST #46).....Any assistance is appreciated.

Dan

 

Time closing

codersguru:
Did you try this one:

XP Worx - Custom MetaTrader (MQL4) Programming and Free Expert Advisors - Indicators - Libraries - Scripts - MetaTrader Extensions (c++ DLLs)

...............................................................

These are the options:

0 Close all the orders (instant and pending orders) - this is the default option which mean if you run the script and didn't set any parameters all the orders (instant and pending) will be closed.

1 Close all instant orders; instant orders mean the orders that opened at the market price.

2 Close all pending orders.

3 Close by the magic number. You have to set the magic_number variable.

4 Close by comment. You have to set the comment_text variable.

5 Close orders (instant orders) in profit and leave the orders in loss.

6 Close orders (instant orders) in loss and leave the orders in profit.

7 Close not today orders and leave the orders that opened today.

The other two variables which you can set are:

magic_number: Set it if you'll use closing option 3 - closing by magic number.

comment_text : Set it if you'll use closing option 4 - closing by comment.

Enjoy yourself! and tell me your comment!

Can a Time to close be added to this so it can be set to close a set times?

Richo

 

Tanks a lot

wolfe:
Here you go, I made this. Hope it helps. In the external parameter enter a number as a dollar amount for Take_Profit and Stop_Loss. This EA will execute according to the TOTAL VALUE of all open orders, it also deletes any pending orders.

example:

Take_Profit=200

Stop_Loss=-200

Thanks Wolf

Cross

Reason: