Login Page - Create Account

Support Board


Date/Time: Thu, 09 May 2024 11:37:40 +0000



Post From: How to create alert background condition with one subgraphs or none

[2018-02-06 15:40:43]
Sawtooth - Posts: 3993
In most cases, C>O will find an up-bar, and C<O will find a down-bar.

To always match the coloring of up and down bars, you'll need to use a spreadsheet study to create a persistent variable with this formula:
=IF(OR(E3>B3,AND(B3>E4,B3=E3)),1,IF(OR(E3<B3,AND(B3<E4,B3=E3)),-1,T4))
This example formula would be entered in cell T3, a Formula Column.
It returns a 1 if price bar is up-colored or a -1 if price bar is down-colored.

You could then reference column T in your formula, now on the spreadsheet using the spreadsheet syntax, e.g. in cell U3:
AND(ID1.SG14@3>0,T3=1)