Login Page - Create Account

Support Board


Date/Time: Fri, 07 Mar 2025 01:12:37 +0000



Carry over condition n bars in alert study

View Count: 553

[2022-02-19 23:34:59]
glacialspring - Posts: 26
Is there an easier way to achieve this other than creating an alert study returning 0 or 1's for a condition, then referencing that study in another alert study like for example (ID1 is first alert study, SG1 returns 0 or 1)

OR(ID1.SG1=1, ID1.SG1[-1]=1, ...ID1.SG1[-n]=1)

Would be nice to have a CARRYFOWARD(ID1.SG1=1, n) or something
[2022-02-21 14:50:21]
John - SC Support - Posts: 38467
We are not understanding what you are wanting to do. Can you please give us more information on what is the underlying item you are trying to accomplish.

If you are asking how to check an alert across multiple bars, then what you wrote is the correct way to do it. Although with some Alert functions (like CROSSOVER) you can specify a range of data, which is more compact.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-02-21 14:58:28]
glacialspring - Posts: 26
My goal is: when one condition is triggered, and within the next n bars another condition is triggered, then alert.
[2022-02-21 16:38:06]
John - SC Support - Posts: 38467
The easiest way to do this is to actually set the conditions you want on a single alert.

For example, let's say you want a bar within the past 3 to be a volume greater than 2000 and then you want the current bar volume to be greater than 5000. You would write the following:
=AND(OR(V[-3] > 2000, V[-2] > 2000, V[-1] > 2000), V > 5000)

Or you could use the Spreadsheet Alert if the condition is more complex and/or needs more bars.
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