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

Run hotkey on an indicator

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

    Run hotkey on an indicator

    HelloI want to introduce a HotKey ex: "Ctrl+w" execution every so often on a line of an indicator.
    I can't find any instructions.
    Can you help me?​

    #2
    Hello anmir55,

    Thanks for your post.

    Programming a NinjaScript to detect key presses would go outside of the scope of support we would be able to provide you with in the Support Department at NinjaTrader.

    That said, it would be possible to code an indicator using C# PreviewKeyUp and PreviewKeyDown for detecting key presses to perform your own actions.

    Please see this forum thread for more information on this topic and sample code: https://forum.ninjatrader.com/forum/...78#post1137778

    Note that the example script in the forum thread linked above is not supported NinjaScript code.​

    This forum thread will also be open for other community members to share their insights on unsupported code to accomplish this.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      I didn't explain it well, I don't want to detect any hot key input from the keyboard.
      Is there an instruction that executes a hotkey within ninjascript.
      For example:
      run (Ctrl + w) and launch that command​

      Comment


        #4
        Hello anmir55,

        Thanks for your notes.

        No, there are no supported NinjaScript methods or properties to execute a hotkey.

        You would have to program your script to detect key presses and perform actions based on the keys pressed as noted in post # 2.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Tin34, Today, 03:30 AM
        2 responses
        15 views
        0 likes
        Last Post Tin34
        by Tin34
         
        Started by sastrades, Yesterday, 09:59 AM
        2 responses
        29 views
        0 likes
        Last Post brucerobinson  
        Started by ETFVoyageur, Today, 12:52 AM
        1 response
        15 views
        0 likes
        Last Post Leeroy_Jenkins  
        Started by lollers, Today, 03:26 AM
        0 responses
        10 views
        0 likes
        Last Post lollers
        by lollers
         
        Started by aliyahany, Today, 03:16 AM
        0 responses
        2 views
        0 likes
        Last Post aliyahany  
        Working...
        X