I am creating a strategy and I need it to be able to choose the account it trades on. Can I change the account in real time, within the code of a strategy?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Change the account in real time
Collapse
X
-
Hello soyjesus,
Thanks for your post.
You could subscribe to the Account class to add an account to your script. Then, you could use the <Account>.CreateOrder() to create the order you want to place on the account and <Account>.Submit() to submit that order to the account.
You could subscribe to multiple accounts in the script and specify which account you want to create orders for and submit orders to when calling the methods mentioned above.
See the help guide documentation below for more information and sample code.
Account class: https://ninjatrader.com/support/help...ount_class.htm
<Account>.CreateOrder(): https://ninjatrader.com/support/help...reateorder.htm
<Account>.Submit(): https://ninjatrader.com/support/help...nt8/submit.htm
Let us know if we may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment