Forex
Google

Go Back   Forex Trading > Downloads > Tools and utilities
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (8) Thread Tools Display Modes
  #11 (permalink)  
Old 03-31-2006, 09:43 AM
glader glader is offline
Member
 
Join Date: Jan 2006
Location: Prague, CZECH REP
Posts: 83
glader is on a distinguished road
Quote:
Originally Posted by newdigital
I tried it right now.
No error.

I think somebody may take a look.

But I do not have any error!
I am trading LIVE. Do you trade LIVE? Could it be broblem?
Thanks for help in advance...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 03-31-2006, 10:00 AM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,435
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
Quote:
Originally Posted by glader
I am trading LIVE. Do you trade LIVE? Could it be broblem?
Thanks for help in advance...
It was Alpari demo account.
You mean that you tried to use it with real account?

Should work as well.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-01-2006, 07:12 AM
glader glader is offline
Member
 
Join Date: Jan 2006
Location: Prague, CZECH REP
Posts: 83
glader is on a distinguished road
Quote:
Originally Posted by newdigital
It was Alpari demo account.
You mean that you tried to use it with real account?

Should work as well.
Yes, I ve tried to use it with real account on live but there was an error msg...

Quite confuse but thanks for your help anyway...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 04-21-2006, 04:52 AM
ma6's Avatar
ma6 ma6 is offline
Junior Member
 
Join Date: Dec 2005
Posts: 1
ma6 is on a distinguished road
Quote:
Originally Posted by glader
I tried it, but ERROR : 4109
Tools->Options->ExpertAdvisors-> V Enable ExpertAdvisors(...and Scripts)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 04-24-2006, 10:12 PM
glader glader is offline
Member
 
Join Date: Jan 2006
Location: Prague, CZECH REP
Posts: 83
glader is on a distinguished road
Quote:
Originally Posted by ma6
Tools->Options->ExpertAdvisors-> V Enable ExpertAdvisors(...and Scripts)
Thank you so much... it is working now !!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 05-22-2006, 10:12 AM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,435
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
CloseOnTime EA from Kimiv.
Attached Files
File Type: mq4 CloseOnTime.mq4 (2.0 KB, 250 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 10-17-2006, 08:07 PM
rocko1's Avatar
rocko1 rocko1 is offline
Junior Member
 
Join Date: Sep 2006
Location: Auckland
Posts: 9
rocko1 is on a distinguished road
Quote:
Originally Posted by ma6
Tools->Options->ExpertAdvisors-> V Enable ExpertAdvisors(...and Scripts)
I'm still getting the same error. What do you mean by "V"?

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 11-21-2006, 04:10 AM
sibil sibil is offline
Junior Member
 
Join Date: Nov 2006
Posts: 1
sibil is on a distinguished road
I have the same problem.

Order ...... failed to close .Error:4109
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 12-12-2006, 11:10 AM
SloForeX SloForeX is offline
Senior Member
 
Join Date: Sep 2006
Location: Slovenia
Posts: 112
SloForeX is on a distinguished road
Close all opened orders

I have a question about how to close all opened trades. That include trades wich were opened manually.
Here is the code:

if(BalanceEquityProtectionLevel > 0 && AccountEquity() <= AccountBalance ()* BalanceEquityProtectionLevel)
{
AllowTrading = false;
Print("Min. Equity Level Reached - Trading Halted For ",Symbol());
// Alert("Min. Equity Level Reached - Trading Halted For ",Symbol());
for(cnt=OrdersTotal();cnt>=0;cnt--)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
mode=OrderType();

if (mode==OP_BUY) { OrderClose(OrderTicket(),OrderLots(),OrderClosePri ce(),slippage,Blue); }
if (mode==OP_SELL) { OrderClose(OrderTicket(),OrderLots(),OrderClosePri ce(),slippage,Red); }

// }
}
}

The problem is that, If I have opened a few pairs it's not always true that all trades will be closed too. Further more, it happend that EA continue to open another trade despite the parameter allowtrading == false.
I was debugging this thing and noticed that for some reason this code block was not executed for all pairs. Why, I don't know. Does somebody know answer to that?

This block should close all opened orders and prevent further trading.Maybe I could resolve this issue with writting parameter false to a file or something? The problem in this situation is also with pairs that have no opened orders.

Thanks..

Dejan

Last edited by SloForeX : 12-12-2006 at 11:18 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 12-12-2006, 11:14 AM
european's Avatar
european european is offline
Senior Member
 
Join Date: Apr 2006
Posts: 281
european is on a distinguished road
Here's my code that i wrote long time ago, it will close all running positions.



#include <stdlib.mqh>
#include <WinUser32.mqh>
int start()
{
double sA;
int cnt, totalOrders;
totalOrders = OrdersTotal();

if (totalOrders>0)
{
for (cnt=0;cnt<totalOrders;cnt++)
{
OrderSelect(0, SELECT_BY_POS);
if (OrderType() == OP_BUY) sA = MarketInfo(OrderSymbol(),MODE_BID);
else sA = MarketInfo(OrderSymbol(),MODE_ASK);
OrderClose(OrderTicket(),OrderLots(),sA,3,CLR_NONE );
}
}
return(0);
}

Last edited by european : 12-12-2006 at 11:34 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/tools-utilities/174-close-all-open-tools.html
Posted By For Type Date
Close all trades with a push of a button? This thread Refback 07-21-2008 03:38 PM
Close all trades with a push of a button? This thread Refback 07-21-2008 03:28 PM
Close all trades !!! This thread Refback 06-24-2008 03:13 AM
Close all trades !!! This thread Refback 06-19-2008 10:53 AM
Close all trades !!! This thread Refback 06-19-2008 09:33 AM
Antara EA yang telah diLIVE test oleh MyMEFx Grup - Page 50 - Nogold.com This thread Refback 12-05-2007 03:58 PM
skrypty close i modify This thread Refback 08-07-2007 04:11 AM
Ind close sume post with one click? - Nogold.com This thread Refback 06-30-2007 03:02 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open/close trade on same bar's close? WNW Expert Advisors - Metatrader 4 2 03-29-2007 05:37 AM
close all open trades ea G-Riper General Discussion 2 08-02-2006 09:41 PM
Close all open positions jonjonau Expert Advisors - Metatrader 4 6 07-12-2006 05:01 AM
Close All Open Positions? lonespruce Metatrader 4 9 06-22-2006 07:20 AM


All times are GMT. The time now is 12:29 PM.