Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Prevent indicator being selected with click

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

    Prevent indicator being selected with click

    Hi,
    I've written a custom crosshair, implemented as an indicator, which uses OnRender to draw. It works fine, but unfortunately Ninja always thinks that any click on the chart is a click on the indicator. The result is that a right-click won't produce the standard contextual menu which includes order placement items. Instead there is the much smaller indicator-specific contextual menu containing "Copy, Remove, Alert, Properties".
    Is there a way via code that can prevent an indicator from being regarded as selected?

    Thanks,
    saltminer

    #2
    Hello saltminer,

    Yes, the IsInHitTest would prevent the indicator from being clicked on.


    The DValueArea indicator uses this to prevent renderings from being selected.


    I'm excited to hear you are making custom crosshairs with sharpdx.
    There are a few NinjaTrader 8 users that have inquired about this and this was in my list of indicators to someday port.


    Would you be willing to share your work when you have completed the script?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,
      thanks, DValueArea's use of IsInHitTest was the solution I needed.

      Unfortunately the custom crosshair tool was a paid project for a client, so I am unable to share the work.

      Cheers,
      saltminer

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X