Forex



Go Back   Forex Trading > Downloads > Tools and utilities
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
  #11 (permalink)  
Old 03-31-2006, 09:43 AM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #12 (permalink)  
Old 03-31-2006, 10:00 AM
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
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #13 (permalink)  
Old 04-01-2006, 07:12 AM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #14 (permalink)  
Old 04-21-2006, 05: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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #15 (permalink)  
Old 04-24-2006, 11:12 PM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #16 (permalink)  
Old 05-22-2006, 11:12 AM
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
CloseOnTime EA from Kimiv.
Attached Files
File Type: mq4 CloseOnTime.mq4 (2.0 KB, 502 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
  #17 (permalink)  
Old 10-17-2006, 09:07 PM
rocko1's Avatar
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #18 (permalink)  
Old 11-21-2006, 05:10 AM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #19 (permalink)  
Old 12-12-2006, 12:10 PM
Senior Member
 
Join Date: Sep 2006
Location: Europe
Posts: 115
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 12:18 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
  #20 (permalink)  
Old 12-12-2006, 12:14 PM
european's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 282
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 12:34 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
Reply

Bookmarks

Tags
close, close all, Close all open positions.mq4, close all position script, close all positions, close all positions in MT4, close all script, close all trades, closeall, ddetool, forex, mt4 close all script, mt4 close all trades, open close, pending order ea, profit, script, scripts, stomper, stop, tools, trades, trailing


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
Open/close trade on same bar's close? WNW Expert Advisors - Metatrader 4 2 03-29-2007 06:37 AM
close all open trades ea G-Riper General Discussion 2 08-02-2006 10:41 PM
Close all open positions jonjonau Expert Advisors - Metatrader 4 6 07-12-2006 06:01 AM
Close All Open Positions? lonespruce Metatrader 4 9 06-22-2006 08:20 AM


All times are GMT. The time now is 07:50 PM.



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