Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TextBox in chart ToolBar is not typing

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

    TextBox in chart ToolBar is not typing

    Hello,

    In an indicator, I need to include a TextBox in the toolbar of the chart so that the user can write data that will later be collected by the indicator in real time.

    The first problem arose when pressing down a key, the 'Instrument Overlay Selector' was showed. But it was resolved with e.Handle = true in the KeyDown handler method. But in spite of everything, the TextBox still does not accept direct text input (although, it does accept text from clipboard with Ctrl+V).

    I think this has a solution because the 'InstrumentSelector' standard control in the toolbar does admit typing.

    I have already tried to invalidate the KeyDown and PreviewKeyDown handler methods of all the visual tree containers (PART_ToolBarPanel, PART_CustomFrame) with e.Handle=true, but I have not been able to solve it. Please, any help or hint will be much appreciated.

    Thanks in advance
    Attached Files

    #2
    Hello cls71,
    Thanks for your post.

    Could you just use regular inputs for the indicator? What kind of information is the user supplying?
    Last edited by NinjaTrader_JoshG; 05-17-2019, 02:43 PM.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Hello Josh,

      The indicator shows in the Output window a detailed log about the bar number entered in that TextBox. The information included in this log requires complex calculations that are not applied by default to all the bars, but to the one chosen by the user.

      The indicator is complex and heavy. The bar number can not be passed as a parameter because the indicator should be reloaded each time.

      Comment


        #4
        I encountered a similar problem when adding a NumericTextBox to the chart trader. It doesn't accept input. It's a NinjaTrader custom control but the response was basically that they had no clue or even will to fix it.

        If you just want numbers then try the QuantityUpDown control. That seems to actually work on charts.

        You can remove the little quantity button via: ((QtyUpDn.Content as Border).Child as Grid).Children.RemoveAt(3);

        Comment


          #5
          cls71,

          I dont see anything in our documentation on how to create a custom input on the chart toolbar. I would probably get the user to click the bar they would like to choose instead? I think it would be easier than making the user find the bar number they want and then be required to input that information.



          I am limited on what I can provide here, but as a hint this public MSDN link: https://docs.microsoft.com/en-us/dot...ramework-4.5.2

          Last edited by NinjaTrader_JoshG; 05-20-2019, 10:05 AM.
          Josh G.NinjaTrader Customer Service

          Comment


            #6
            Thanks anon84, JoshG,
            in the end I will program it from an Add-On that is included in the indicator.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            595 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 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
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            554 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X