Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Assigning Hotkeys inside of strategy

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

    Assigning Hotkeys inside of strategy

    I have buttons in my strategy. I am using System.Windows.Controls.Button to create the buttons. I have a stream deck. I wanted to tie these buttons to my stream deck somehow.

    If there is no direct way to do that, then I could assign a hotkey to each button in my strategy, for example Ctrl + Shift + 1. Is it possible?

    #2
    Hello fawzanalim,

    Thanks for your post.

    I am not familiar with using a stream deck, but I can give some insight for baking hot key functionality into your strategy.

    You could consider using ChartControl.PreviewKeyDown to detect key presses, and this could be a way to incorporate hot key functionality into a strategy. I have attached an indicator that can demonstrate here.

    Keep in mind, this would require having the window in focus. If you want to incorporate some key detection functionality that does not require the window be in focus, you can try something like what is done in the ChartNotes indicator. (If you are using a strategy it is also best to start timers in State.DataLoaded since this state would come after we Enable the strategy, when State.Configure does not require the strategy be enabled.)

    This is a conversion of the a1ChartNotes indicator by monpere. Chart Notes v3 Add notes to your chart. For example, identify a chart template, or put specific notes on how to trade a particular chart, or instrument, etc. – Added selectable fonts and text color – Control Shift toggles compact/expanded visibility (number of lines shown) […]


    The link above is publicly available.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.


    We look forward to assisting.

    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    577 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    553 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X