Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 12:11:28 +0000



Data file (File extension: .scid) struct s_Intraday - Total Records

View Count: 2047

[2013-09-29 21:12:27]
fspisem1 - Posts: 12
Could you ask programmers ?
Please, could be possible to add an information count of total records to header of scid file ?

For exaple:
unsigned long TotalRecords;

Thank so much.
[2013-09-29 22:32:31]
Sierra Chart Engineering - Posts: 104368
This is very easily calculated. Get the file size and subtract the size of the header and then divide by the size of the Intraday record size. The result is the number of records in the file.
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: 2013-09-29 22:32:48
[2013-09-30 09:05:02]
fspisem1 - Posts: 12
Yes, I know, but get the file size of 1 GB file takes more than 2 seconds. Counting alocated cluster on disk is faster way but there is not alocated bytes.

I need to evaluate new records in real time.
So only one way is to have this file size or total records immediately is only in header.


Could you please to add this Total Record or information about file size to header?

It is only one missing relevant value and and there is space for it in struct s_Intraday .

Thank so much.

[2013-09-30 09:09:51]
Sierra Chart Engineering - Posts: 104368
We have never known getting the file size taking two seconds. It should take only microseconds.

Here is a function you can use:


DWORD GetFileSize(const CString& PathAndFileName)
{
  HANDLE File
    = CreateFile(PathAndFileName,
      GENERIC_READ,
      FILE_SHARE_READ | FILE_SHARE_WRITE,
      NULL,
      OPEN_EXISTING,
      0,
      NULL
    );
  if (File == INVALID_HANDLE_VALUE)
    return INVALID_FILE_SIZE;
  
  DWORD FileSize = ::GetFileSize(File, NULL);
  
  CloseHandle(File);
  
  return FileSize;
}

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: 2013-09-30 09:10:20
[2013-10-07 16:09:38]
fspisem1 - Posts: 12
Yes, it works, thank you.
[2013-10-11 23:47:11]
marcovth - Posts: 61
If you continuously wants to read the updates that are entered into scid files by sieracharts, would this be the method to use?

http://support.microsoft.com/kb/156932

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

Login

Login Page - Create Account