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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    221 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    136 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    150 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    236 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    193 views
    0 likes
    Last Post CarlTrading  
    Working...
    X