Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Replay problem

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

    Replay problem

    Hello,

    I am testing a strategy, and am noticing a couple of odd behaviors only during market replay. During live market conditions it runs fine.

    1) During replay, at some point it inevitably creates a naked position that just floats out there, even though the atm strategy is reporting a flat position, and new positions are taken as my checks for open positions return a null value:

    if (orderId.Length == 0 && atmStrategyId.Length == 0)

    This only happens during replay, and I am only running replay at 1x speed.

    2) The other problem is that every so often during a market replay the strategy will close itself out. The only thing in the log related to it is this entry:

    10/1/2007 23:58 Strategy "Exit on close handling for strategy 'ZeroLXVer3_0lx5' started."

    Any ideas? The log isn't really helping out on this one.

    Thanks.

    #2
    Hi pdawg,

    Is #1 reproducible? Could you provide me the strategy, replay file, and time of interest so I can try and see whats going on?

    For #2, it seems like it is happening because of a setting you have set when you loaded your strategy. When you start a strategy there is the option "Exit on close". Basically what it does is it will close out your positions when there is only x amount of time left in the session.

    Please check out these links for further information:
    ExitOnClose
    ExitOnCloseSeconds
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,

      I'm not sure when exactly the position gets orphaned, I do know that it happened before 11:00am on todays data, and that happened again after I restarted it as well. Strategy doesn't start till 9:30 am. I can send you my replay data, but the size of the file exceeds the forum limits.

      Philip

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mizzouman1, Today, 07:35 AM
      4 responses
      18 views
      0 likes
      Last Post Mizzouman1  
      Started by philmg, Today, 01:17 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by cre8able, Today, 01:01 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by manitshah915, Today, 12:59 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by ursavent, Today, 12:54 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X