[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: seconds since midnight in 7.1 ?



PureBytes Links

Trading Reference Links

i got confused with some function returns with many new functions, 
but finally found the solution for seconds since midnight in 7.1,
pretty simple:

= HoursFromDateTime(computerdatetime)*3600 + 
MinutesFromDateTime(computerdatetime)*60 + 
SecondsFromDateTime(computerdatetime);


and here is number of seconds in current bar, for N minute bars only:

= ( timetominutes(currenttime) + barinterval - timetominutes(time) )*60 + 
secondsFromDateTime(computerdatetime);

bilo.
ps. now i should be able to make alerts go off only once per N seconds on any alert conditions,
not on every tick or once per bar, with a simple function call.