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.

    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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by yertle, Yesterday, 08:38 AM
        7 responses
        28 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by bmartz, 03-12-2024, 06:12 AM
        2 responses
        20 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by funk10101, Today, 12:02 AM
        0 responses
        4 views
        0 likes
        Last Post funk10101  
        Started by gravdigaz6, Yesterday, 11:40 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by MarianApalaghiei, Yesterday, 10:49 PM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X