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 lightsun47, Today, 03:51 PM
        0 responses
        5 views
        0 likes
        Last Post lightsun47  
        Started by 00nevest, Today, 02:27 PM
        1 response
        10 views
        0 likes
        Last Post 00nevest  
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        46 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        10 views
        0 likes
        Last Post port119
        by port119
         
        Working...
        X