New drawing instructions: anchoring in pixels

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #190094 quote
    Nicolas
    Keymaster
    Master

    Let’s discover together a new way to position the graphic objects on a price chart, with the coordinates in pixels!
    This is a much-awaited feature as it will allow to fix graphic objects (including texts) at precise places of the chart, without it moving according to the barindex or the price as it is currently the case.
    It will of course still be possible to choose whether the object uses BARINDEX/PRICE coordinates or only PIXELS/PIXELS or even a mix of the 2!

    Below is a list of the new instructions:


    So we have the possibility to set an anchor point like this :

    drawtext ("test", 50 ,30) anchor(bottomleft)

    The new keywords are :

    • Xshift : defines an abscissa coordinate in pixel offset from the anchor point
    • Yshift : defines an ordinate coordinate in vertical pixel offset from the anchor point
    • Index : Defines an abscissa coordinate in barindex (classic way)
    • Value : Set an ordinate coordinate in price/value (classic way)
    • bottomright : bottom-right corner of the chart, the offset values will always be negative to shift left (X axis) and positive to shift up (Y axis).
    • bottomleft : bottom-left corner of the graph
      the offset values will always be positive in order to shift to the right (X axis) and up (Y axis).
    • topright : top-right corner of the graph
      the offset values will always be negative in order to shift to the left (X axis) and down (Y axis).
    • topleft : top-left corner of the graph
      the offset values will always be positive in order to shift to the right (X axis) and negative in order to shift down (Y axis).
    • right : middle-right point of the graph
      the shift values will always be negative to shift to the left (X axis) and can be positive or negative to shift up(+)/down(-) (Y axis)
    • left : middle-left point of the graph
      the shift values will always be positive to shift to the right (X axis) and can be positive or negative to shift up(+)/down(-) (Y axis)
    • top : middle-top point of the graph
      the shift values can be positive or negative for shift right(+)/left(-) (X axis) and will always be negative to shift down (Y axis)
    • bottom : middle-low point of the graph
      the shift values can be positive or negative for shift to the right(+)/left(-) (X-Axis) and will always be positive in order to shift up (Y-Axis)
    • middle: middle point of the graph
      the shift values can be positive or negative for shift to the right(+)/left(-) (X-Axis) and can be positive or negative for shift up(+)/down(-) (Y-Axis)

    I will post few examples in the below posts.

    JC_Bywan, JS, ZeroCafeine and 9 others thanked this post
    #190103 quote
    Nicolas
    Keymaster
    Master

    Some more examples:
    Write the word “test” on the current barindex and at the value of the current close:

    drawtext ("test", barindex ,close)

    Write the word “test” 50 pixels to the right and 30 pixels higher than the bottom-left corner of the graph.

    drawtext ("test", 50 ,30) anchor(bottomleft)

    Write the word “test” on the current barindex 30 pixel higher than the bottom of the graphic.

    drawtext ("test", barindex ,30) anchor(bottom,index,yshift)

    Write the word “test” in the middle of the chart at the height of the candlestick high.

    drawtext ("test", 0 ,high) anchor(middle,xshift,value)
    Bel thanked this post
    #190263 quote
    robert123
    Participant
    Master

    Hi Nicolas,

    Is there a list of any other additions in this update, and any idea when this update will be available?

    Many thanks,

    Robert

    #190352 quote
    Nicolas
    Keymaster
    Master

    These new instructions are available since yesterday for PRT soft account (https://www.prorealtime.com)

    It is a matter of few weeks to get them on all other versions available (IB, IG, ..).

    #190384 quote
    robert123
    Participant
    Master

    Thank you Nicolas

    #190385 quote
    Nicolas
    Keymaster
    Master

    I’m preparing a tutorial on how to use the new keywords, but changes are massive and hard to explain in a simple and precise manner at the same time 😆

    #193797 quote
    Nicolas
    Keymaster
    Master

    Since my last posts these new instructions are available for any user of ProRealTime, enjoy!

    #193823 quote
    Quino
    Participant
    Average

    Hi Nicolas,

    Is there a way to get a list (file as pdf, excel sheet…) to be downloaded  of the current instructions, new ones since V10, under test but usable…) ?

    If we miss this forum threads, we miss very powerful and interresting instruction such as BarsSince, Achor ….

    Thanks

    #193825 quote
    Nicolas
    Keymaster
    Master

    All keywords (except those above) are available in our online documentation here: https://www.prorealcode.com/prorealtime-documentation/

    Bel thanked this post
    #226110 quote
    Ringo
    Participant
    Junior

    Hello,

    is there a way to add fontsize and colour options to the term.

    like this: SansSerif,Bold,10)coloured(255,5,5)

    What would it look like?

     

    Thanks for help

    #226116 quote
    JS
    Participant
    Senior

    Hi Ringo,

    Do you mean this…?

     

    DRAWTEXT("Test",50,30,SansSerif,Bold,22)Anchor(BottomLeft)COLOURED("Red")
    Return
    Ringo and gp38super thanked this post
    #226120 quote
    Ringo
    Participant
    Junior

    Exactly, thanks a lot JS

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

New drawing instructions: anchoring in pixels


ProBuilder support

New Reply
Author
author-avatar
Nicolas @nicolas Keymaster
Summary

This topic contains 11 replies,
has 6 voices, and was last updated by Ringo
2 years ago.

Topic Details
Forum: ProBuilder support
Language: English
Started: 03/17/2022
Status: Active
Attachments: 2 files
Logo Logo
Loading...