Login Page - Create Account

Support Board


Date/Time: Tue, 18 Mar 2025 16:12:47 +0000



Time of Current bar High or Low in ACSIL

View Count: 2507

[2015-08-31 03:51:13]
ertrader - Posts: 682
Hi Support,
A couple questions:
1) What is the correct code to get time in seconds from midnight of the current index high and low?

The following gets time of current bar as usual correctly but does not get the time of High or Low of the current bar:
SCDateTime DateTime;
DateTime = sc.BaseDateTimeIn[sc.Index].GetTime();

I tried the following but get incorrect results:
SCDateTime DateTimeHigh, DateTimeLow;
DateTimeHigh = sc.BaseDateTimeIn[sc.High[sc.Index]].GetTime();
DateTimeLow = sc.BaseDateTimeIn[sc.Low[sc.Index]].GetTime();

2) What is the correct code to obtain millisecond values for High and Low values of the current index?

Is the following correct?
SCDateTimeMS DateTimeMSHigh , DateTimeMSLow;
DateTimeMSHigh = sc.BaseDateTimeIn[sc.High[sc.Index]].GetMilliSecond();
DateTimeMSLow = sc.BaseDateTimeIn[sc.Low[sc.Index]].GetMilliSecond();

Thank you
[2015-08-31 03:53:56]
Sierra Chart Engineering - Posts: 104368
There is no support to do exactly what you want.

You would have to set the chart bars to 1 trade per bar to determine what you want.

This is not valid because because the array operator requires an actual index:
DateTimeHigh = sc.BaseDateTimeIn[sc.High[sc.Index]].GetTime();

Not an unrelated floating-point value.
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
[2015-08-31 04:05:16]
ertrader - Posts: 682
Thank you for your quick response. Adding the capability to get the time of the current index high and low would be quite helpful if at all possible.
[2015-08-31 04:34:11]
Sierra Chart Engineering - Posts: 104368
This is the kind of thing there is -100% chance of happening.
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
[2015-08-31 04:49:43]
ertrader - Posts: 682
As expected...but it was worth the time to try
[2020-01-01 15:41:38]
Pantarhei - Posts: 3
Hi Support,

found this old thread and I have the same need as etrader to get the time of the current index high and low.

Has anything changed since 2015 to increase the chances of -100%?

Kind regards
[2020-01-01 16:36:55]
Ackin - Posts: 1865
The answer is above

You would have to set the chart bars to 1 trade per bar to determine what you want.

+ find in the user range High/Low... Index from this and its time is it what you want

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

Login

Login Page - Create Account