Login Page - Create Account

Support Board


Date/Time: Wed, 14 May 2025 01:16:45 +0000



Post From: millisecond math question

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

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?