Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Tools and utilities


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
  #31 (permalink)  
Old 05-22-2007, 07:41 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Quote:
Originally Posted by FerruFx
I coded like this and it works good:

total = OrdersTotal();
int j, orders;
for(j=0;j<total;j++)
{
OrderSelect(j, SELECT_BY_POS, MODE_TRADES);
if(OrderMagicNumber() == MagicNumber && OrderSymbol() == Symbol()) orders++;
}

FerruFx
The majority of people make their EAs just like that, myself included. Plus, any additional data you want to include for the order criteria can be included in magic number (such as timeframe) which I also do.
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #32 (permalink)  
Old 05-22-2007, 08:06 PM
Senior Member
 
Join Date: Nov 2006
Location: Ukraine
Posts: 491
Shinigami is on a distinguished road
Quote:
Originally Posted by pengie
---Todo list
Add functions for MM and TrailingStops.
I can do that in 5 minutes lol instead of making new functions, take a look at existing ones
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #33 (permalink)  
Old 05-23-2007, 12:08 AM
Senior Member
 
Join Date: Feb 2007
Posts: 875
FerruFx is on a distinguished road
Quote:
Originally Posted by Shinigami
DON'T put && into if's - that really slows them down. I've already re-wrote some experts into that way and guess what - they work up to 10 times faster (each condition is checked if && is used, even if one is FALSE, others are still checked. if you use separate if's you save time because you stop at first FALSE you get)
I hope this helps...
Thanks for the explanation. This helps a lot!

FerruFx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #34 (permalink)  
Old 05-23-2007, 10:19 PM
Senior Member
 
Join Date: Mar 2006
Location: La Verne,CA
Posts: 552
MrPip is on a distinguished road
using OrdersTotal

This also works well.

for(int cnt=OrdersTotal()-1;cnt>=0;cnt--)
{
OrderSelect (cnt, SELECT_BY_POS, MODE_TRADES);
if ( OrderSymbol() != Symbol()) continue;
if ( OrderMagicNumber() != MagicNumber) continue;

// Process Order

}

Robert
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #35 (permalink)  
Old 05-23-2007, 11:52 PM
Senior Member
 
Join Date: Feb 2007
Posts: 875
FerruFx is on a distinguished road
Quote:
Originally Posted by MrPip
This also works well.

for(int cnt=OrdersTotal()-1;cnt>=0;cnt--)
{
OrderSelect (cnt, SELECT_BY_POS, MODE_TRADES);
if ( OrderSymbol() != Symbol()) continue;
if ( OrderMagicNumber() != MagicNumber) continue;

// Process Order

}

Robert
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #36 (permalink)  
Old 07-05-2007, 08:52 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Here is another thread with some libraries:

http://www.forex-tsd.com/expert-advi...ogrammers.html

Now if we could get ND to start merging some of these threads, we could get this forum cleaned up a bit.
Attached Files
File Type: zip OrdersLib.zip (1.1 KB, 21 views)
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #37 (permalink)  
Old 07-05-2007, 08:59 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Another thread with libraries:

http://www.forex-tsd.com/setup-quest...portfolio.html
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #38 (permalink)  
Old 07-05-2007, 09:29 PM
Administrator
 
Join Date: Sep 2005
Posts: 16,311
Blog Entries: 106
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 ryanklefas View Post
It was merged.
With 2 days redirection but those redirections will be expired and deleted automatically after 2 days (so no need to inform members by PM about this merging).

BTW we have enough threads/posts for future programming section. I am collecting everything here http://www.forex-tsd.com/general-dis...ing-forum.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #39 (permalink)  
Old 07-05-2007, 10:10 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 439
ryanklefas is on a distinguished road
Quote:
Originally Posted by newdigital View Post
It was merged.
With 2 days redirection but those redirections will be expired and deleted automatically after 2 days (so no need to inform members by PM about this merging).

BTW we have enough threads/posts for future programming section. I am collecting everything here http://www.forex-tsd.com/general-dis...ing-forum.html
Thanks again, ND. You just can't under-estimate the importance of an organized forum.
__________________
"Don't work harder, work smarter." -- my Java professor

Coder for Hire:
http://www.firecell-fx.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #40 (permalink)  
Old 11-18-2007, 05:57 AM
Junior Member
 
Join Date: Nov 2005
Posts: 6
melinda is on a distinguished road
It will be some difficulties
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 Off
Forum Jump


All times are GMT. The time now is 08:56 PM.



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