calculating 60 min from last order open

 
calculating 60 min from last order open:

OrderSelect(0, SELECT_BY_POS);

if(TimeCurrent() < OrderOpenTime()+3600)return(0);


doesnt work.

any body know an alternative?
 

A

Loop through the Orders to get the Max Ticket number, loop through them again til OrderTicket = max then look at OrderOpenTime....

Or...

Change the problem and keep a 'static' value holding datetime that is <updated> every time you place an order :)

FWIW

-BB-

 
thanks ill give it a try
 
i think i see the problem now ..

TimeCurrent() taking the server time as at now (8 march 08) and not the current time in the back test?

if this is true TimeCurrent() is useless when back testing

can someone confirm this?
Reason: