Support Board
Date/Time: Fri, 07 Feb 2025 15:20:56 +0000
color bars over for x number of days
View Count: 578
[2020-11-20 15:31:39] |
charl vorster - Posts: 6 |
hi, can you please help me with a study to color the chart bars for the past 10 day and past 5 days in 2 different colors? thanks |
[2020-11-20 15:57:45] |
Ackin - Posts: 1865 |
Color Background Based on Alert Condition Color Background Based on Alert Condition example: Study settings - Alerts tab: =DAY(BARDATE)>15 -marks all bars with dates higher than fifteenth day a month (15 is just an example, you put the number xy there what you need "current date - 10 days = xy"). You can manually change it every day in the formula for how many days back you need. Sure, there are more efficient ways without interfering to the formula, but this is one of the fastest |
[2020-11-21 00:14:36] |
Sawtooth - Posts: 4173 |
You can do this with 4 instances of the Color Bar Based On Alert Condition study: Use this formula in the 1st instance, and Hide this instance: =C[10] This finds all bars < [-10] Use this formula in the 2nd instance, and choose your color bar color: =ID1.SG1=0 where the 1st instance is ID1; edit as needed. Use this formula in the 3rd instance, and Hide this instance: =C[5] This finds all bars < [-5] Use this formula in the 4th instance, and choose a different color bar color: =ID3.SG1=0 where the 3rd instance is ID3; edit as needed. Note: all 4 instances must be in order in the Studies to Graph list so that the 5 previous color bars overpaint the 10 previous color bars. You can also do this with two formulas in one instance of the Spreadsheet Study study. Date Time Of Last Edit: 2020-11-21 00:27:12
|
[2020-11-21 01:21:29] |
charl vorster - Posts: 6 |
That's perfect, thank you
|
To post a message in this thread, you need to log in with your Sierra Chart account: