Login Page - Create Account

Support Board


Date/Time: Thu, 16 Jan 2025 18:58:57 +0000



Post From: Bar close behavior vs alerts on bar close

[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?