Login Page - Create Account

Support Board


Date/Time: Fri, 17 May 2024 21:24:52 +0000



Post From: Spradshet Formula Study

[2020-05-07 03:39:48]
Sawtooth - Posts: 4000
If you want the price at the open of the 9:45 bar, use this:
=IF(BARTIME=TIMEVALUE("09:45:00"),O,ID2.SG1[-1])
This formula brings the price at 9:45 to every bar from 9:45 to the current bar, so you could compare it continually to the current price.

To get the value of a study subgraph at 9:45, you'd have to use the close of the previous bar's BARTIME. So if you are using a 15 min chart, use this:
=IF(BARTIME=TIMEVALUE("09:30:00"),ID1.SG1,ID2.SG1[-1])
This formula brings the subgraph value at the close of the 9:30 bar to every bar thereafter to the current bar, so you could compare it continually to its current value.

You can also do this with a spreadsheet study, but it might not be necessary if using the Spreadsheet Formula study works for you.