Login Page - Create Account

Support Board


Date/Time: Fri, 06 Dec 2019 19:22:39 +0000



sc.DateTimeOut[] always returns 30.12.1899

[2018-05-09 16:20:34]
BrMa - Posts: 52
Dear ladies and gentlemen,

I'm trying to get the SCDateTime-element for a specific bar when it was finished. The documentation says (http://www.sierrachart.com/index.php?page=doc/ACS_ArraysAndLooping.html#ArrayIndexing) that
sc.DateTimeOut[]
would be the right array to look at. Unfortunately
sc.DateTimeOut[]
returns 30.12.1899 00:00:00 (which is equal to a zero-value of the variable) regardless which index I'm passing.

However - if I'm using
sc.BaseDateTimeIn[]
, it returns the right begin-SCDateTime for the bar.

Can you give me a hint what I'm doing wrong that
sc.BaseDateTimeIn[]
works and
sc.DateTimeOut[]
not, using the same index?

I'm also passing you my debug-routine to check the values - maybe it helps to determine the failure:
if (debug)
{
  char t_output[254];
  int Year, Month, Day, Hour, Minute, Second;
      
  DATETIME_TO_YMDHMS(sc.DateTimeOut[sc.IndexOfLastVisibleBar - 1], Year, Month, Day, Hour, Minute, Second);
  sprintf(t_output, "*** DateTimeOut: %d.%d.%d %d:%d:%d ***", Day, Month, Year, Hour, Minute, Second);
  sc.AddMessageToLog(t_output, 1);
  
  DATETIME_TO_YMDHMS(sc.BaseDateTimeIn[sc.IndexOfLastVisibleBar - 1], Year, Month, Day, Hour, Minute, Second);
  sprintf(t_output, "*** BaseDateTimeIn: %d.%d.%d %d:%d:%d ***", Day, Month, Year, Hour, Minute, Second);
  sc.AddMessageToLog(t_output, 1);
}

[2018-05-09 19:02:31]
Sierra Chart Engineering - Posts: 78970
No, that is definitely not the right array to use. You need to use:
http://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Variables_And_Arrays.html#scBaseDateTimeIn
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2019-11-29 14:37:26]
scotteza - Posts: 2
I was just reading the documentation for "Working with ACSIL Arrays and Understanding Looping" (https://www.sierrachart.com/index.php?page=doc/ACS_ArraysAndLooping.html).

I understand what sc.BaseDateTimeIn[] is used for (holding the start times of price data bars).

But I don't understand what sc.DateTimeOut is supposed to be used for. What data does this array hold?

Thanks in advance!

[2019-11-29 21:46:30]
Sierra Chart Engineering - Posts: 78970
Did you read the documentation for this?
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2019-12-03 12:52:29]
scotteza - Posts: 2
I had only read the info on the page https://www.sierrachart.com/index.php?page=doc/ACS_ArraysAndLooping.html.

Posting for anyone else who comes across this post and wonders the same thing I did: I just realised that there is more extensive documentation on these array at https://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Variables_And_Arrays.html#scDateTimeOut, and I found my answer there.

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

Login

Login Page - Create Account