Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change the account in real time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Change the account in real time


    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?

    #2
    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>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    51 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X