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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
91 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
137 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
121 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
72 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment