Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 14:06:34 +0000



Color bar based on alert

View Count: 1160

[2013-11-10 01:18:29]
Bedhog - Posts: 165
Hello All,

This condition colors a bar by itself
=AND(CROSSFROMBELOW(ID4.SG1,-100))

This condition colors a bar by itself
=AND(ID15.SG1>100)

But when I string them together like either one of these, nothing happens and there are no errors in the alert manager.
=AND(CROSSFROMBELOW(ID4.SG1,-100),ID15.SG1>100)
=AND(CROSSFROMBELOW(ID4.SG1,-100),(ID15.SG1>100))

Thank you in advance.

[2013-11-10 04:54:05]
Sawtooth - Posts: 3952
The CROSSFROMBELOW happens on only one bar, when ID4.SG1 crosses -100.
The ID15.SG1 is not greater than 100 at that bar.

When they are together, the result is always FALSE.
They must both be TRUE at the same time when using AND.
Maybe you want to use OR instead.

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

Login

Login Page - Create Account