Scripts: Close Orders - page 3

 
he74:
thanks, but i don't understand how system works. qeuity was 6900 i set up 5000 (level after close orders). system closed orders but queity was 3900. when i type 3000 (level of lost), every order is automaticly close. it doesn't matter quantity 100k, 50k, 10k. what should i put that system works good?


hey, the problem that you are experiencing is so simple that you are overlooking the solution, this EA is essentially an "Oh Crap i need to get out" button. When loaded as an EA on any one chart it will close orders opened from any other source regardless of chart. it is meant to be loaded onto a chart with EAs disabled and than when the trader expects the market to change detrimentally to the traders profits or the trader for some reason desires to close all his or her positions in total or of a particular type at once rather than individually and manually which takes time, the trader only has to enable EAs via the button nect to the open order button and all the orders will be closed according to the settings of the EA. Now if the EA button is left in the enabled position any order that is open will be immediately closed additionally this EA doesn't play well with other EA's loaded onto other charts because it is global in its nature and chart irrespective. There is your answer.

Good Luck

Jim

 
can we close orders open only on the window we drop the script on ? Thank you.
 
Could you tell me how to get it working?
because when I execute on a chart nothing happens.
 

Hi, I'm new to this Forum and I do not understand MQL4 programming, but I am very interested in obtaining a script which I can attach to a chart and this script will be required to close all open trades when any one of two take profit targets is reached.

The trading scenario I am trying out is a hedging trade where I will manually place long and short trades. Each long trade will have the same Take Profit Target, say TP1, and each short trade will have the same but different Take Profit Target, say TP2.

Then, when TP1 OR TP2 is reached, then all remaining open trades will automatically be closed. 

 

Would appreciate any help with this one,

Antonoksy   

 
Hi Antonoksy, look for an expert (or panel) which has a "Straddle" strategy, take care, Teddy.
 

sxTed1:
Hi Antonoksy, look for an expert (or panel) which has a "Straddle" strategy, take care, Teddy.

 

Hi sxTed1,  Thanks for your advice. I will try and look for an answer under "Straddle" strategy.  I had almost given up hope of hearing from anyone, Antonosky. 

 
Antonoksy:

Just a follow up on last comment. I have looked under "straddle" but there is nothing there which addresses my desire for a script which closes all open trades when any one of two take profit targets are hit. The nearest I can get is a script which will close all open trades

but I have to initiate it manually, which is no good. Maybe I am looking for an EA which can monitor all open trades on the current chart only, and close out when either one of two profit targets is hit. Maybe I am looking for a pie in the sky here., Regards, Antonosky