I’m currently trying to write some code to calculate a daily pivot point using the following code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Pivot Point (day 1)
IFdayofweek=1THEN
dayhigh=DHigh(2)
daylow=DLow(2)
dayclose=DClose(2)
ENDIF
// Pivot Point (day 2-6)
IFdayofweek>=2anddayofweek<6THEN
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.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue