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 > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 07-18-2010, 10:05 AM   #1
drkempus
Junior Member
 
Join Date: Jul 2010
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
Default Unexpected Order Submission

I'm testing the SampleMACrossOver strategy in NT 7. The strange problem I'm having is that on market replay, as soon as the strategy is enabled, a series of erroneous trades are submitted and filled which do not conform to the strategy at all. Specifically, I'm testing the ES 5 minute data from 6/14/2010 12:00:00AM to 6/18/2010 12:00:00AM. When the strategy is enabled, in one second from 12:00:00AM to 12:00:01AM, over fifty trades are submitted and filled in the following order: Buy at Market, Sell Short at Market, Buy to Cover at Market, Buy at Market, Sell at Market, and so on. The strategy is set to the Default 24/7 template, and account sync is true. Neither immediately submitting live working historical orders nor waiting until flat before executing live fixes the problem. The following is an excerpt of what appeared in the output window using TraceOrders:

6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Ignored PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Sell short' FromEntrySignal='' Reason='Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties'
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
6/14/2010 12:00:00 AM Entered internal PlaceOrder() method at 6/14/2010 12:00:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''

NOTE: Aside from adding TraceOrders = true, the strategy was not altered in any way from the default code.

Any ideas as to what may be causing this? Thank you.
drkempus is offline  
Reply With Quote
Old 07-18-2010, 10:15 AM   #2
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

drkempus, it looks like the strategy is continuously jumping into and out of a position. The price data doesn't actually jump around this much does it? Have you tried with Sync Acct set to false? What is your calculate on bar close setting?
NinjaTrader_Austin is offline  
Reply With Quote
Old 07-18-2010, 10:29 AM   #3
drkempus
Junior Member
 
Join Date: Jul 2010
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi, Austin. The price data definitely does not bounce around that much (at any rate, what would cause all of these orders to be submitted within one second on a five-minute chart?). Calculate on bar close value is set to true. Unfortunately, account sync being set to false does not solve the problem. Any suggestions? Thanks in advance.
drkempus is offline  
Reply With Quote
Old 07-18-2010, 11:44 AM   #4
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

drkempus, are you able to reproduce all these orders? If so, did you just download the replay data from the NinjaTrader site? If you can reproduce this, please let me know exactly how.
NinjaTrader_Austin 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
Automated Trading and Order Submission kassaindia Automated Trading 6 03-08-2010 04:22 AM
Unmanaged Order Submission NinjaTrader_Ray Version 7 Beta General Questions & Bug Reports 32 11-19-2009 03:08 PM
oco order submission thru oif Mindset ATM Strategies (Discretionary Trading) 13 09-29-2009 09:17 AM
NT7: New Unmanaged Order Submission BillCh Suggestions And Feedback 1 06-26-2009 08:30 AM
stop and target order submission mdm72 Strategy Development 3 02-26-2009 07:08 AM


All times are GMT -6. The time now is 12:53 PM.