Draw vertical line

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #40999 quote
    Pere
    Participant
    Veteran

    Hi all.

    How can I code to draw a vertical line (DRAWVLINE) every day at 9:00 hours? I am using PRT 10.3

    #41001 quote
    Nicolas
    Keymaster
    Master

    With DRAWVLINE keyword. It should look like something like this: (not tested)

    if time=090000 then 
     drawvline(barindex)
    endif
    
    return

    Everyday at nine o’clock, a vertical line should be plotted. Please tell me if it is not the case 🙂

    #41002 quote
    Pere
    Participant
    Veteran

    Thank you Nicolas, but unfortunately it does not work.

    It only plots the vertical line once, the first time that time=090000, not every day.

    #41005 quote
    Nicolas
    Keymaster
    Master

    It works for me. Please be sure to attach the indicator on a security which have a candlestick at 9 o’clock every day.

    #41009 quote
    Pere
    Participant
    Veteran

    Thanks Nicolas.

    It’s strange: I have the graphic in TF 1H, and the first bar is 9:00 and the last one at 17:00.

    However, if I write time=100000 instead 090000, then it works perfectly, plotting the vertical line on the first bar every day, that means, at 9:00.

    Thanks anyway.

    #41010 quote
    Nicolas
    Keymaster
    Master

    Ok, so if the instrument have a starting time at 090000, change the “time” keyword in my code with “opentime” instead, it should be ok.

    #41015 quote
    Pere
    Participant
    Veteran

    With opentime it doesn’t work in my graphic, but no problem, with time=100000 it’s perfect!

    Thanks again!

    #87595 quote
    simeong
    Participant
    Average

    Hi Nicolas,

    I have tried this on the USDJPY and it works well. However it is appearing below the price action price chart on the indicator page and  not on the chart. Is they anyway to place it on the price action chart like you have in your picture ?

    Thanks for the insight and support

     

    Kind Regards,

    #87597 quote
    robertogozzi
    Moderator
    Master

    @simeong, please do not double post.

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

Draw vertical line


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Pere @petrus Participant
Summary

This topic contains 8 replies,
has 4 voices, and was last updated by robertogozzi
7 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/18/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...