
09-04-2007, 01:18 PM
|
 |
Senior Member
|
|
Join Date: Oct 2006
Posts: 293
|
|
Quote:
Originally Posted by omelette
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)
|