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

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.
    JimNinjaTrader Customer Service

    Comment


      #3
      Perfect =)

      Thank you Jim!!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by bortz, 11-06-2023, 08:04 AM
      47 responses
      1,603 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Today, 05:56 PM
      0 responses
      8 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      18 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      4 views
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      12 views
      0 likes
      Last Post Javierw.ok  
      Working...
      X