draw price on horizontal segement

Forums ProRealTime English forum ProBuilder support draw price on horizontal segement

Viewing 4 posts - 1 through 4 (of 4 total)
  • #231340

    Hi

    I have an indicator which draws a horizontal segment for a given set of conditions, i would like to have it display the price that the segment is drawn at and have played around with various Anchor commands and drawtext options but cannot get it draw the price on the segment. Is there a way of doing this? Thanks

    The relevant section of the code:

    if conditions and not conditions[1] and sigdown then

    drawarrowUP(barindex,low-10) COLOURED (0,255,0)
    memobar=barindex
    memolow=low
    memohigh=high
    sigup=1
    sigdown=0

    DRAWSEGMENT(memobar, memohigh+1, memobar+5, memohigh+1)STYLE (DOTTEDLINE,1)COLOURED (255,255,0)
    DRAWSEGMENT(memobar, memohigh+1, memobar+5, memohigh+1)COLOURED (0,255,0)
    DRAWSEGMENT(memobar, memoLOW, memobar+5, memoLOW)COLOURED (0,255,0)

    1 user thanked author for this post.
    #231346

    Hi!
    Here you have an example:
    You have to write drawtext("#yourvar#",x,y)

    1 user thanked author for this post.
    #231349

    Brilliant, thank you!

    #231357

    Hi..

    Using ‘drawtext()’ can get a bit tricky, since no ‘mask’ of text, creating a smudge effect when chart scrolls.

    Often you have to use ‘DEFPARAM drawOnLastBarOnly = true’  to avoid that, but this affects historical drawn items, if there required!

    Then you may decide on using two similar indicators, one =true for text and other = false for historical draw items, overlapped on same chart pane.

    Here’s a different example I thought up after seeing your post, didn’t realise this myself till trying it, so may be gremlins out of sight!

    druby

     

Viewing 4 posts - 1 through 4 (of 4 total)

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