Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting on multiple instruments with common account

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

    Backtesting on multiple instruments with common account

    Hello,

    I have a question about backtesting my strategy on multiple instruments.

    I would like to know the performance of the strategy with a given account size. Let's say i have 1.000.000 USD in my account and the strategy opens long-positions of 100.000. I want the strategy to enter a position only if there is enough money in the account, so if it already is long in 10 positions it can't open another one.

    Currently the Backtesting goes long for each signal with 100.000 and i dont really get meaningful results because i don't know how many concurrent positions there are.

    I guess this would mean, that the backtests cant be run sequentially on each instrument, it would have to be in one run.

    Is there a solution for my problem?

    Regards,
    Ruediger

    #2
    Hello Ruediger,

    Thank you for your post.

    You can use the AccountSize property to assgn a value for order sizing: http://www.ninjatrader.com/support/h...ccountsize.htm

    For the multiple instruments, you are correct. You would need to add each instrument into the could. You can find information on multiple instruments in your code at the following link: http://www.ninjatrader.com/support/h...nstruments.htm

    For information on the Positions you can use the Position object: http://www.ninjatrader.com/support/h...7/position.htm

    And for performance you can use the Performance object: http://www.ninjatrader.com/support/h...erformance.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    144 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X