Date and time for drawtext

Forums ProRealTime English forum ProBuilder support Date and time for drawtext

Viewing 5 posts - 1 through 5 (of 5 total)
  • #37285

    Hi. Hope someone can understand and maybe help me

    I have made an simple indicator who shows the highs and low in a chart.

    I use “drawtext “to write date or time for the highs and lows

    The problem is I don’t find the right code for time and date. For time I would like to show hhmm as 09.00, 10.20 and so on. Not only 9 or 10.2.

    And for date as 04 May, 10 April and so on.  For date I have wrote as this

    DRAWTEXT(“#a#”, BarIndex[2], high[2]+4, dialog,bold,12) This not work good Shows on the screen like this 20,170.523

    and for time as this
    DRAWTEXT(“#a#”, BarIndex[2], high[2]+0.5, dialog,Bold,12) Time is ok but can be better.



    Variables can’t store strings. So you’ll always get numbers for months for example. Unless you make a conditional statement for each month : if month=4 then DRAWTEXT (“April”, …)

    Why not use Day + Month + Year to write the date instead of OpenDate? Same for OpenTime, you could use Hour + Minute instead.


    Hi Nicolas,

    Could you help me with a problem similar to the previous one. In version 12 of the platform, the M appears and I cannot know what date it is.

    Mi código es el siguiente:

    Thank you so much.


    M stands for MILLIONS, date 20240510 is a number over 20M and is displayed as such.

    You need to decompose it into Day, Month, Year, then using the 3 separate values with DRAWTEXT:

    1 user thanked author for this post.

    Hi Roberto,

    This way of visualizing the date has been very useful to me.

    Thank you so much.

    1 user thanked author for this post.
Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login