PDA

View Full Version : Orders get canceled in the next bar after they were just placed.


Jenny
02-06-2008, 09:15 PM
I have one code, it do well in the back test. But when I run it life, orders get canceled in the next bar. That code line are:
EnterLongStop(High[1]+0.15));
EnterShortStop(Low[1]-0.15));
Would you please tell me what I did wrong here? I use "CalculateOnBarClose = false;"
Thanks

NinjaTrader_Josh
02-06-2008, 09:43 PM
Your orders need to be resubmitted at every bar in order to keep it alive. If your conditions do not stay true on the next bar you end up not resubmitting and then the order becomes cancelled. In NT6.5 there you can avoid this by setting a liveUntilCancelled bool to true.

The syntax for this override is:
EnterShortStop(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double stopPrice, string signalName)

Jenny
02-07-2008, 09:41 AM
Thanks, but when we will have 6.5?

NinjaTrader_Dierk
02-07-2008, 09:51 AM
It's available as beta yet: http://www.ninjatrader-support.com/vb/showthread.php?t=5227

Jenny
02-09-2008, 03:23 AM
Thanks a lot. I can't wait to try it. I will let you know if I see any issue.
Take care

Pete S
02-09-2008, 07:01 AM
Do you really mean High[1]+0.15, and not High[0]+0.15 ? The current price could be higher than High[1]+0.15, in which case NT would reject the stop order IIRC.

Jenny
02-18-2008, 05:30 AM
Pete, I had tried both, the result are the same. I had to resubmit every bar.
I would like to try the 6.5, but I couldn't install it, the error says, "file corrupt or internet error". I had tried a fews times.
Thanks

NinjaTrader_Jessica
02-18-2008, 07:18 AM
This is caused by the installer file being corrupted during download.

To resolve:
- Uninstall NT from Windows Control Center > Add/Remove Programs
- Open up Internet Explorer and click Tools-> Internet Options->Delete->Delete files
- now try the download again.

If this doesn't work for you, please try a different browser such as Mozilla Firefox to download NinjaTrader. Please report back to us if you are unable to get the software installed and up and running. Do this by sending a note to support AT ninjatrader DOT com.

Pete S
02-18-2008, 08:09 AM
My comment had nothing to do about the order submission, I was talking about the logic in your strategy.