PDA

View Full Version : Replay problem


pdawg
10-01-2007, 11:09 PM
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.

NinjaTrader_Josh
10-01-2007, 11:39 PM
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 (http://www.ninjatrader-support.com/HelpGuideV6/ExitOnClose.html)
ExitOnCloseSeconds (http://www.ninjatrader-support.com/HelpGuideV6/ExitOnCloseSeconds.html)

pdawg
10-02-2007, 12:53 AM
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