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

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
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mjairg, 07-20-2023, 11:57 PM
    3 responses
    213 views
    1 like
    Last Post PaulMohn  
    Started by TheWhiteDragon, 01-21-2019, 12:44 PM
    4 responses
    544 views
    0 likes
    Last Post PaulMohn  
    Started by GLFX005, Today, 03:23 AM
    0 responses
    3 views
    0 likes
    Last Post GLFX005
    by GLFX005
     
    Started by XXtrader, Yesterday, 11:30 PM
    2 responses
    12 views
    0 likes
    Last Post XXtrader  
    Started by Waxavi, Today, 02:10 AM
    0 responses
    7 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Working...
    X