i want to check if the last order is minimum one hour old, so i was thinking the
are borth using the date from the 01.01.1970 in seconds
when i use my code i get some unexpected results
i was thinking, i use the order close time minus the actual time and get as result some seconds.
but the resualt is far away from the truth, or it only dosent work at the tester
if(ctm>0) Print("Close time for the order 1 ",ctm);
Print("OrderSelect failed error code is",GetLastError());
//datetime date= D'1970.01.01 00:00';
double now = StringToDouble(str);
//long StringToInteger (test);
double Last = now - ctm;
if(OrderSelect(OrdersHistoryTotal() - 1,SELECT_BY_POS,MODE_HISTORY)==true)
"i want to check if the last order is minimum one hour old..."
order position 1 is usually not the last closed order.
you can use the for loop to get each history order's close time,and find the latest one(the biggest int),use some filter if needed.
then compare with current time.
To add comments, please log in or register