Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 18:46:11 +0000



[Programming Help] - Color Bar Based on Alert Formula

View Count: 993

[2018-08-22 22:19:58]
User68474 - Posts: 195
I have no problem creating either a "Color Bar[or]Background Based on Alert" study successfully to highlight those bars whose High or Low are the actual "Reversal Price" of a/the Zig Zag Study by using the Formula "=OR(H=ID7.SG3,L=ID7.SG3)", having taken ID7.SG3 right from the "Study Settings>Subgraphs" tab for the applied ZZ study. I would like to use either of those study types (Color Bar/Background) to create another study to color the bar immediately following each of those "Reversal Bars", as I like to call them. I've tried "=OR(H[-1]=ID7.SG3,L[-1]=ID7.SG3)" and I get random "colorings", usually on SOME of the already previously correctly colored "Reversal Bars". Any advice on how to accurately correct and accomplish this?
[2018-08-23 01:24:09]
Sawtooth - Posts: 3992
Use the original formula =OR(H=ID7.SG3,L=ID7.SG3) then, on the Subgraphs tab, set the Displacement to -1.
[2018-08-23 06:09:47]
User68474 - Posts: 195
Thanks, Tomgilb, as always. Displacement at -1 did not work, so I tried 1 and it did! More questions about this to come, since getting that down was just the first component of a desired multi-conditional formula, the purpose of which will be primarily to mine data from the spreadsheet and then use that data to dig just a bit deeper.
Date Time Of Last Edit: 2018-08-23 06:10:42

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

Login

Login Page - Create Account