Horizontal line in chart on price

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

    Hello.

    On the IG web trading interface the current price has draws a horizontal indicator line across the chart.
    That function makes it easy to line up the current price/candle with previous price/candles.
    (see attached image as ref to what is shown in IG platform)

    I need the same function on PRT please.

    I will appreciate it if someone can write this indicator.

    Thank you
    Andre Vorster.

    line.jpg line.jpg
    #248502 quote
    PeterSt
    Participant
    Master
    defparam drawonlastbaronly = true
    
    DrawHLine(close[0]) coloured(248,128,0,192) Style(DottedLine,1)
    
    Dummy = 0
    Return Dummy
    

    🙂

    robertogozzi and Iván González thanked this post
    #248504 quote
    Andre Vorster
    Participant
    Senior

    Great!
    Thank you.

    #248548 quote
    Andre Vorster
    Participant
    Senior

    I modified your code a bit.
    Draws a solid line and can modify the line thickness.

    //Draws horizontal line across screen at price level across chart.
    defparam drawonlastbaronly = true
    DrawHLine(close) coloured(96, 137, 154) Style(Line, 2)  //(Line,2) = line thickness
    Dummy = 0
    Return Dummy

    #248556 quote
    JC_Bywan
    Moderator
    Master

    Hi,

    in case you’re ok with a built-in solution instead of a custom code, you can go in the “price” properties window, and at the bottom of this window you have buttons to choose which horizontal line you want to add (maybe you’ll have to scroll down to see them inside the window) , current close is part of the available choices. Once added, you can also customise this added line (color, thickness, style, make it an infinite line instead of a segment…). Valid for both PRTv11 and v12.

    Iván González thanked this post
    #248557 quote
    JC_Bywan
    Moderator
    Master

    Illustration attached of menu buttons positions inside the 2 consecutive windows, the price properties first, then the newly added horizontal line properties with the “prolonger sur tout le graphique” box ticked (I guess it might be in an English menu “extend to the entire chart” or something like that…).

    v12lineonclose.png v12lineonclose.png
    #248571 quote
    Andre Vorster
    Participant
    Senior

    A thank you to all the replies. Solved
    Appreciated.

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

Horizontal line in chart on price


General Trading: Market Analysis & Manual Trading

New Reply
Author
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by Andre Vorster
7 months, 2 weeks ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 06/23/2025
Status: Active
Attachments: 2 files
Logo Logo
Loading...