Show the highest/lowest price of the chart

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #220582 quote
    JS
    Participant
    Senior

    Hi @benkunz

    The labels are tied to the “BarIndex” (the last bar) so when you zoom in or out or scroll back in time they can disappear…

    I think in the new PRT version (12) there is an instruction that you can “pin” labels to the screen… but I don’t know if you’re working with this version…

    (Peter’s solution was “almost right”)

    #220583 quote
    JS
    Participant
    Senior

    Hi @benkunz

    The “BarIndex” depends on the “units” you load in your chart, zooming in or out has no effect on the “BarIndex”…

    As I said, I don’t think there is any possibility in PRT version 11 to “fix” the labels in any other way…

    #220585 quote
    PeterSt
    Participant
    Master
    Ah, Yes, disappearing labels in the left-hand side is what you mean … No, that won’t get solved with what I said in my last post. I am not sure whether it is V12 specific (I would not think so) but since a year or so we have the Anchor directives. So you can anchor something 20 pixels from the left border etc. etc. It is quite “large” for applications. Anchoring in pixels I think that is what you mean, Jaap ? If Yes, this still requires the solution in my last post, and that would be “undoable” (the whole of the price graph will be squeezed into a horizontal line). And what remains is the lacking logic for the High and Low. This is for benkunz to solve; to me there is no logic in the high of the last 1L, 10K, 100K etc. bars (hence the content of the chart, be that the visible content after (un)zooming or be that internal. Instead,  there must be functionality in it. Like “High (and Low) since last double top (or double bottom). Or since the last Session-end. Or what I do : the past 2 hours (etc.). In any event, unrelated to zooming (which the chart always is subject to). But that is my opinion
    #220586 quote
    JS
    Participant
    Senior

    Hi,

    Thought it was something new for V12 but is also in this version…

    This allows you to “pin” the text to your screen so that it no longer disappears when zooming or scrolling…  

    DefParam DrawOnLastBarOnly=True
    
    xHigh=Highest[BarIndex+1](High)
    xLow=Lowest[BarIndex+1](Low)
    
    DrawText("High=#xHigh#",-100,-100,SansSerif,Bold,16)Coloured("Green")Anchor(TopRight)
    DrawText("Low=#xLow#",-100,100,SansSerif,Bold,16)Coloured("Red")Anchor(BottomRight)
    Return
    

    Scherm­afbeelding-2023-09-08-om-15.34.31.png Scherm­afbeelding-2023-09-08-om-15.34.31.png
    #220590 quote
    JS
    Participant
    Senior
    @PeterSt Thanks for the “pixel” tip…
Viewing 5 posts - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.

Show the highest/lowest price of the chart


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
benkunz @benkunz Participant
Summary

This topic contains 19 replies,
has 6 voices, and was last updated by JS
2 years, 5 months ago.

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