Login Page - Create Account

Support Board


Date/Time: Thu, 05 Mar 2026 21:50:20 +0000



Post From: millisecond math question

[2016-03-24 01:03:52]
onnb - Posts: 666

SCDateTimeMS latest_tick = sc.LatestDateTimeForLastBar;
SCDateTimeMS bar_ts = sc.BaseDateTimeIn[sc.ArraySize-1];

if (latest_tick - bar_ts >= MILLISECONDS * 500)
{
.....

}


Assume the feed is MS timestamps.
We want the "if" statement to evaluate to true when 500 MS have passed since the beginning of the last bar.

Does that look correct?