Login Page - Create Account

Support Board


Date/Time: Wed, 08 May 2024 12:49:34 +0000



Post From: Coloring bars...

[2018-07-25 17:42:21]
Sawtooth - Posts: 3993
You can color price bars that alternate their color each week using two instances of the Color Bar Based On Alert Condition study.
Use this formula for one color:
=EVEN(WEEKNUM(BARDATE))=WEEKNUM(BARDATE)
and this formula for the other color:
=ODD(WEEKNUM(BARDATE))=WEEKNUM(BARDATE)

To use more than two colors, you'll need to use the Spreadsheet Study study which would allow up to 60 weeks/colors in one study.

Add the Spreadsheet Study study and give it a name in the Spreadsheet Name field.
Set the Number of Formula Columns to your needs (16-60).

Put this formula in cell K1:
=WEEKNUM(A3)
Put this formula in K3:
=WEEKNUM(A3)=$K$1
Put this formula in L3:
=WEEKNUM(A3)=$K$1-1
Put this formula in M3:
=WEEKNUM(A3)=$K$1-2

Continue with columns to the right, decrementing the referenced week number for each additional column.
For each subgraph on the Subgraphs tab, set the Draw Style to Color Bar and choose each color.