Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 11:45:21 +0000



Post From: VWAP FORMULA FOR SPREADSHEET

[2021-07-03 21:13:38]
Sawtooth - Posts: 3992
To extract the previous RTH Close, try this:
Cell R3:
=IF(MROUND(FRACTIME(A3),1/86400)=TIMEVALUE("22:15:00"),E4,R4)
This will round the Time of the DateTime to 1 second, and compare it to the timevalue of 22:15:00.
If they are equal, it will persist the Close of the previous bar until the next 22:15:00.
This is the Gap line.
Set the Draw Style to Dash.

To calculate the Half Gap, use two more columns:
Cell S3:
=IF(MROUND(FRACTIME(A3),1/86400)=TIMEVALUE("15:30:00"),B3,IF(MROUND(FRACTIME(A3),1/86400)=TIMEVALUE("22:15:00"),0,S4))
This will extract the RTH Open and make it persistent until the RTH Close.
Set the Draw Style to Hidden or Ignore.

Cell T3:
=IF(S3>0,AVERAGE(R3,S3),0)
This is the Half Gap line.
Set the Draw Style to Dash.