• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Do not Exit on Close - Daily Data

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

    Do not Exit on Close - Daily Data

    Hello, I am a new user. I want to keep any positions open at the end of a backtest but no matter what settings I use (including Exit on Close = false), the backtest always exits out of all my positions. I am using Daily data so I don't know how this may affect it. There is no logic in my strategy do exit out (I am just testing with a simple strategy).

    #2
    Hello Buzzard72,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    The Strategy Analyzer will close the historic positions when the To Date is reached in the test. The positions taken in the backtests are not any real account, they are taken on a backtest account.

    You can however, go to Tools > Options > Strategies > NinjaScript > 'On starting real-time strategy' > enable 'Immediately submit live working historical orders' > OK. Then enable a strategy on your chart or the Strategies tab of the Control Center and make sure to set 'Sync account position' to True.
    This will set up your strategy to calculate on historical data as it normally would but will ensure the positions that are still open after the historical data are taken in real-time.

    For information on running NinjaScript Strategies please visit the following link: http://www.ninjatrader.com/support/h...strategies.htm

    Please let me know if I may be of further assistance.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      Hello Buzzard72,

      Thank you for your post and welcome to the NinjaTrader Support Forum!

      The Strategy Analyzer will close the historic positions when the To Date is reached in the test. The positions taken in the backtests are not any real account, they are taken on a backtest account.

      You can however, go to Tools > Options > Strategies > NinjaScript > 'On starting real-time strategy' > enable 'Immediately submit live working historical orders' > OK. Then enable a strategy on your chart or the Strategies tab of the Control Center and make sure to set 'Sync account position' to True.
      This will set up your strategy to calculate on historical data as it normally would but will ensure the positions that are still open after the historical data are taken in real-time.

      For information on running NinjaScript Strategies please visit the following link: http://www.ninjatrader.com/support/h...strategies.htm

      Please let me know if I may be of further assistance.
      Thanks for the info. I see now how I can keep the positions. However, doesn't the fact that the Strategy Analyzer closes the historic positions mess up the backtest results since you are forcing positions to close at prices that you don't necessarily want?

      Comment


        #4
        Hello Buzzard72,

        Thank you for your response.

        As the bactests are performed on a non-existent account, there is technically no position to keep open and the last open position is closed out.
        Patrick H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by thomaspartyof10, Today, 02:33 AM
        1 response
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by manueldecastro, Yesterday, 12:57 AM
        1 response
        16 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by ArmKnuckle, Today, 01:59 AM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by seppyr, Today, 01:53 AM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by matthewbartlett, Today, 01:22 AM
        1 response
        12 views
        0 likes
        Last Post Emma1
        by Emma1
         
        Working...
        X