Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 19:30:22 +0000



Post From: BHCS_BAR_HAS_CLOSED

[2014-09-28 11:47:48]
Hendrixon - Posts: 130
I'm trying to time exactly how long a bar took to build and need to know when exactly this code will get executed:
if (sc.GetBarHasClosedStatus(sc.Index) == BHCS_BAR_HAS_CLOSED)
{
//code that gets current system time
}
I'm asking this cause there are situations when there are time gaps between last bar close and next/new bar open.
For example using 100 Ticks bar periodicity:
* When last bar counted the 100th tick [point A], its done... even though sc.Index still haven't advanced by +1.
* Next bar won't actually start forming right away, since SC needs to receive a new tick for that to happen. [we have a time gap]
* New Tick received so new bar starts forming. sc.Index gets advanced by +1. [point B]

Will the above statement execute at [point A] or [point B]?
Date Time Of Last Edit: 2014-09-28 12:46:37