Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unexpected Order Submission

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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?
    AustinNinjaTrader Customer Service

    Comment


      #3
      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.

      Comment


        #4
        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.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by habeebft, Today, 07:27 AM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_ChristopherS  
        Started by AveryFlynn, Today, 04:57 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by Max238, Today, 01:28 AM
        4 responses
        37 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by r68cervera, Today, 05:29 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by geddyisodin, Today, 05:20 AM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X