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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    63 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    92 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    48 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    106 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    63 views
    0 likes
    Last Post PaulMohn  
    Working...
    X