Support Board
Date/Time: Fri, 17 Jan 2025 23:34:29 +0000
Post From: Cell Reference
[2018-01-03 06:03:29] |
Sawtooth - Posts: 4154 |
Yes, this is possible with a spreadsheet study. You must use a Formula Column to create a persistent variable where it is brought to row 3 where you can reference it. You must use an event that can be identified with a formula, like this in P3: =IF(AND(FRACTIME(A3)>TIMEVALUE("08:00:00"),FRACTIME(A3)<TIMEVALUE("08:01:00")),ID0.SG1@3,P4) There are many variations to this concept. You can use a second IF statement to set it to 0. You can count bars since an event. You could also use the NMATCH function to find an event, then return a value with the INDEX function, using a INDEX(...NMATCH(... combination: =INDEX(B3:B1002,NMATCH(1,93,G3:G1002,0),1) This finds the most recent occurrence of the bar with 93 trades, and returns the Open price of that bar. https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#NMATCH_Function You might not need a Formula Column for this, depending on what you're doing. |