Support Board
Date/Time: Tue, 26 Nov 2024 04:51:51 +0000
color bar based on alert condition
View Count: 308
[2023-12-14 07:37:02] |
User136282 - Posts: 11 |
Hello, im looking to color certain candles, based off the color bar based on alert condition study in conjunction with the numbers bars calculated values study, I dont have any trouble setting a simple alert condition, an example of an alert condition would be id2.sg4<3. The trouble im running into is that some of these contain negative numbers, so the example i just posted would be turning all of the negative values to my selected bar color, which is not what i want. So for the example i posted sg4<3, is there a way to do this while ignoring the negative values? so anything over zero or 1 but under 3 would be shown? hope this makes sense, thanks ahead of time
|
[2023-12-14 15:29:46] |
John - SC Support - Posts: 36286 |
Use the AND() function to make your test only for positive values. So your condition would be the following: =AND(ID2.SG4 < 3, ID2.SG4 > 0) For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2024-01-09 08:20:42] |
User136282 - Posts: 11 |
=AND(ID2.SG4 < 3, ID2.SG4 > 0) Thanks John this worked great. Only issue Im having is that I tried to change the ID2.SG4 > 0 to a ID2.SG4 < 0 in the hopes of testing only for negative values, but i was unsuccessful.
|
[2024-01-09 18:35:15] |
John - SC Support - Posts: 36286 |
So you had the following condition? =AND(ID2.SG4 < 3, ID2.SG4 < 0) This should work, it is a bit overkill, as you could just have the following: =ID2.SG4 < 0 If this is not working, let us know. 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: