Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple accounts Unmanaged Order Backtesting

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

    Multiple accounts Unmanaged Order Backtesting

    Hi,

    I am trying to achieve the following:
    I have two Sim accounts which I am trying to back test before going live.
    I will use one account to run my strategy and create orders which would include entry, exit, target, stop loss orders. And only entry and exit order will be sent to other account.

    I am able to connect to different account using the following script

    account1 = Account.All.FirstOrDefault(a => a.Name == AccountName);
    account2 = Account.All.FirstOrDefault(a => a.Name == AccountName2);
    ....

    My problems are few

    1. When I back test via strategy analyzer I see the order goes to real-time data
    2. I am using createOrder Method as I dont see how can I attach UnmanagedOrder to different account (an example would be appreciated if possible). But it seems CreateOrder is deprecated. I am creating OCO orders for my stop loss and profit target.
    3. is it possible to backtest multiple accounts

    Please let me know if you have any solution, I am asking the question after going through help manual and forum posts, but can't seems to find the answer I am looking for.

    regards,
    Avi007



    #2
    Hello Avi007,

    Thank you for your post.

    Backtesting multiple accounts is not possible, although we do have an existing feature request to add this feature. I have added your vote to SFT-137. Please reference this internal tracking number when contacting Platform Support if you ever have questions regarding this feature request.

    When a feature request is implemented, you'll find a description of the new feature in the release notes:Does this also address your first question about the strategy analyzer going to real-time data? If not, please clarify so I may better assist you, such as the time range you are using to backtest and what you mean by "going to real-time data."

    Regarding the CreateOrder() method, this is not deprecated. This is just the method to submit orders via the Account() class that can be accessed via NinjaScripts other than just strategies (account-specific scripts and methods), such as Add Ons, Indicators, etc (account-neutral scripts and methods). For more information about the Account() class and CreateOrder() method, please see the following links:




    Please let me know if I may be of further assistance.

    Comment


      #3
      Thank you for your response.
      That's exactly what I was looking for ... I was not sure whether backtesting on multiple account is possible.
      CreateOrder() method shows as deprecated in VS2022, that's why I was wondering about it.

      I was scripting the strategy with multiple ("sim accounts") using createOrder and was trying to use startegy analyzer to backtest, this resulted into my sim account directly getting effected. But now I know why .. this is currently not possible -- that's what I meant by going to "real-time " .. sorry if I confused with my statement.

      regards,
      Avi007

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      52 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      48 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X