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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    307 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    199 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    186 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    275 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    229 views
    0 likes
    Last Post CarlTrading  
    Working...
    X