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

Add alert through SuperDOM

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

    Add alert through SuperDOM

    I am trying to add an alert through a superDOM add-on by detecting mousevents at certain prices on the price ladder.
    1. How do I convert from the mouse Y position to price clicked?
    2. How do I get the instrument that the superDOM is currently on?

    Should I be doing this another way? I originally started w/ a superdom column but could not figure out how to get the mouseclicks / window that it was in.
    Attached Files

    #2
    Hello habibalex,

    Getting the instrument would require that you find the instrument selector control in the window and then get its selected instrument.

    From Y to Price I am not aware of a way to do that in the superdom. There is not a specific control to do conversions here like how the Chart has conversion methods from WPF Y to Price. The superdom is essentially a WPF control that has a grid with individual text boxes for each price, if you use Microsoft inspect you can take a look at the visual tree. Those texts get changed depending on the incoming market data and where the superdom is scrolled to. Its not as simple as the chart where Y = some price.

    I don't really have any suggestion on how to move forward with mouse events and prices on the superdom with an addon. You may be able to interact with the clicked text in some way to get its Text value however I don't know of any samples or suggestions on going that route.

    You may want to take a look at the Notes SuperDomColumn. That has some mouse handling and depending on what the overall goal is that may be a more manageable approach. That at least has access to the market data and also the grid row information for the note being edited. You may be able to use that as a starting point to getting the clicked area next to a price row.

    Please let me know if I may be of additional assistance.






    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by f.saeidi, Today, 08:01 PM
    0 responses
    1 view
    0 likes
    Last Post f.saeidi  
    Started by Rapine Heihei, Today, 07:51 PM
    0 responses
    3 views
    0 likes
    Last Post Rapine Heihei  
    Started by frslvr, 04-11-2024, 07:26 AM
    5 responses
    96 views
    1 like
    Last Post caryc123  
    Started by algospoke, 04-17-2024, 06:40 PM
    6 responses
    49 views
    0 likes
    Last Post algospoke  
    Started by arvidvanstaey, Today, 02:19 PM
    4 responses
    11 views
    0 likes
    Last Post arvidvanstaey  
    Working...
    X