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 CortexZenUSA, Today, 12:53 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by CortexZenUSA, Today, 12:46 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by usazencortex, Today, 12:43 AM
      0 responses
      5 views
      0 likes
      Last Post usazencortex  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      168 responses
      2,265 views
      0 likes
      Last Post sidlercom80  
      Started by Barry Milan, Yesterday, 10:35 PM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X