Draw Vertical Line only weekly Friday 2100

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #83421 quote
    Angus Thomson
    Participant
    Junior

    Hello all,

    I’m trying to make an indicator that draws a vertical line every Friday at 2100 (close of the week)

    I had a crack but it’s not accepting it…

    IF CurrentDayOfWeek = 2 then
    if DayOfWeek = 5
    if Time=210000 then
    DRAWVLINE(barindex)
    ENDIF
    
    return

    Can anyone advise please?

    Thanks, Angus

    #83427 quote
    Vonasi
    Moderator
    Master

    Welcome to the forums. Please use the ‘Insert PRT Code’ button when posting code in future poststo the forums as it makes it easier for others to read. I have tidied up your post for you. 🙂

    Your code is short of some ENDIF’s and a THEN but also it is not possible to draw in the future. This will draw a vertical line every time 210000 bar occurs but not into the future:

    if OpenDayOfWeek = 5 then
    if Time = 210000 then
    DRAWVLINE(barindex)
    endif
    endif
    
    return
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Draw Vertical Line only weekly Friday 2100


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Vonasi
7 years, 3 months ago.

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