Hi All,
I’m currently trying to write some code to calculate a daily pivot point using the following code:
//Pivot Point (day 1)
IF dayofweek = 1 THEN
dayhigh = DHigh(2)
daylow = DLow(2)
dayclose = DClose(2)
ENDIF
// Pivot Point (day 2-6)
IF dayofweek >=2 and dayofweek < 6 THEN
dayhigh = DHigh(1)
daylow = DLow(1)
dayclose = DClose(1)
ENDIF
//Pivot Point
PPday = (dayhigh + daylow + dayclose) / 3
How would I edit this code so that the daily pivot is calculated using an open value at 22:00 T-2 days and a close value at 21:59.59 on T-1 days? The current calculation is being calculated from midnight for the open and 11:59.59 for the close.
Is this possible to do?
Thanks in advance for the help.