Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IgnoresUserInput error

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

    IgnoresUserInput error

    Hello.

    I try to use this function: IgnoresUserInput in State.SetDefaults, but I do not recognize it ...
    I ploting multiple plot and text and it's annoying to select some...


    #2
    Hello Eloi_,

    Welcome to the forums!

    IgnoresUserInput is available for drawing tools and would not be used for an indicator. You could set a drawing object's IgnoresUserInput property to make the drawn object un-selectable.

    Code:
    Dot myDot = Draw.Dot(this, "dot"+CurrentBar, true, 0, High[0]+ 5 * TickSize, Brushes.White);
    myDot.IgnoresUserInput = true;
    If you would like to prevent plots from being selectable, you could force the indicator rendering to only happen without hit testing passes.

    Code:
    protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
    {
        if(!IsInHitTest)                                                    // Use IsInHitTest to avoid rendering for hit test passes
            base.OnRender(chartControl, chartScale);                        // Call base OnRender() method to paint defined Plots.
    }
    Publicly available documentation on these items can be found below.

    DrawingTool objects - https://ninjatrader.com/support/help...rawingtool.htm

    OnRender() - https://ninjatrader.com/support/help...s/onrender.htm

    IsInHitTest - https://ninjatrader.com/support/help...sinhittest.htm

    Please let me know if I can be of further assistance.

    Comment


      #3
      Perfect =)

      Thank you Jim!!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      44 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      58 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      35 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      95 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      59 views
      0 likes
      Last Post PaulMohn  
      Working...
      X