Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 02:07:21 +0000



[User Discussion] - Change Background Color on Alternate Days.

View Count: 1386

[2014-01-16 20:55:29]
User94614 - Posts: 13
Is it possible to change the Background Color slightly on Alternate Days so day Start/End is obvious?
[2014-01-16 21:22:55]
Sawtooth - Posts: 3976
You could use the Color Background Based On Alert Condition study, with this formula on the Alerts tab:

=ISEVEN(BARDATE)

This works if Sundays are excluded. If Sundays are included, you could color them differently using another instance of the Color Background study with this formula:

=WEEKDAY(BARDATE)=1
[2014-01-16 23:04:12]
User94614 - Posts: 13
Thanks, I tried it and it fails when there is a Monday holiday because Tuesday and Friday both have even or odd dates.

If I could use the bar number instead of the date it should work or if KI could test for the previous day's backgroud color.
[2014-01-16 23:52:02]
Sawtooth - Posts: 3976
OK,

You can do what you want with the Spreadsheet Study study.

-Put this formula in cell K3:
=ISEVEN(O3)
-Put this formula in cell O3:
=IF(INT(A3)>INT(A4),O4+1,O4)
-Set the Draw Style of K(SG1) to Background
[2014-01-21 12:45:37]
User94614 - Posts: 13
Thanks, I got that to work.

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

Login

Login Page - Create Account