Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Change account number programatically

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

    Change account number programatically

    Hello,

    Is it possible within the strategy to flip between sim and real accounts via programming.

    Regards,
    Alex

    #2
    Hello Alex,

    Thanks for your post.

    Strategies will only be allowed to submit orders to the account they are enabled on. It would not be possible to have a strategy flip between sim and real accounts programmatically. For NinjaTrader 7, you could enable the 2 instances of the strategy on both a real and simulation account, and then you could use the same logic to control when sim trading would be active and when live trading would be active.

    In NinjaTrader 8, you could create your own order submission logic using the AddOn framework to have the strategy submit orders to multiple accounts.

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      Thanks a lot for explaining it.

      Regards,
      redduke

      Comment


        #4
        Hi Jim,

        I am trying to find way to build something like this - For NinjaTrader 7, you could enable the 2 instances of the strategy on both a real and simulation account, and then you could use the same logic to control when sim trading would be active and when live trading would be active.
        Would you mind to refer any link or website with more information or guidelines?

        Thank you very much

        mcosta72
        NinjaTrader Ecosystem Vendor - Quant-Wise

        Comment


          #5
          Hello mcosta72,

          Thanks for your question.

          There would not be much more said for guidelines. Two strategies could be made where one would be applied to the Sim101 account and another could be assigned to the live account. Those strategies would have logic to take different actions and would then be applied to separate accounts.

          The logic within each strategy determines when that strategy should take actions and when it shouldn't take actions.

          Let me know if you have any additional questions.
          JimNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Haiasi, Today, 06:53 PM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by ScottWalsh, Today, 06:52 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by ScottW, Today, 06:09 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by ftsc2022, 10-25-2022, 12:03 PM
          5 responses
          256 views
          0 likes
          Last Post KeyonMatthews  
          Started by Board game geek, 10-29-2023, 12:00 PM
          14 responses
          244 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Working...
          X