Support Board
Date/Time: Fri, 07 Feb 2025 14:57:34 +0000
Post From: Spreadsheet formula change a study color
[2022-10-11 01:46:08] |
Sawtooth - Posts: 4173 |
Using the Color Bar Based On Alert Condition study, create a persistent TRUE for one condition and release it when the opposite condition is TRUE. Then do the opposite in a second instance of the color bar study. 1. Add the Color Bar Based On Alert Condition study - Set the 'Output When Condition True' to 'Study Subgraph Reference' - Set the 'Study Subgraph Reference Value When True' to the ID#.SG1 of the Keltner Channel study. - Set the Draw Style to Line - Skip Zeros - Set the line color to Green - Use a formula like this on the Alerts tab: =IF(C>ID3.SG2,1,IF(C<ID3.SG3,0,ID5.SG1[-1])) where ID3 is the Keltner study, and ID5 is this color bar study. 2. Duplicate the above color bar study - Set the line color to Red - Use a formula like this on the Alerts tab: =IF(C<ID3.SG3,1,IF(C>ID3.SG2,0,ID6.SG1[-1])) where ID3 is the Keltner study, and ID6 is this color bar study. Note: the Keltner Channel study must be above both color bar studies in the Studies to Graph list. |