Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 23:07:10 +0000



Millisecond equalent for currentbar date & time

View Count: 1483

[2013-12-11 22:49:09]
ejtrader - Posts: 688
SC Team - On few of the occassions, noticed the crossbar time would display the bar datetime rounded to seconds and CTV(compact tool window displays in milliseconds). Would it be possible to update crossbar timestamp to match up CTV value?

Also - is there any millisecond equivalent of sc.BaseDateTimeIn[sc.Index] ( assuming at present this is rounded to "seconds" )? Basically wanted to compare it with SCDateTimeMS type accurately.

Thanks
[2013-12-13 01:31:40]
Sierra Chart Engineering - Posts: 104368
We will be providing documentation for this. We will try to get to it within the next day.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-12-14 00:59:08]
Sierra Chart Engineering - Posts: 104368
Refer to the documentation here:
https://www.sierrachart.com/index.php?l=doc/doc_ACSILProgrammingConcepts.html#AccessingMilliseconds
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-12-14 18:21:35]
ejtrader - Posts: 688
Thanks SC Team.

Considering Millisecond timestamps - Is this the correct way to detect if a T&S record belong to the last bar on chart ( irrespective of the chart type )?

Thanks


..
sc.AutoLoop = 1;
..

SCDateTimeMS cbDT = sc.BaseDateTimeIn[sc.Index];

SCTimeAndSalesArray TimeSales;
sc.GetTimeAndSales(TimeSales);

for (int TSIndex = TimeSales.GetArraySize() - 1; TSIndex >= 0; --TSIndex)
{
SCDateTimeMS TradeDateTime = TimeSales[TSIndex].DateTime;

if (TradeDateTime >= cbDT) // Will this ensure the T&S record belongs to the very last bar on chart irrespective of the chart type?
{
// Few actions
}
}

Date Time Of Last Edit: 2013-12-14 18:26:23
[2013-12-16 16:53:13]
Sierra Chart Engineering - Posts: 104368
This looks fine, but you need to apply the time offset to get the Date-Time set to the time zone setting:

SCDateTime TempDateTime=TimeSales[TSIndex].DateTime;
      TempDateTime += sc.TimeScaleAdjustment; // Apply the time offset

Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account