Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Working with px - ConvertToVerticalPixels()

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

    Working with px - ConvertToVerticalPixels()

    Hi,

    I've read https://ninjatrader.com/support/help...oordinates.htm and wondering if there is a 'faster' way then calling ConvertToVerticalPixels() umpteen times in OnRender() process.

    Now everything gets converted again and again in OnRender() (~4 times per sec) - this is certainly eating performance, isn't it?
    Attached Files

    #2
    Hello Heart,

    Thank you for your post.

    From what I can see here, you don't really need to be using GetYByValueWPF - that's going to return WPF coordinates that then have to be converted to pixels. That's something we'd use to find pixels from, say a mouse click on the chart - then we'd need to convert to pixels so things get rendered in the right place.

    You can just use GetYByValue and skip the conversion step there entirely:



    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    646 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    367 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X