Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 16:01:18 +0000



[Programming Help] - Color Bar Based on Alert Condition Bollinger Bands

View Count: 1228

[2016-11-01 22:07:24]
User600819 - Posts: 43
I would like to create an alert bar that changes colors when price is 4 ticks away from upper and lower bollinger band. For example I know how to create a color bar using = H > SG3.SG1 for when the high price goes above upper the bollinger band and = L < SG3.SG3 for the low of the bar below the lower bollinger band. I want to create an alert that colors the bar when the price is 4 ticks away the upper bollinger band and 4 ticks away the lower bollinger band.

Thanks
[2016-11-02 12:48:31]
jackw - Posts: 57
Assuming Bollinger Bands is the first study on the chart (i.e. ID1):
=OR(H >= ID1.SG1 - (4 * TICKSIZE), L <= ID1.SG3 + (4 * TICKSIZE))

You can break it into 2 alerts if you want to color highs and lows differently.
[2016-11-02 13:25:15]
User600819 - Posts: 43
Thanks!!

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

Login

Login Page - Create Account