Login Page - Create Account

Support Board


Date/Time: Tue, 18 Nov 2025 06:13:42 +0000



alert condition not updating on bar close

View Count: 270

[2025-09-25 18:47:27]
daif1029 - Posts: 11
i have an alert condition to do with open and closes of the next bar using [1] but the study does not update, it will only update when for example i uncheck then check any of the settings of the study
[2025-09-25 19:05:06]
daif1029 - Posts: 11
ok so i just realised that i should be using [-1] instead of [1]
the study uses extension lines at specific points of the candles but because of the [-1] instead of the [1], the line is actually drawn on the candle which the alert formula is not interested in
[2025-09-25 19:05:44]
daif1029 - Posts: 11
is there a way to fix this
[2025-09-25 19:56:16]
John - SC Support - Posts: 43003
What exactly are you wanting to do?

Also, extension lines are not accessible as items in an Alert Formula or in a Spreadsheet. These can only be accessed through a custom study.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-09-26 19:22:56]
daif1029 - Posts: 11
=AND(C < O, C[1] > O[1], C[1] > O), this is my formula but it is not updating real time because of the [1], so could you help me input this into spreadsheet alerts as i am unsure.
[2025-09-26 20:01:22]
John - SC Support - Posts: 43003
First, are you trying to enter this on a Spreadsheet or an Alert or some specific study (and if so, which one)?

Next, what exactly are you trying to do? The information above does not tell us what you are wanting to accomplish.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-09-26 20:15:58]
daif1029 - Posts: 11
the study is meant to alert when the preceding candle closes above the current and vice versa for closure below, then i would use the subgraph/alert extension lines instead of color bars.
however this =AND(C < O, C[1] > O[1], C[1] > O) would not update in realtime becuase of the [1], so i want to ask what is the equivalent of this formula when inputed into a spreadsheet as spreadsheet does allow [1] i believe.
[2025-09-26 20:24:03]
daif1029 - Posts: 11
File attached
imageScreenshot 2025-09-26 212352.png / V - Attached On 2025-09-26 20:24:00 UTC - Size: 1.2 KB - 54 views
[2025-09-26 21:41:01]
John - SC Support - Posts: 43003
We are going to restate this with a bit of a change in the wording to make sure we fully understand:
- You want an alert when the current bar trades higher than the Close of the previous bar when it is an UP bar (Close is greater than Open)
- OR you want an alert when the current bar trades lower than the Close of the previous bar when it is a DOWN bar (Close is less than Open)

The first part of this for an Alert condition would be the following:
=AND(C > C[-1], C[-1] > O[-1])

The second part would be the following:
=AND(C < C[-1], C[-1] < O[-1])

And putting them together gives you the following:
=OR(AND(C > C[-1], C[-1] > O[-1]), AND(C < C[-1], C[-1] < O[-1]))

If you are wanting Extension Lines, then the "Color Bar Based on Alert Condition" is the study to use with the above formula for the alert condition.

If you want to do this in a Spreadsheet Study, then you need to change the "C"s and "O"s as follows:
- "C" would be replaced with ID0.SG4@3
- "C[-1]" would be replaced with ID0.SG4@4
- "O" would be replaced with ID0.SG1@3
- "O[-1]" would be replaced with ID0.SG1@4

If you are looking for something else then we need more information.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-09-26 22:00:01]
daif1029 - Posts: 11
i am trying to do something like this
imageScreenshot 2025-09-26 175842.png / V - Attached On 2025-09-26 21:59:47 UTC - Size: 44.77 KB - 55 views
[2025-09-29 14:22:51]
John - SC Support - Posts: 43003
We need to know exactly what it is you are wanting to accomplish. We can then help you further with this. The reference to the other post does not help us, as that is about putting a marker on a bar 2 previous to the current bar. You state you want something like that - but what exactly are you wanting?
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account