PDA

View Full Version : Problem in Exiting Position


vivienne
04-29-2007, 07:27 PM
The above problem happens in real time only.

My rules for exiting the position is not trigger before a new entry position, it will exit where a specific condition is meet. My strategy can only work in the backtest situtation, when in real time, the position will still be closed when the condition is met, but Ninja Trader will also close the position once again right before a new entry signal, (the signal name is "close position") ie. the position has exited TWICE.

NinjaTrader_Dierk
04-29-2007, 07:50 PM
Not sure I follow. NT should not exit the same position twice, since this will bring you to the other side of the market.

Please attach a simple as possible strategy in order to reproduce the issue.

vivienne
04-29-2007, 08:09 PM
SO.. that's the problem~



I have send you the snapshot of my screen for your kind attention.



Thanks

NinjaTrader_Dierk
04-29-2007, 08:12 PM
Great. Please see below, I would need simple as possible startegy in order to reproduce.

NinjaTrader_Dierk
04-29-2007, 08:12 PM
Please make sure you either post screenshot and strategy here or send it to "dierk AT ninjatrader DOT com".

vivienne
04-29-2007, 08:14 PM
The signals buy to cover is correct, while the 2 close positions are not ... they juz happened before the new entry~



thanks

NinjaTrader_Dierk
04-29-2007, 08:16 PM
To clarify (you posted this under ATM strategy section): Is this a discretionary strategy which you trade on the DOM or a self coded NinjaScript strategy?

vivienne
04-29-2007, 08:42 PM
Mine is C# self coded NinjaScript strategy.

NinjaTrader_Dierk
04-29-2007, 08:45 PM
Ok, so here is what you should try as well: Set TraceOrders=true in your Initialize method of your simplified strategy to trace your signals (please consult the docs for details).

vivienne
04-29-2007, 09:25 PM
what is the purpose of that? How to solve the problem~??



THanks

NinjaTrader_Dierk
04-29-2007, 09:27 PM
TraceOrders=true allows you trace which signals your strategy generated. This could give you an idea if there is an coding issue with your strategy.

vivienne
04-29-2007, 09:52 PM
if the signal name of entry (buy) and the name of the exitlong are the same .. shouldn't the exitlong just exit the buy trade.. but there is still another signal of close position afterwards

NinjaTrader_Dierk
04-29-2007, 10:01 PM
Again, I would want to suggest that you attach a simple as possible version of your strategy to your post.

Also:
- in your problem reproducible?
- which instrument is this?
- which feed/broker are you connected to?
- which time series (1 minute? else?) are you running your strategy on?
- please post a screenshot of your strategy settings

vivienne
04-29-2007, 11:17 PM
Actually the problem do occur in every market I tested.

NinjaTrader_Dierk
04-29-2007, 11:32 PM
Please provide the info as requested or I can not follow up. Thanks