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 love2code2trade, Yesterday, 01:45 PM
    4 responses
    28 views
    0 likes
    Last Post love2code2trade  
    Started by funk10101, Today, 09:43 PM
    0 responses
    7 views
    0 likes
    Last Post funk10101  
    Started by pkefal, 04-11-2024, 07:39 AM
    11 responses
    37 views
    0 likes
    Last Post jeronymite  
    Started by bill2023, Yesterday, 08:51 AM
    8 responses
    44 views
    0 likes
    Last Post bill2023  
    Started by yertle, Today, 08:38 AM
    6 responses
    26 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Working...
    X