Date/Time: Thu, 18 Oct 2018 10:44:19 +0000
Post From: Cell Reference
|tomgilb - Posts: 1970|
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:
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:
This finds the most recent occurrence of the bar with 93 trades, and returns the Open price of that bar.
You might not need a Formula Column for this, depending on what you're doing.