Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to Get/Use values from the bar that the chart cursor is hovering over

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

    How to Get/Use values from the bar that the chart cursor is hovering over

    I want to create a kind of "Stop Light" display on my chart using either circles/squares in a fixed location on the chart, which are shaded Green/Yellow/Red based on logic using other indicators. etc. (this part I know how to do that).

    But I want to be able to scroll back in time on the chart with the cursor and have these stop lights change colors based on the bar I am on at any particular crosshairs location. In essence, like the databox displays the information based on the bar you are scrolling over-except I want to shade fixed squares based on the bar I am hovering over.

    I have experimented using text displays (FixedText) - to display text...but they only display the live bar, and I can't scroll back and have the fixed text change.

    Can you suggest a path forward? Or have any examples of this 'behavior' I can model my solution after?

    #2
    Hello EminiTrader, thanks for writing in.

    The best way to do this would be to use SharpDX in the OnRender method. On each OnRender pass you can loop through the visible bars on the chart using the FromIndex and ToIndex and render images on a per-bar basis. See the guide we have here on using OnRender:

    https://ninjatrader.com/support/help..._rendering.htm

    Best regards,
    -ChrisL


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    577 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    553 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X