Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


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 Thread Tools Display Modes
  #1 (permalink)  
Old 06-28-2006, 10:21 PM
Senior Member
 
Join Date: May 2006
Posts: 130
investor_me is on a distinguished road
Why no simultaneous trades not happening?

Could someone explain to me why my EA never executes simultaneous trades in different pairs. It can execute in all pairs but cannot do it simultaneously. Each time a trade opens in one pair, it stalls all potential trades with other pairs.

Here's the code that defines when to start the trade:

total=OrdersTotal(); // check the total active orders

for(count=0;count<total;count++) // if there are active totals then proceed
{
OrderSelect(count, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && OrderSymbol()==Symbol() && (OrderMagicNumber()==MAGIC))
{
<code>: The code here is never reached if one order is open in a specific pair.

Thanks for your help in advance.

If you need the whole code, please let me know so I can send it to you by email.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-29-2006, 02:12 AM
Member
 
Join Date: Feb 2006
Location: Afghanistan
Posts: 51
lexygoo is on a distinguished road
Hi,

why do you have: if(OrderType()<=OP_SELL.....

??

this should be

if(OrderType()==OP_SELL.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-29-2006, 10:05 PM
Senior Member
 
Join Date: Feb 2006
Posts: 513
Michel is on a distinguished road
Quote:
Originally Posted by lexygoo
Hi,

why do you have: if(OrderType()<=OP_SELL.....

??

this should be

if(OrderType()==OP_SELL.....
This means that only OP_BUY and OP_SELL are concerned, not the pendings.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-29-2006, 10:13 PM
Senior Member
 
Join Date: Sep 2005
Location: St Louis, MO, USA
Posts: 176
cardio is an unknown quantity at this point
Server communication

I think the order takes a while to reach the brokers server and be verified there. This is only a guess. One ea I had was made to trade at exactly 12H00 - but could only do so on 2 currencies simultaneously else it got a 'dispatch busy' kind of error.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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 On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sam trades lorix_ Expert Advisors - Metatrader 4 19 04-25-2007 03:10 PM
Delaying trades huhenyo Expert Advisors - Metatrader 4 1 05-17-2006 08:17 AM
Delaying trades huhenyo Questions 1 05-10-2006 03:46 PM
All EA TRADES disappeared mj10 General Discussion 5 01-30-2006 10:06 AM


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



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