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

Input numeric to strategy without chart taking the key input??

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

    Input numeric to strategy without chart taking the key input??

    I have a strategy in NT8 which includes a side panel where numbers can be input. On NinjaTrader 7 this worked fine but in NT8 every time I hit a numeric I get a popup which assumes I am trying to enter a new symbol with the title "Press Esc to cancel".

    Is there a way to prevent NT8 from 'seeing this key input or at least a way to allow the input to be directed to the input box on my strategy, which to be fair DOES have focus at the time.

    Thanks,

    #2
    Hello scalp,

    You can find a sample of handing key events in the following post. https://ninjatrader.com/support/foru...PreviewKeyDown

    In NT8 you would need to know what keys you need to handle to mark each keypress you want as handled to avoid the charts existing keyboard commands.

    You can also use items like focus in your logic to avoid blocking all chart keyboard commands when you are not intending to type into your entry box.

    I look forward to being of further assistance.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Many thanks Jesse, I will look into that thread.

      Comment


        #4
        Originally posted by NinjaTrader_Jesse View Post
        Hello scalp,

        You can find a sample of handing key events in the following post. https://ninjatrader.com/support/foru...PreviewKeyDown

        In NT8 you would need to know what keys you need to handle to mark each keypress you want as handled to avoid the charts existing keyboard commands.

        You can also use items like focus in your logic to avoid blocking all chart keyboard commands when you are not intending to type into your entry box.

        I look forward to being of further assistance.
        Jesse

        My developer has managed to successfully implement code to intercept keystrokes with the exception of the UP and DOWN keys (up/down arrows). Do you know whether this is possible? He has indicated he cannot find a way to intercept these specific keys.

        Many thanks,


        Comment


          #5
          If anyone else has input on intercepting the UP/DOWN keys I would appreciate it.

          Thanks,

          Comment


            #6
            Hello scalp,

            I reviewed this however I don't see a specific way to catch the arrow keys in the chart window. They are not passed in the preview key event or any of the other key events I had tried.

            I look forward to being of further assistance.


            JesseNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello scalp,

              I reviewed this however I don't see a specific way to catch the arrow keys in the chart window. They are not passed in the preview key event or any of the other key events I had tried.

              I look forward to being of further assistance.

              Jesse

              I appreciate your taking the time to check into it, many thanks.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Richozzy38, Today, 01:06 PM
              3 responses
              14 views
              0 likes
              Last Post Richozzy38  
              Started by ttrader23, Today, 09:04 AM
              2 responses
              10 views
              0 likes
              Last Post ttrader23  
              Started by geotrades1, Today, 07:54 AM
              10 responses
              26 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by ninza33, Yesterday, 12:31 PM
              3 responses
              16 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by patrickmlee007, Today, 09:33 AM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Working...
              X