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
Adopt a manually entered Position in a strategy
Collapse
X
-
Adopt a manually entered Position in a strategy
Is there a way to adopt a manually entered position in a strategy? So that I can programmatically close it? If so is there an example anywhere?Tags: None
-
Hello dmisselhorn,
Thank you for your post.
The order methods used in strategies only manage the strategy position. With that said, you could use the AddOn-style approach, even within a strategy or indicator script, and utilize the Account class to detect and manage manual orders and positions:
You can subscribe to Order, Execution, and Position updates for the desired account and then use methods such as CreateOrder(), Submit(), Change(), and Cancel() to manage even a manually entered position from within a strategy script without interfering with the Strategy position and how it is calculated. Here are the links to the event methods, and the order management methods available to the Account class are also listed in the methods and properties at the link above:- https://ninjatrader.com/support/help...rderupdate.htm
- https://ninjatrader.com/support/help...tionupdate.htm
- https://ninjatrader.com/support/help...tionupdate.htm
Please let us know if we may be of further assistance.Emily C.NinjaTrader Customer Service
-
-
Originally posted by dmisselhorn View PostI guessing I could do something similar in a strategy as well. Correct?
Please feel free to reach out with any additional questions or concerns.Emily C.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rhyminkevin, Today, 04:58 PM
|
3 responses
47 views
0 likes
|
Last Post
by Anfedport
Today, 05:24 PM
|
||
Started by iceman2018, Today, 05:07 PM
|
0 responses
5 views
0 likes
|
Last Post
by iceman2018
Today, 05:07 PM
|
||
Started by lightsun47, Today, 03:51 PM
|
0 responses
7 views
0 likes
|
Last Post
by lightsun47
Today, 03:51 PM
|
||
Started by 00nevest, Today, 02:27 PM
|
1 response
14 views
0 likes
|
Last Post
by 00nevest
Today, 03:48 PM
|
||
Started by futtrader, 04-21-2024, 01:50 AM
|
4 responses
50 views
0 likes
|
Last Post
by futtrader
Today, 03:01 PM
|
Comment