Price figures on lines

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34735 quote
    Jeff
    Participant
    New

    Hi PRTC

    I trying to get prices to display on my lies on the left hand side of the page, i can do it using the drawtext function referencing the barindex.

    Is there a way to do this?

    Any help would be appreciated

    Jeff

    #34744 quote
    Nicolas
    Keymaster
    Master

    The X-axis coordinates are in ‘barindex’ format, so we can’t draw something at a fixed point in the price chart like the upper left side of it for instance.

    I made a quick and rough code to continuously draw a text at the same barindex the indicator first met when its code has been read at each tick (4000 bars ago from the current price here). Of course it does not adapt when you are zooming price.

    defparam DRAWONLASTBARONLY=true
    defparam CALCULATEONLASTBARS=1000
    
    z=z+1
    if z = 1 then
     firstbar=barindex
    endif
    var=close
    DRAWTEXT("#var#", firstbar, close,Dialog,Bold,20)
    
    return
    drawtext-in-the-past-history.png drawtext-in-the-past-history.png
    #34749 quote
    Jeff
    Participant
    New

    Thank you Nicolas your wisdom is appreciated.

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

Price figures on lines


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
Jeff @jeff_brown Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Jeff
8 years, 9 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 05/07/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...