Pivot Point HLC Calculation

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #155042 quote
    sachmo13
    Participant
    New

    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.
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Pivot Point HLC Calculation


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
sachmo13 @sachmo13 Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/23/2020
Status: Active
Attachments: No files
Logo Logo
Loading...