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 kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
59 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
41 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
47 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
38 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|
||
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
157 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|

Comment