Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 13:38:40 +0000



[Programming Help] - Alert on the color of the indicator.

View Count: 622

[2019-01-06 20:55:34]
2garin - Posts: 184
Good afternoon support.
Is it possible to create alerts by indicator color?
Tell me please: How to create an alert in ColorBackgroundBasedonAlertCondition for all blue bars above zero?
image12.jpg / V - Attached On 2019-01-06 20:54:19 UTC - Size: 187.5 KB - 290 views
[2019-01-06 21:55:02]
Sawtooth - Posts: 3976
The blue bars are up-sloped, so use a formula like this for an alert at every blue bar above zero:
=AND(ID5.SG1>ID5.SG1[-1],ID5.SG1>0)

If you want an alert at the first blue bar above zero, use this:
=OR(
AND(ID5.SG1[-2]>ID5.SG1[-1],ID5.SG1>ID5.SG1[-1],ID5.SG1>0),
AND(ID5.SG1>ID5.SG1[-1],ID5.SG1[-1]<0,ID5.SG1>0))
[2019-01-06 23:28:59]
2garin - Posts: 184
With equal bars height, the color is inverted.
How to mark blue bars in similar situations?
In the next releases of the terminal, you can add a function that returns the value of one of the colors of the indicator colors?
image13.jpg / V - Attached On 2019-01-06 23:28:49 UTC - Size: 66.9 KB - 234 views
[2019-01-06 23:30:45]
Sawtooth - Posts: 3976
First, I'm a user, not SC Support.

Second, if the bars change color, they are not the same height.
[2019-01-06 23:35:39]
2garin - Posts: 184
increased the number of decimal places and the condition worked.
image14.jpg / V - Attached On 2019-01-06 23:35:32 UTC - Size: 97.82 KB - 281 views
[2019-01-09 09:18:27]
2garin - Posts: 184
How to mark all the bars in red (and equal too)?
image21.jpg / V - Attached On 2019-01-09 09:18:16 UTC - Size: 91.15 KB - 236 views
[2019-01-09 15:15:49]
Sawtooth - Posts: 3976
Try this:
=AND(ID4.SG1<=ID4.SG1[-1],ID4.SG1>0)

If you look at the documentation and examples for alerts, you will be able to write your own formulas:
Study/Chart Alerts And Scanning: Alert Condition Formula Format
Study/Chart Alerts And Scanning: Alert Formula Examples

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

Login

Login Page - Create Account