Login Page - Create Account

Support Board


Date/Time: Thu, 16 Jan 2025 18:53:55 +0000



Bar close behavior vs alerts on bar close

View Count: 1173

[2017-11-11 22:42:17]
Usermb - Posts: 126
I have created ACSIL studies that trigger alerts on the close of a bar (check: BHCS_BAR_HAS_NOT_CLOSED == sc.GetBarHasClosedStatus(barIdx))
I have some issues with the timing, a bar is considered closed first when a new bar is available.

Example: given a daily chart (time period 1-0-0) using intraday data for say ES with session times 09:30:00 - 16:14:59 (ET), the alert will be first triggerred at 09:30:00 on the following day. Technically speaking this is a nice shortcut when developing GetBarHasClosedStatus(), but it's not ideal for the users. IMHO, the bar should be considered closed starting with 16:15:00. That way alerts could be sent out at the true end of the bar and I could act on them immediatelly.

Is there any way I could configure SC and/or my studies to reliabilly trigger a bar close at the end of the bar's time period instead?
[2017-11-12 19:52:12]
Sierra Chart Engineering - Posts: 104368
It is totally impractical and inefficient for that function to work in that way and we would not do that.

We updated the documentation for this function here:
sc.GetBarHasClosedStatus()

It goes into more detail about how to accomplish what you want. Review the updated documentation. Also the referenced function sc.GetCurrentDateTime() will be added to the next release coming out today or tomorrow.
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-11-12 19:53:25

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

Login

Login Page - Create Account