Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to define point X

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to define point X

    Hello,

    I need to place text to the top edge of the chart, towards the end of each session. Defining point Y is easy, but how can I define point X in this case? (Of course I´m referring to OnRender).

    Thank you

    #2
    Hello emuns,

    You can use the ChartPanel object to determine the panel coordinates. If you mean the top right that would be the

    Code:
    ChartPanel.X + ChartPanel.W - YourTextWidth

    Comment


      #3
      Hello Jesse,

      OK, but than there will be only one text.
      Let´s say I have 30min chart. I see three sessions in the range shown on the chart. Thus, I would like to see three texts, each at the end of its respective session. Not one text in the top right corner!

      Comment


        #4
        Hello emuns,

        If you wanted to pin the text to specific dates you would need to get the dates from the series to know when to render it. You can see an example of looping over the currently visible bars and getting data from a plot using the Values collection and GetValueAt beow. You could use the Time series if you wanted to see if a specific time is within the currently rendered bars. If the bar in question is within the loop you could render text for that during that loop.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        81 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        55 views
        0 likes
        Last Post CarlTrading  
        Working...
        X