Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 02-11-2007, 10:42 AM
Tradinator's Avatar
Junior Member
 
Join Date: Feb 2007
Posts: 8
Tradinator is on a distinguished road
Close Open Trades EAs based on Equity

Attached is a EA to close ALL open trades in your account when the profit in your account reaches an amount that you want (currently set at $300).

For example, if you are using 2 or more different EAs on your account, then this EA will close all open trades on your account, regardless of which ever EA made them or the currency pair - it will close ALL open positions whether they were made by an EA or manually.


The EA can be put on any chart, but it is best to put the EA on a symbol with many tick movements like gbpusd, gbpchf or gbpjpy.

See the picture attached for an setup example.
Attached Images
File Type: gif example1.gif (81.0 KB, 2553 views)
Attached Files
File Type: mq4 CloseTrades_After_Account_Profit_Reached.mq4 (2.5 KB, 1170 views)

Last edited by Tradinator; 02-11-2007 at 03:37 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 02-11-2007, 10:45 AM
Tradinator's Avatar
Junior Member
 
Join Date: Feb 2007
Posts: 8
Tradinator is on a distinguished road
EA to Close All Open Trades When Your Account Floating Loss Reaches a Certain Amount

Attached is an EA to close ALL open trades in your account when the floating loss in your account reaches a certain amount (currently set at -$1000).

For example, if you are using 2 or more different EAs on your account, then this EA will close ALL open trades on your account, regardless of which ever EA made them or the currency pair -it will close ALL open positions whether they were made by an EA or manually.


The EA can be put on any chart, but it is best to put the EA on a symbol with many tick movements like gbpusd, gbpchf or gbpjpy.

See picture attached for a setup example.
Attached Images
File Type: gif example2.gif (81.2 KB, 2363 views)
Attached Files
File Type: mq4 CloseTrades_After_Account_Loss_TooMuch.mq4 (3.2 KB, 712 views)

Last edited by Tradinator; 02-11-2007 at 03:38 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 02-12-2007, 07:26 AM
Senior Member
 
Join Date: Jun 2006
Posts: 363
chrisstoff is on a distinguished road
Thumbs up Useful

Hi Tradinator,

Thank you for sharing these EAs. I think particularly the CloseTrades_After_Account_Loss_TooMuch will be useful for me in certain situations.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 04-17-2007, 11:27 AM
Junior Member
 
Join Date: Apr 2006
Posts: 8
ijal is on a distinguished road
What happen after that? Is this EA also prevent another EA from opening new trade?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 07-23-2007, 11:05 AM
zifx25000's Avatar
Member
 
Join Date: Apr 2006
Posts: 63
zifx25000 is on a distinguished road
Hello

Does this Ea is stopping Ea to run - once all tickets are closed ?

Kr
jerome


Quote:
Originally Posted by Tradinator View Post
Attached is an EA to close ALL open trades in your account when the floating loss in your account reaches a certain amount (currently set at -$1000).

For example, if you are using 2 or more different EAs on your account, then this EA will close ALL open trades on your account, regardless of which ever EA made them or the currency pair -it will close ALL open positions whether they were made by an EA or manually.


The EA can be put on any chart, but it is best to put the EA on a symbol with many tick movements like gbpusd, gbpchf or gbpjpy.

See picture attached for a setup example.
__________________
ZiFX25000
____________________
''Follow the trend''
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 10-12-2007, 02:24 PM
WNW's Avatar
WNW WNW is offline
Senior Member
 
Join Date: Feb 2006
Location: Motown, USA
Posts: 394
WNW is on a distinguished road
Another "Close All Trades" script

I modded the original to close all open and pending orders.

This one works well and is short and to the point.
Attached Files
File Type: mq4 Close_ALL_Trades_After_Account_Profit_Reached.mq4 (2.4 KB, 580 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 10-12-2007, 02:48 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,058
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Thanks.
Is it EA?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 10-12-2007, 11:35 PM
WNW's Avatar
WNW WNW is offline
Senior Member
 
Join Date: Feb 2006
Location: Motown, USA
Posts: 394
WNW is on a distinguished road
No, it should go in the "Scripts" folder. With a couple of simple mods it can be incorporated into an EA.

Last edited by WNW; 10-12-2007 at 11:43 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #9 (permalink)  
Old 10-13-2007, 07:54 AM
el cid's Avatar
Senior Member
 
Join Date: Nov 2006
Posts: 967
el cid is an unknown quantity at this point
Hi folks

Can we work on a single E A to do everything as follows

What additional safety features do you recommend?
Here are some suggestions

a) If account balance drops by 5 % within 24 hours disable all new orders and close all existing orders (the 5% is a variable in properties)

b)If EA incurs losses of more than 1% in a 24 hour period ,disable E A

c)If EA places more than x orders in 24 hours disable EA. If EA places more than x orders in 48 hours disable EA

d) If EA loses more than 10% in last 12 months , of account equity disable new orders

e) Delete all pending orders after x hours

f) Other suggestions


ADDITIONAL SCRIPTS OR EAS REQUIRED

These will override all orders by all EAS
A) Delete all pending orders

B)Close all open orders at market

C) Close all open orders at market on Friday at x hours

D )delete all open orders on Friday at

e)disable all new orders between x hours on Friday and x hours Monday

f)disable all new orders during newstime ie x hours to x hours

g)close all existing orders at x hours at market and retart trading at x hours

h) other rules suggestions


You guys got any more suggestions?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #10 (permalink)  
Old 10-13-2007, 08:18 AM
MiniMe's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Montréal
Posts: 1,451
MiniMe is an unknown quantity at this point
The swiss army
Swiss Army EA (Automatic order management)

it does what you want although I found some of the demands are quite funny
d) If EA loses more than 10% in last 12 months , of account equity disable new orders
let me get this right, for 12 trading months you don't know if you lost 10% of the initial balance and you want the EA to tell you this
__________________


Last edited by MiniMe; 10-13-2007 at 08:24 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
closetrades_after_account_loss_toomuch


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
does anyone have an expert that closes all trades based on equity gain or loss? pooper scoopers Expert Advisors - Metatrader 4 6 05-02-2009 05:25 AM
MT4 is there a "close all open trades script/command?" keramikus Metatrader 4 3 05-29-2007 02:49 PM
Open/close trade on same bar's close? WNW Expert Advisors - Metatrader 4 2 03-29-2007 06:37 AM
Close all based on Magic kokas Metatrader 4 mql 4 - Development course 6 09-19-2006 09:20 PM
close all open trades ea G-Riper General Discussion 2 08-02-2006 10:41 PM


All times are GMT. The time now is 06:24 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.