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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      599 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      344 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      558 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      557 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X