Previous day closing price

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #94028 quote
    segie
    Participant
    Senior

    Good day,

    How can I make the previous  day closing price e.g 16h35 appear on the opening candle of the next day e.g 08h00. With the difference calculated

    Can use Dax as the example. Basically want to gauge the Gap when the market opens

     

    Regards,

    Segie

    #94035 quote
    robertogozzi
    Moderator
    Master

    There you go

    DEFPARAM CalculateOnLastBars = 2000
    DEFPARAM DrawOnLastBarOnly   = true
    Offset1 = 15 * pipsize
    Offset2 = Offset1 * 2
    IF time = 163500 THEN
       ClosingPrice = close
    ENDIF
    IF time = 080000 THEN
       Percentage = 100 - ((close * 100) / ClosingPrice)
       MyBar      = BarIndex
       MyPrice    = high
    ENDIF
    DRAWTEXT("Price 16:35 #ClosingPrice#", MyBar, MyPrice + offset1) COLOURED(0,128,0,255)
    DRAWTEXT("Difference #Percentage#", MyBar, MyPrice + offset2) COLOURED(128,0,0,255)
    RETURN
    Nicolas thanked this post
    x-10.jpg x-10.jpg
    #94198 quote
    segie
    Participant
    Senior

    Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Previous day closing price


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
segie @segie Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by segie
6 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/19/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...