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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      72 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X