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
Virtual Strategy
Collapse
X
-
Hi Jesse,
I figured it was not possible but just wanted to check. The idea was to submit strategy virtually once trade closes kill it from memory.
Thank you
-
Hello RedDuke,
Thanks for the post.
With the "Strategy" type there is not a way to do that, strategies are specifically intended for the user to apply them. That is to avoid any type of error situation which can place live trades.
The best alternative to continue using a strategy and be able to enable/disable it like that would be to implement buttons within the strategy so you can turn on or off parts of the logic. https://ninjatrader.com/support/help...ightsub=userco ntrol
An example would be having conditions in the strategies OnBarUpdate and the having the buttons toggle bool variables to turn on those conditions when needed.
Another alternative would be the addon framework. That could accomplish what you are asking. The best candidate to replace a strategy would be an indicator. That works similar and from the chart visually and with the dataseries from the chart. You would only have to apply the indicator once and save it in the workspace, then any time the chart is open it could continue working.
After finding an account you could submit orders to it and manage orders much like a strategy. The main difference is that you won't have specific strategy features like the managed approach or strategy performance.
I look forward to being of further assistance.
Leave a comment:
-
Virtual Strategy
Hello,
The way to typically enable a strategy is to add it to chart and then check Enable checkbox. Is there a way to submit a virtual strategy, essentially launch and enable strategy via code and not manually adding it to the chart?
ThanksTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by judysamnt7, 03-13-2023, 09:11 AM
|
4 responses
57 views
0 likes
|
Last Post
by DynamicTest
Today, 08:25 PM
|
||
Started by ScottWalsh, Today, 06:52 PM
|
4 responses
36 views
0 likes
|
Last Post
by ScottWalsh
Today, 07:40 PM
|
||
Started by olisav57, Today, 07:39 PM
|
0 responses
7 views
0 likes
|
Last Post
by olisav57
Today, 07:39 PM
|
||
Started by trilliantrader, Today, 03:01 PM
|
2 responses
20 views
0 likes
|
Last Post
by helpwanted
Today, 07:25 PM
|
||
Started by cre8able, Today, 07:24 PM
|
0 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 07:24 PM
|
Leave a comment: