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 08-05-2006, 01:50 PM
Junior Member
 
Join Date: Aug 2006
Posts: 1
DHALSIM is on a distinguished road
Need help about trade time control

I need some help:
If I closed a order in a bar, then I need no operation in this bar any more.
the next time for opening a position would be in the next bar.I wrote as fowling:

OrderSelect(ticket, SELECT_BY_TICKET);
if (OrderCloseTime()>Time[0]) return(0);

but it doesnot work at all in back test,
so ,I need some help, please help me
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-06-2006, 03:27 AM
phoenix's Avatar
Senior Member
 
Join Date: May 2006
Posts: 287
phoenix is on a distinguished road
use this ... it works

PHP Code:
      bool openenable true;
      for(
int hcnt=0;hcnt<HistoryTotal();hcnt++)
      {
         
OrderSelect(hcntSELECT_BY_POSMODE_HISTORY);
         if(
OrderSymbol()==Symbol()&& OrderMagicNumber()==MagicNo)
         {
               
int lastclosetime OrderCloseTime();
               if(
lastclosetime>iTime(Symbol(),0,0)) openenable false;                         
         }
      } 
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
Trade at control points boostrade Expert Advisors - Metatrader 4 2 02-13-2007 11:28 AM


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



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