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 CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
43 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
202 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
366 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
285 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment