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?
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!
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
NinjaTrader
Assigning Hotkeys inside of strategy
Collapse
X
-
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?Tags: None
- Likes 1
-
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 FilesJimNinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Wessel, 03-23-2024, 02:37 PM
|
3 responses
21 views
0 likes
|
Last Post Today, 04:58 PM | ||
Started by martini, Yesterday, 04:45 PM
|
4 responses
30 views
0 likes
|
Last Post
by martini
Today, 04:48 PM
|
||
Started by catinabag, 04-13-2023, 05:46 AM
|
34 responses
1,460 views
0 likes
|
Last Post
by mcosta72
Today, 04:44 PM
|
||
Started by adeelshahzad, Today, 11:49 AM
|
6 responses
23 views
0 likes
|
Last Post
by mcosta72
Today, 04:35 PM
|
||
Started by sidlercom80, 05-05-2020, 07:20 AM
|
4 responses
304 views
0 likes
|
Last Post
by Bidder
Today, 04:35 PM
|
Comment