Draw vertical line with Text.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #46050 quote
    Andre Vorster
    Participant
    Senior

    Hello.

    I want to add the text “DAX-Open” when drawing a vertical line at 07:00.
    I use code below to draw the line at 07:00 on DAX open but I cant get it to add only the text with a Font size/type/colour.
    I cant find the answer in https://www.prorealcode.com/documentation/drawtext/

    I will appreciate some assistance or point me in the direction where I can find the solution.
    Thank you.

    #######################
    if time=070000 then //DAX Open UTC+1
    drawvline(barindex)

    endif

    return
    #######################

    #46120 quote
    Nicolas
    Keymaster
    Master

    Where do you want to draw the text?

    #46133 quote
    Andre Vorster
    Participant
    Senior

    Thank you for the reply.

    Any of the two following options will be great.

    Preferable if the text can be parallel with the vertical line.
    Or
    If the text can be horizontal(90 Deg) to the vertical line. Somewhere in the middle of the screen or even at the bottom will also be fine.

    Whichever is possible.
    Thank you.

    #46469 quote
    Nicolas
    Keymaster
    Master

    It is not possible to draw text vertically (or any degree rotation from the normal horizontal line).

    if time=070000 then //DAX Open UTC+1
     drawvline(barindex)
     atr=averagetruerange[14]
     drawtext("DAX Open",barindex,low-atr)
    endif
    
    return

    Since coordinates are in barindex number and price, you’ll have to set the best place to plot the text, I made it with the Low of the DAX open bar minus one ATR.

    #46494 quote
    Andre Vorster
    Participant
    Senior

    Thank you Nicolas.

    This is good.

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

Draw vertical line with Text.


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Andre Vorster
8 years, 4 months ago.

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