Support Board
Date/Time: Thu, 16 Jan 2025 12:54:52 +0000
scid real time file update question
View Count: 2837
[2017-10-18 19:51:29] |
onnb - Posts: 662 |
We are reading scid files in real time. The general question we have is this: is it possible that a study function is being called where the scid file is not in sync with the chart arrays? Meaning we have some ticks in memory that have not been written to the scid files. Is it possible that the following happens? Using range bars Live bar is forming (lets say it's index 100) New tick comes in from the feed that cause the current live bar to close and a new one created (so now we have bar index 101) Study function is called last time for bar 100 with bar closed status (new ticks that caused the bar to close have not been written to the scid file) After study function is called, sometime later, scid file gets updated with the tick that caused the bar to close Does that make sense? |
[2017-10-18 21:56:36] |
Sierra Chart Engineering - Posts: 104368 |
: is it possible that a study function is being called where the scid file is not in sync with the chart arrays? Meaning we have some ticks in memory that have not been written to the scid files. Yes this has been the case for probably nearly 2 years now.What we have to do is provide an ACSIL function to read data from the Intraday data file which also would support reading from the internal cache. You can also adjust the Intraday file flush timing through Global Settings >> Data/Trade Service Settings >> Advanced. 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 |
[2017-10-19 00:52:59] |
onnb - Posts: 662 |
What we have to do is provide an ACSIL function to read data from the Intraday data file which also would support reading from the internal cache.
Got it - there is a bunch of code that relies on this behavior from a long time ago - is that function something you can add any time soon?You can also adjust the Intraday file flush timing through Global Settings >> Data/Trade Service Settings >> Advanced.
What does 0 mean? Do you have any documentation on this?
|
[2017-10-20 07:29:37] |
Sierra Chart Engineering - Posts: 104368 |
is that function something you can add any time soon? At this time we do not know but we will look into it.0 means the flush time is set automatically and it is 10,000 ms in this case. 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 |
[2017-10-23 07:23:03] |
Sierra Chart Engineering - Posts: 104368 |
What we have to do is provide an ACSIL function to read data from the Intraday data file which also would support reading from the internal cache. Yes we think we can add this. We will try to have it out this week. Hopefully by the afternoon if no complications.
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 |
[2017-10-24 05:04:14] |
onnb - Posts: 662 |
Great, let me know what build it's in. We will start using it right away.
|
[2017-10-24 23:38:46] |
Sierra Chart Engineering - Posts: 104368 |
We should have this done by tomorrow. Version will be 1629. 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 |
[2017-10-25 02:28:42] |
onnb - Posts: 662 |
Great, please include a few notes on the api if you can
|
[2017-10-26 10:27:56] |
Sierra Chart Engineering - Posts: 104368 |
This has been released in the latest prerelease but there is no documentation and there is additional work that is needed on it to properly implement it most efficiently. Allow about another 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 Date Time Of Last Edit: 2017-10-26 10:28:13
|
[2017-10-28 02:46:20] |
Sierra Chart Engineering - Posts: 104368 |
Use version 1630. Below is example code: SCSFExport scsf_ReadFromUnderlyingIntradayFileExample(SCStudyInterfaceRef sc)
{ if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Read from Underlying Intraday File Example"; sc.AutoLoop = 0; sc.FreeDLL = 0; return; } if (sc.LastCallToFunction) return; s_IntradayRecord IntradayRecord; for (int FileIndex = sc.FileRecordIndexOfLastDataRecordInChart; FileIndex >= sc.FileRecordIndexOfLastDataRecordInChart - 10; FileIndex--) { bool FirstIteration = FileIndex == sc.FileRecordIndexOfLastDataRecordInChart; bool LastIteration = FileIndex <= sc.FileRecordIndexOfLastDataRecordInChart - 10; IntradayFileLockActionEnum IntradayFileLockAction = IFLA_NO_CHANGE; if (FirstIteration && LastIteration) IntradayFileLockAction = IFLA_LOCK_READ_RELEASE; else if (FirstIteration) IntradayFileLockAction = IFLA_LOCK_READ_HOLD; else if (LastIteration) IntradayFileLockAction = IFLA_RELEASE_AFTER_READ; sc.ReadIntradayFileRecordAtIndex(FileIndex, IntradayRecord, IntradayFileLockAction); SCDateTimeMS TradeTimestampInChartTimeZone = IntradayRecord.DateTime + sc.TimeScaleAdjustment; } // Could also use this line of code to release the lock if not sure when will be complete with reading and want to do it as a separate operation. An index of -1 signifies not actually to perform a read. ///sc.ReadIntradayFileRecordAtIndex( -1, IntradayRecord, IFLA_RELEASE_AFTER_READ); } 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 |
[2017-10-28 02:48:36] |
Sierra Chart Engineering - Posts: 104368 |
We are also going to be enhancing this functionality to be able to easily read all of the trades/ticks within a chart bar.
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 Date Time Of Last Edit: 2017-10-28 18:57:39
|
[2017-10-28 03:44:17] |
onnb - Posts: 662 |
This has been released in the latest prerelease but there is no documentation and there is additional work that is needed on it to properly implement it most efficiently. Allow about another day.
I assume that 1630 is the "efficient and properly implemented" version? ...also going to be enhancing this functionality to be able to easily read all of the trades/ticks within a chart bar.
Thumbs up on that
|
[2017-10-28 04:34:10] |
onnb - Posts: 662 |
...also going to be enhancing this functionality to be able to easily read all of the trades/ticks within a chart bar.
Considering whether to wait for this or not - do you have an ETA for this? |
[2017-10-28 18:56:55] |
Sierra Chart Engineering - Posts: 104368 |
You need to use version 1630. That is the full and proper implementation. For the estimated time for the other functionality, we have no idea now. 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 Date Time Of Last Edit: 2017-10-28 18:58:01
|
[2017-10-29 00:24:58] |
Sierra Chart Engineering - Posts: 104368 |
We are also going to be enhancing this functionality to be able to easily read all of the trades/ticks within a chart bar. We will see if we can get this done today.There was also a dictation error at the beginning of this sentence previously but it has now been corrected. We can see that you did recognize that. 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 Date Time Of Last Edit: 2017-10-29 00:25:23
|
[2017-10-29 12:34:57] |
Sierra Chart Engineering - Posts: 104368 |
In 1631 you will have the ability to read the individual records for each chart bar easily. This function demonstrates that: /*============================================================================
----------------------------------------------------------------------------*/ SCSFExport scsf_ReadChartBarRecordsFromUnderlyingIntradayFileExample(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Read Chart Bar Records from Underlying Intraday File Example"; sc.AutoLoop = 0; sc.FreeDLL = 0; //this must be set to 1 in order to use the sc.ReadIntradayFileRecordForBarIndexAndSubIndex function. sc.MaintainAdditionalChartDataArrays = 1; return; } if (sc.LastCallToFunction) return; s_IntradayRecord IntradayRecord; if ( sc.GetBarHasClosedStatus(sc.UpdateStartIndex) == BHCS_BAR_HAS_NOT_CLOSED)//Only execute on updating of last bar. { int ReadSuccess = true; bool FirstIteration = true; uint32_t TotalVolume = 0; int SubIndex = 0;//Start at first record within bar //Read records until sc.ReadIntradayFileRecordForBarIndexAndSubIndex returns 0 while (ReadSuccess) { IntradayFileLockActionEnum IntradayFileLockAction = IFLA_NO_CHANGE; if (FirstIteration) { IntradayFileLockAction = IFLA_LOCK_READ_HOLD; FirstIteration = false; } ReadSuccess = sc.ReadIntradayFileRecordForBarIndexAndSubIndex(sc.ArraySize - 1, SubIndex, IntradayRecord, IntradayFileLockAction); if (ReadSuccess) { TotalVolume += IntradayRecord.TotalVolume; ++SubIndex; } } sc.ReadIntradayFileRecordForBarIndexAndSubIndex(-1, -1, IntradayRecord, IFLA_RELEASE_AFTER_READ); SCString TotalVolumeString; TotalVolumeString.Format("Total volume: %u", TotalVolume); sc.AddMessageToLog(TotalVolumeString, 0); } } 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 Date Time Of Last Edit: 2017-10-29 12:36:24
|
[2017-10-29 13:28:01] |
ganz - Posts: 1048 |
SC Support It would be cool having SubIndex as a timestamp for a record and something like GetFirstSubIndex* and GetCurrentSubIndex* as a real timestamps. Or is it available with IntradayRecord.DateTime? The next notable areas of development are as follows: Various work related to chart bars. Also including the ability to build custom bars using ACSIL efficiently. Thnx. Date Time Of Last Edit: 2017-10-29 14:50:22
|
[2017-10-30 16:34:23] |
Sierra Chart Engineering - Posts: 104368 |
Not totally clear what you are asking for but file access is always based on indexes and it is possible to use this function to convert a Date-Time to a bar index: sc.GetContainingIndexForSCDateTime() IntradayRecord.DateTime does contain the time zone adjusted timestamp of the record. Various work related to chart bars. Also including the ability to build custom bars using ACSIL efficiently. 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 Date Time Of Last Edit: 2017-10-30 16:35:36
|
[2017-10-30 17:30:30] |
ganz - Posts: 1048 |
SC Support These options will be the greatest features since VolumeAtPriceFor* was released, imo That makes SC something special again ...(c) :) |
To post a message in this thread, you need to log in with your Sierra Chart account: