Announcement

Collapse
No announcement yet.

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.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    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.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        597 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
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X