Login Page - Create Account

Support Board


Date/Time: Mon, 13 May 2024 16:11:10 +0000



Color Bar based on Alert Condition

View Count: 3968

[2017-07-04 13:44:25]
ecerejo - Posts: 16
I'd like to have one candle to change color when my 40 period Hull Moving Average changes from bullish color to Bearish color and vice versa. What code should I enter in the settings of this study?
[2017-07-05 05:14:05]
Sierra Chart Engineering - Posts: 104368
from bullish color to Bearish color
How would this be determined?

If you want to check for the change in slope, then look at example 8 here:
Study/Chart Alerts And Scanning: Alert Formula Examples

Here are the instructions to enter this on a study:
Study/Chart Alerts And Scanning: To Enter an Alert Condition on a Study

This can also be used with the Color Bar Based on Alert Condition study. Just make sure that you modify the formula to reference the ID number of the study:
Study/Chart Alerts And Scanning: Referencing Other Studies on the Chart
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-07-05 12:46:56]
ecerejo - Posts: 16
How would this be determined?

https://snag.gy/vG7Ias.jpg on this image you see the 40 period HMA changing colors when the trend changes, I do not want to have the HMA visible because of Bollinger Bands, I want my charts as clean as possible but I would like to know when this 40 period moving average changes color by coloring the first candle when that happens. The auto-coloring in this HMA is set to "Based on slope". I want the the bar to turn white when the HMA turns white and I want to turn blue when the HMA turns blue.
Date Time Of Last Edit: 2017-07-05 13:28:19
[2017-07-05 16:29:29]
Sierra Chart Engineering - Posts: 104368
In the future, when posting an image of a chart only follow this method here:
https://www.sierrachart.com/index.php?page=PostingInformation.php#Image

As a matter of policy and also technical reasons, these outside sites are not fully accessible for security reasons from our systems.

To color based on slope, the formula we linked to is correct (formula example #8).

If you want to do two different colors, you need to use two instances of the Color Bar Based on Alert Condition study.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2017-07-05 16:29:44

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

Login

Login Page - Create Account