Support Board
Date/Time: Wed, 19 Mar 2025 23:20:21 +0000
formula help
View Count: 513
[2022-10-28 07:41:27] |
User486817 - Posts: 83 |
hello, i am using two spreadsheet formulas to calculate the number of bars since a slope change. i'm trying to use the same formulas for an SG whose alert is =ID4.SG2<>0 but i cannot get it to work. my formulas look like this: ID10 SPREADSHEET FORMULA STUDY =ID4.SG2<>0 ID11 SPREADSHEET FORMULA STUDY (to determine how many bars it has been since the last time ID10 (ID4.SG2) was not equal to zero) IF(ID10.SG1<>0,ID11.SG1[-1]+1,0) i've tried this and i cannot get it to print the number of bars it has been since ID10 was true. is there a way to do this? kindest regards, |
[2022-10-28 12:46:44] |
Sawtooth - Posts: 4186 |
I tried this and it works for me, using this setup: Color Bar Based On Alert Condition study (ID1) with this formula on the Alerts tab: =O>C Spreadsheet Formula study (ID2) with this formula in the Formula field: =IF(ID1.SG1<>0,ID2.SG1[-1]+1,0) Chart Region set to 1 Draw Style set to Value on Low |
![]() |
[2022-11-01 09:45:46] |
User486817 - Posts: 83 |
hello tomglib, thank you for your help. i got it all to work. kindest regards, |
To post a message in this thread, you need to log in with your Sierra Chart account: