Thank you for your feedback!
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
Hotkey to enable and disable a strategy
Collapse
X
-
Hotkey to enable and disable a strategy
I want to be able to enable or disable a specified strategy with a hotkey e.g. 'ctrl + F1'. Is this possible? If so, would this need to be a custom script or can it be done through NT8's built-in features?
Thank you for your feedback! -
Hello TraderJosh,
Thank you for your post.
There is current not a built-in way to enable/disable a strategy with a hot key. However, I can submit this as a feature request on your behalf if you would like.
You can detect key presses through your code and use CloseStrategy() to close that specific strategy.
Please see this forum post which includes a sample script demonstrating detecting key presses in your code:
Hi guys, Are there available order entry hot key that is based on the previous bar? Would like to implementorders by hot keys which could be quick & less noticeable. Cheers, Leo
CloseStrategy - https://ninjatrader.com/support/help...sestrategy.htm
Please let me know if you have any further questions.Gaby V.NinjaTrader Customer Service
-
This is interesting... TraderJosh I bet you could do it by having a key press set a global variable to 0 or 1 (on or off) that enables or disables your strategy. This is also a great idea and something I will most likely incorporate.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by samish18, Today, 11:26 AM
|
0 responses
1 view
0 likes
|
Last Post
by samish18
Today, 11:26 AM
|
||
Started by Trader146, 03-29-2024, 01:22 PM
|
2 responses
14 views
0 likes
|
Last Post
by Trader146
Today, 11:24 AM
|
||
Started by tsantospinto, 04-12-2024, 07:04 PM
|
7 responses
127 views
0 likes
|
Last Post
by aligator
Today, 11:08 AM
|
||
Started by futtrader, 04-21-2024, 01:50 AM
|
5 responses
56 views
0 likes
|
Last Post Today, 10:57 AM | ||
Started by PeakTry, Today, 10:49 AM
|
0 responses
2 views
0 likes
|
Last Post
by PeakTry
Today, 10:49 AM
|
Comment