Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

OnRender sharpDX drawing

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

    OnRender sharpDX drawing

    Hello, i wanted to check if there is a way with drawing in OnRender with sharpDX eg a rectangle area - if i can track when the mouse is over the object area and display some data/text information that i have stored?

    Like some context information depending on the object - is this possible with drawobjects generated in Onrender. Or are they different to drawing objects which can be listed in the Drawing Tools -> draw objects. I realise there is a distinction but wanted to check and if there is another way i need to approach this

    thanks

    #2
    Hello soulfx,

    This should be possible.

    If you are referring to having some information come up when your mouse is within the range of coordinates of your rectangle, you should be able to accomplish this by getting the mouse coordinates and seeing if they are within the range of your rectangle.

    You could subscribe to the ChartPanel.MouseMove event to get the coordinates from the mouse as it moves, and you can check if these coordinates are "above" the region you have drawn or described in OnRender().

    We don't have any documentation on ChartPanel.MouseMove and creating your own Mouse based events starts to fall into the General C# category rather than a NinjaScript item, so the amount of support we can provide you will be limited. IntelliPrompt will be your friend when using unsupported items that are not documented in our help guide.

    Some indicators on our forums implement similar interactions with a mouse to get coordinate data. These could be used as reference as long as the change to subscribing to ChartPanel.MouseMove is minded.

    Advanced Risk Reward (Uses ChartPanel.MouseUp and ChartPanel.MouseDown, see "Mouse" code region) - https://ninjatrader.com/support/foru...atid=7&lpage=1

    Please let me know if there is anything else I can do to assist.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Aviram Y, Today, 05:29 AM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by algospoke, 04-17-2024, 06:40 PM
    3 responses
    26 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by bmartz, 03-12-2024, 06:12 AM
    3 responses
    30 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by gentlebenthebear, Today, 01:30 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by cls71, Today, 04:45 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X