NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 03-29-2010, 07:05 PM   #1
LotsaOptions
Junior Member
 
Join Date: Sep 2007
Posts: 4
Thanks: 0
Thanked 1 time in 1 post
Default Internal Order Handling Open/Close Gap error?

So here's an error I'm getting with historical data. I'm not sure which, if any, IOH rules are being broken. Here's what I'm getting.

Code:
 
-----bar:2356   1/7/2009 9:10:00 AM ----- O:1.3673 H:1.3674 L:1.3668 C:1.3673
1/7/2009 9:10:00 AM Entered internal PlaceOrder() method at 1/7/2009 9:10:00 AM: Action=SellShort OrderType=Limit Quantity=0.1M LimitPrice=1.3674 StopPrice=0 SignalName='HTL_Exits:S:240' FromEntrySignal=''
1/7/2009 9:10:00 AM Ignored PlaceOrder() method at 1/7/2009 9:10:00 AM: Action=SellShort OrderType=Limit Quantity=0.1M LimitPrice=1.3674 StopPrice=0 SignalName=HTL_Exits:S:240' FromEntrySignal='' Reason='An Enter() method to submit an entry order has been ignore. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation.'
**NT** An Enter() method to submit an entry order at '1/7/2009 9:10:00 AM' has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation.
1/7/2009 9:10:00 AM Cancelled expired order: BarsInProgress=0: Order='NT-00411/Sim101' Name='HTL_Exits:L:239' State=Working Instrument='$EURUSD' Action=Buy Limit price=1.3625 Stop price=0 Quantity=0.1M Strategy='HTL_Exits' Type=Limit Tif=Day Oco='' Filled=0 Fill price=0 Token='1aae7052410941ff90aa41bd93a17f40' Gtd='12/1/2099 12:00:00 AM'
-----bar:240   1/7/2009 9:10:00 AM ----- O:1.372 H:1.372 L:1.3666 C:1.3673
-----bar:2357   1/7/2009 9:11:00 AM ----- O:1.3675 H:1.3685 L:1.3674 C:1.3684
Long story short: Close of the previous 1 and 10 minute bar is 1.3673, my Short Limit Order at 1.3674 gets ignored, Open of next 1m and 10m bar is 1.3675.

I believe this is a valid order, since the short limit greater than the close of the last bar (I have logic in my code to test for this and handle with market orders), and I expect it would be fairly rare to place an order between the open/close of different bars. How would this best be handled? I can manage orders myself if need be, but is it the simplest way?

Also, would this happen with live data or only during historical testing?
LotsaOptions is offline  
Reply With Quote
Old 03-30-2010, 05:09 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,420
Thanks: 252
Thanked 981 times in 963 posts
Default

LotsaOptions, unfortunately hard to say without knowing which order types (working included) are all involved - generally you want to review the bottom portion of this link here - http://www.ninjatrader-support.com/H...verview36.html

If you for example cancel the working LimitOrder to reverse, are you waiting to get a confirmed orderstate change to cancel?
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NT's Internal Order Handling Issue? crmcwi Strategy Development 8 09-25-2009 12:50 PM
Quick Question on Internal Order Handling Rules trader_rick Automated Trading 1 03-19-2009 07:30 AM
Trouble understanding the Internal (interal?) Order Handling Brian1 Strategy Development 9 02-13-2009 09:13 AM
Exit on Close with Advanced Order Handling dbw451 Strategy Analyzer 3 01-27-2009 09:43 AM
Internal Order Handling Rules for Stop Limits wayneFH Strategy Development 7 06-14-2008 06:39 PM


All times are GMT -6. The time now is 10:18 AM.