Thread: Please Help
View Single Post
  #5 (permalink)  
Old 09-04-2007, 01:18 PM
jlpi's Avatar
jlpi jlpi is offline
Senior Member
 
Join Date: Oct 2006
Posts: 293
jlpi is an unknown quantity at this point
Quote:
Originally Posted by omelette View Post
Good point - it would depend on how much time has elapsed on the current bar...

To make it time-frame independent, use the following:

Code:
OrderSend(Symbol(),OP_BUY ,Lots,Ask,1,Ask-loss*Point,Ask+profit*Point,"Mercury_Man",1,iTime(NULL,Period_M1,0) + 3600,Green);
In my opinion you should rather use TimeCurrent()+3600 because it is the current time on whatever time frame and it is not the time of the beginning of the candle. (but of course on M1 candles it doesn't make such a big difference)
Reply With Quote