Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 20:15:03 +0000



Color bar based on alert condition syntax error

View Count: 75

[2024-04-25 19:02:04]
rshimmin - Posts: 42
I am trying to color bar based on the alert condition of 4 bars being inside the range of the previous bar. I keep getting a syntax error with the following:

(h<h[-5],h[-4]<h[-5],h[-3]<h[-5],h[-2]<h[-5],h[-1]<h[-5],
l>l[-5],l[-4]>l[-5],l[-3]>l[-5],l[-2]>l[-5],l[-1]>l[-5]
)

Why is this?

Thanks
[2024-04-25 21:34:10]
John - SC Support - Posts: 31401
What you posted doesn't mean anything to the system. If these conditions are all supposed to be true at the same time to give an alert, the you need to use the AND() function, such as the following:
AND(h<h[-5],h[-4]<h[-5],h[-3]<h[-5],h[-2]<h[-5],h[-1]<h[-5],
l>l[-5],l[-4]>l[-5],l[-3]>l[-5],l[-2]>l[-5],l[-1]>l[-5]
)

Refer to the following:
Study/Chart Alerts And Scanning: OR and AND Functions
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-04-27 06:49:03]
rshimmin - Posts: 42
Thanks. That colours bar h, how do I get the colour bar based on alert to colour bar h[-5]rather than h thanks
[2024-04-27 06:49:03]
rshimmin - Posts: 42
Thanks. That colours bar h, how do I get the colour bar based on alert to colour bar h[-5]rather than h thanks
[2024-04-27 14:05:40]
Sawtooth - Posts: 3993
how do I get the colour bar based on alert to colour bar h[-5]rather than h
- Hide the first color bar study.
- Add another color bar study, using this formula on its Alerts tab:
=ID1.SG1[5]
where ID1 is the first color bar study.

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

Login

Login Page - Create Account