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 Stanfillirenfro, Today, 07:23 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by cmtjoancolmenero, Yesterday, 03:58 PM
    2 responses
    20 views
    0 likes
    Last Post cmtjoancolmenero  
    Started by olisav57, Yesterday, 07:39 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by cocoescala, 10-12-2018, 11:02 PM
    7 responses
    944 views
    0 likes
    Last Post Jquiroz1975  
    Started by oviejo, Today, 12:28 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X