Support Board
Date/Time: Sat, 23 Nov 2024 02:28:33 +0000
Post From: How to wait for 2 new bars before calculating a value in the Spreadsheet alert study?
[2024-09-19 22:13:34] |
C_Money - Posts: 64 |
Column O just represents whenever an HH,LL,HL,LH gets printed and they're denoted by numbers 1 - 4. I was really just trying to create a 5 bar range where anytime there was a 1 - 4, I would capture the lows and highs 2 bars behind and 2 bars ahead of it and then record the highest high and lowest low, and then clamp the result so it doesn't exceed a certain value. X3 would have the lowest low and Y3 would have the highest high and I'd plot those with the subgraph. I tried referencing row 5 but then the 5 bar range I was looking for would be in the wrong place. (let it be said I always hated excel and I'm terrible with numbers..) The closest I got for the highs was: =IF(AND(O3>=1, O3<=4), MAX(OFFSET(ID0.SG2@3, 0, 0, 5, 1)), "")
and for the lows:=IF(AND(O3>=1, O3<=4), MIN(OFFSET(ID0.SG3@3, 0, 0, 5, 1)), "")
I was thinking if I could write in both formulas in X5 and Y5 (and reference X3 and Y3), the above would work but the formulas don't copy down from those rows and when a new bar prints, the formula doesn't stay in those cells. Date Time Of Last Edit: 2024-09-19 22:20:34
|