Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Orders in Market Replay

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

    Unmanaged Orders in Market Replay

    Hi,

    I haven't had a chance to run this against a live market, but I have been running a strategy against the Market Replay and can't seem to figure out the results. It seems like the "OnOrderUpdate()" function fires 8+ times for each actual event. Is this normal and only a Market Replay issue?

    Here you can see the duplication (Same bar 1513 and time 10:10:00AM, keeps firing working, Others status include PendingCancel, Cancel, etc.
    Code:
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM UPDATE: Working: Order='eb7884dd5edf46c5a19a053b210d2e0b/Replay101' Name='ExitSL0' State=Working Instrument='6E 09-11' Action=BuyToCover Limit price=0 Stop price=1.4206 Quantity=1 Type=Stop Tif=Gtc OverFill=False Oco='EXITBRACKET0' Filled=0 Fill price=0 Token='eb7884dd5edf46c5a19a053b210d2e0b' Gtd='1/1/0001 12:00:00 AM'; ASK=1.4206; BID=1.4204; CLOSE=1.4192
    1513 INST(6E) 9/1/2011 12:00:00 AM Time: 6/27/2011 10:10:00 AM  OnOrderUpdate EXIT; ASK=1.4206; BID=1.4204; CLOSE=1.4192

    #2
    Hello,

    Thanks for the forum post.

    Can you please test this really quick with the SampleMACrossOver Strategy. Does it do the same on this strategy as well?

    Is this occuring in historical or on orders occuring in realtime? Or is it occuring in both?

    I look forward to assisting you further.

    Comment


      #3
      Hi Bret,

      I tried it with SampleMA and didn't see the issue, I converted it to an unmanaged solution like this and still not the same problem:

      Code:
              protected override void OnBarUpdate()
              {
                  if (CrossAbove(SMA(Fast), SMA(Slow), 1))
                  {
                      //EnterLong();
                      SubmitOrder(0,OrderAction.Buy,OrderType.Market,1,0,0,"NONE","EnterLong");
                  }
                  else if (CrossBelow(SMA(Fast), SMA(Slow), 1))
                  {
                      SubmitOrder(0,OrderAction.Sell,OrderType.Market,1,0,0,"NONE","ExitLong");
                      //EnterShort();
                  }
              }
      I can see in my script I am firing the Order only once, but still seem to get the "Echos" in the market replace connection. I will try later tonight when Live data becomes available. I don't see this on historical data.

      I do have multiple orders in action at any one time. Any clues would be good as this is a waste of system time processing an event that has already been cleared. You can see in my posting prior, the same ORDER ID is sent for each of the repeats...

      Here is a short clip of what the SampleMA produced:

      Code:
      OnOrderUpdate: Order='2f773ddd2b9b4debbce9353758468aa4/Replay101' Name='ExitLong' State=PendingSubmit Instrument='6E 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='2f773ddd2b9b4debbce9353758468aa4' Gtd='1/1/0001 12:00:00 AM'
      1362 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 6:01:00 PM MESSAGE: UPDATE: PendingSubmit: Order='2f773ddd2b9b4debbce9353758468aa4/Replay101' Name='ExitLong' State=PendingSubmit Instrument='6E 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='2f773ddd2b9b4debbce9353758468aa4' Gtd='1/1/0001 12:00:00 AM' [A=1.4463 B=1.4462 C=1.4462]
      1362 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 6:01:00 PM MESSAGE:  OnOrderUpdate EXIT [A=1.4463 B=1.4462 C=1.4462]
      OnOrderUpdate: Order='2f773ddd2b9b4debbce9353758468aa4/Replay101' Name='ExitLong' State=Accepted Instrument='6E 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='2f773ddd2b9b4debbce9353758468aa4' Gtd='1/1/0001 12:00:00 AM'
      1362 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 6:01:00 PM MESSAGE: UPDATE: Accepted [A=1.4463 B=1.4462 C=1.4462]
      1362 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 6:01:00 PM MESSAGE:  OnOrderUpdate EXIT [A=1.4463 B=1.4462 C=1.4462]
      OnOrderUpdate: Order='2f773ddd2b9b4debbce9353758468aa4/Replay101' Name='ExitLong' State=Working Instrument='6E 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='2f773ddd2b9b4debbce9353758468aa4' Gtd='1/1/0001 12:00:00 AM'
      1362 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 6:01:00 PM MESSAGE: UPDATE: Working: Order='2f773ddd2b9b4debbce9353758468aa4/Replay101' Name='ExitLong' State=Working Instrument='6E 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='2f773ddd2b9b4debbce9353758468aa4' Gtd='1/1/0001 12:00:00 AM' [A=1.4463 B=1.4462 C=1.4462]
      1362 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 6:01:00 PM MESSAGE:  OnOrderUpdate EXIT [A=1.4463 B=1.4462 C=1.4462]
      OnOrderUpdate: Order='2f773ddd2b9b4debbce9353758468aa4/Replay101' Name='ExitLong' State=Filled Instrument='6E 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=1 Fill price=1.4462 Token='2f773ddd2b9b4debbce9353758468aa4' Gtd='1/1/0001 12:00:00 AM'
      1362 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 6:01:00 PM MESSAGE: UPDATE: Filled [A=1.4463 B=1.4462 C=1.4462]
      1362 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 6:01:00 PM MESSAGE:  OnOrderUpdate EXIT [A=1.4463 B=1.4462 C=1.4462]
      OnOrderUpdate: Order='e5965529addd4a3aa2085a45c670b916/Replay101' Name='EnterLong' State=PendingSubmit Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='e5965529addd4a3aa2085a45c670b916' Gtd='1/1/0001 12:00:00 AM'
      1395 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 11:33:00 PM MESSAGE: UPDATE: PendingSubmit: Order='e5965529addd4a3aa2085a45c670b916/Replay101' Name='EnterLong' State=PendingSubmit Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='e5965529addd4a3aa2085a45c670b916' Gtd='1/1/0001 12:00:00 AM' [A=1.4458 B=1.4457 C=1.4457]
      1395 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 11:33:00 PM MESSAGE:  OnOrderUpdate EXIT [A=1.4458 B=1.4457 C=1.4457]
      OnOrderUpdate: Order='e5965529addd4a3aa2085a45c670b916/Replay101' Name='EnterLong' State=Accepted Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='e5965529addd4a3aa2085a45c670b916' Gtd='1/1/0001 12:00:00 AM'
      1395 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 11:33:00 PM MESSAGE: UPDATE: Accepted [A=1.4458 B=1.4457 C=1.4457]
      1395 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 11:33:00 PM MESSAGE:  OnOrderUpdate EXIT [A=1.4458 B=1.4457 C=1.4457]
      OnOrderUpdate: Order='e5965529addd4a3aa2085a45c670b916/Replay101' Name='EnterLong' State=Working Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='e5965529addd4a3aa2085a45c670b916' Gtd='1/1/0001 12:00:00 AM'
      1395 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 11:33:00 PM MESSAGE: UPDATE: Working: Order='e5965529addd4a3aa2085a45c670b916/Replay101' Name='EnterLong' State=Working Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=0 Fill price=0 Token='e5965529addd4a3aa2085a45c670b916' Gtd='1/1/0001 12:00:00 AM' [A=1.4458 B=1.4457 C=1.4457]
      1395 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 11:33:00 PM MESSAGE:  OnOrderUpdate EXIT [A=1.4458 B=1.4457 C=1.4457]
      OnOrderUpdate: Order='e5965529addd4a3aa2085a45c670b916/Replay101' Name='EnterLong' State=Filled Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='NONE' Filled=1 Fill price=1.4458 Token='e5965529addd4a3aa2085a45c670b916' Gtd='1/1/0001 12:00:00 AM'
      1395 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 11:33:00 PM MESSAGE: UPDATE: Filled [A=1.4458 B=1.4457 C=1.4457]
      1395 INST(6E) 9/1/2011 12:00:00 AM Time: 6/30/2011 11:33:00 PM MESSAGE:  OnOrderUpdate EXIT [A=1.4458 B=1.4457 C=1.4457]

      Comment


        #4
        Reproduced

        Okay,

        I got the simpleMA to do the same thing, repeats only 2 times, but probably due to the lower complexity. I have enclosed the ZIP file for debugging. Here is an example of what it is putting out: (I set this up to un on the 6E instrument)
        Code:
        12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: Accepted [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: Accepted [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: Working: Order='8dfc056510d944e5975bb5892cdaca35/Replay101' Name='ExitLong' State=Working Instrument='6E 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Exit' Filled=0 Fill price=0 Token='8dfc056510d944e5975bb5892cdaca35' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: Working: Order='8dfc056510d944e5975bb5892cdaca35/Replay101' Name='ExitLong' State=Working Instrument='6E 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Exit' Filled=0 Fill price=0 Token='8dfc056510d944e5975bb5892cdaca35' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: Filled [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: PendingCancel: Order='d2d0a686789543d9a534819d4f742ae5/Replay101' Name='EnterLong' State=PendingCancel Instrument='6E 09-11' Action=Sell Limit price=1 Stop price=1 Quantity=1 Type=StopLimit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='d2d0a686789543d9a534819d4f742ae5' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: PendingCancel: Order='d2d0a686789543d9a534819d4f742ae5/Replay101' Name='EnterLong' State=PendingCancel Instrument='6E 09-11' Action=Sell Limit price=1 Stop price=1 Quantity=1 Type=StopLimit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='d2d0a686789543d9a534819d4f742ae5' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: Cancelled: Order='d2d0a686789543d9a534819d4f742ae5/Replay101' Name='EnterLong' State=Cancelled Instrument='6E 09-11' Action=Sell Limit price=1 Stop price=1 Quantity=1 Type=StopLimit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='d2d0a686789543d9a534819d4f742ae5' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: Cancelled: Order='d2d0a686789543d9a534819d4f742ae5/Replay101' Name='EnterLong' State=Cancelled Instrument='6E 09-11' Action=Sell Limit price=1 Stop price=1 Quantity=1 Type=StopLimit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='d2d0a686789543d9a534819d4f742ae5' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: PendingCancel: Order='c8f83ba961b240d7ab964dd1cc8b891b/Replay101' Name='EnterLong' State=PendingCancel Instrument='6E 09-11' Action=Sell Limit price=10 Stop price=0 Quantity=1 Type=Limit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='c8f83ba961b240d7ab964dd1cc8b891b' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: PendingCancel: Order='c8f83ba961b240d7ab964dd1cc8b891b/Replay101' Name='EnterLong' State=PendingCancel Instrument='6E 09-11' Action=Sell Limit price=10 Stop price=0 Quantity=1 Type=Limit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='c8f83ba961b240d7ab964dd1cc8b891b' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: Cancelled: Order='c8f83ba961b240d7ab964dd1cc8b891b/Replay101' Name='EnterLong' State=Cancelled Instrument='6E 09-11' Action=Sell Limit price=10 Stop price=0 Quantity=1 Type=Limit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='c8f83ba961b240d7ab964dd1cc8b891b' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1094 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:22:00 AM MESSAGE: UPDATE: Cancelled: Order='c8f83ba961b240d7ab964dd1cc8b891b/Replay101' Name='EnterLong' State=Cancelled Instrument='6E 09-11' Action=Sell Limit price=10 Stop price=0 Quantity=1 Type=Limit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='c8f83ba961b240d7ab964dd1cc8b891b' Gtd='1/1/0001 12:00:00 AM' [A=1.4321 B=1.4320 C=1.4320]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: PendingSubmit: Order='4ed9055951a54c1792a10f5d6590c363/Replay101' Name='EnterLong' State=PendingSubmit Instrument='6E 09-11' Action=Sell Limit price=1 Stop price=1 Quantity=1 Type=StopLimit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='4ed9055951a54c1792a10f5d6590c363' Gtd='1/1/0001 12:00:00 AM' [A=1.4342 B=1.4341 C=1.4342]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: PendingSubmit: Order='4ed9055951a54c1792a10f5d6590c363/Replay101' Name='EnterLong' State=PendingSubmit Instrument='6E 09-11' Action=Sell Limit price=1 Stop price=1 Quantity=1 Type=StopLimit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='4ed9055951a54c1792a10f5d6590c363' Gtd='1/1/0001 12:00:00 AM' [A=1.4342 B=1.4341 C=1.4342]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: Accepted [A=1.4342 B=1.4341 C=1.4342]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: Accepted [A=1.4342 B=1.4341 C=1.4342]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: PendingSubmit: Order='84667510d00542379a968498f15dbc48/Replay101' Name='EnterLong' State=PendingSubmit Instrument='6E 09-11' Action=Sell Limit price=10 Stop price=0 Quantity=1 Type=Limit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='84667510d00542379a968498f15dbc48' Gtd='1/1/0001 12:00:00 AM' [A=1.4342 B=1.4341 C=1.4342]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: PendingSubmit: Order='84667510d00542379a968498f15dbc48/Replay101' Name='EnterLong' State=PendingSubmit Instrument='6E 09-11' Action=Sell Limit price=10 Stop price=0 Quantity=1 Type=Limit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='84667510d00542379a968498f15dbc48' Gtd='1/1/0001 12:00:00 AM' [A=1.4342 B=1.4341 C=1.4342]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: Accepted [A=1.4342 B=1.4341 C=1.4342]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: Accepted [A=1.4342 B=1.4341 C=1.4342]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: Working: Order='84667510d00542379a968498f15dbc48/Replay101' Name='EnterLong' State=Working Instrument='6E 09-11' Action=Sell Limit price=10 Stop price=0 Quantity=1 Type=Limit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='84667510d00542379a968498f15dbc48' Gtd='1/1/0001 12:00:00 AM' [A=1.4342 B=1.4341 C=1.4342]
        1095 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 11:49:00 AM MESSAGE: UPDATE: Working: Order='84667510d00542379a968498f15dbc48/Replay101' Name='EnterLong' State=Working Instrument='6E 09-11' Action=Sell Limit price=10 Stop price=0 Quantity=1 Type=Limit Tif=Gtc OverFill=False Oco='OCO' Filled=0 Fill price=0 Token='84667510d00542379a968498f15dbc48' Gtd='1/1/0001 12:00:00 AM' [A=1.4342 B=1.4341 C=1.4342]
        1114 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 4:10:00 PM MESSAGE: UPDATE: PendingSubmit: Order='4005938d1fb0445885511711fcc7087a/Replay101' Name='EnterLong' State=PendingSubmit Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Enter' Filled=0 Fill price=0 Token='4005938d1fb0445885511711fcc7087a' Gtd='1/1/0001 12:00:00 AM' [A=1.4332 B=1.4331 C=1.4333]
        1114 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 4:10:00 PM MESSAGE: UPDATE: PendingSubmit: Order='4005938d1fb0445885511711fcc7087a/Replay101' Name='EnterLong' State=PendingSubmit Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Enter' Filled=0 Fill price=0 Token='4005938d1fb0445885511711fcc7087a' Gtd='1/1/0001 12:00:00 AM' [A=1.4332 B=1.4331 C=1.4333]
        1114 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 4:10:00 PM MESSAGE: UPDATE: Accepted [A=1.4332 B=1.4331 C=1.4333]
        1114 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 4:10:00 PM MESSAGE: UPDATE: Accepted [A=1.4332 B=1.4331 C=1.4333]
        1114 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 4:10:00 PM MESSAGE: UPDATE: Working: Order='4005938d1fb0445885511711fcc7087a/Replay101' Name='EnterLong' State=Working Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Enter' Filled=0 Fill price=0 Token='4005938d1fb0445885511711fcc7087a' Gtd='1/1/0001 12:00:00 AM' [A=1.4332 B=1.4331 C=1.4333]
        1114 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 4:10:00 PM MESSAGE: UPDATE: Working: Order='4005938d1fb0445885511711fcc7087a/Replay101' Name='EnterLong' State=Working Instrument='6E 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Enter' Filled=0 Fill price=0 Token='4005938d1fb0445885511711fcc7087a' Gtd='1/1/0001 12:00:00 AM' [A=1.4332 B=1.4331 C=1.4333]
        1114 INST(6E) 9/1/2011 12:00:00 AM Time: 6/28/2011 4:10:00 PM MESSAGE: UPDATE: Filled [A=1.4332 B=1.4331 C=1.4333]
        Attached Files

        Comment


          #5
          Hello,

          Thanks for that.

          Just to clarify you only see this live in market replay correct? Not in historical or live simulated correct?

          Also, if this is the case I will further simplify down and take out the debug method and also the stop loss and profit target and see if I still see the same.

          I look forward to assisting you further.

          Comment


            #6
            Originally posted by NinjaTrader_Brett View Post
            Hello,

            Thanks for that.

            Just to clarify you only see this live in market replay correct? Not in historical or live simulated correct?

            Also, if this is the case I will further simplify down and take out the debug method and also the stop loss and profit target and see if I still see the same.

            I look forward to assisting you further.
            Hi Brett,

            I have not as of yet tested it on a live market, Don't have enough computers/licenses. I have only seen this on the Market Replay. It will not generate the duplicate messages once you remove the SL/PT as you will get the result I posted below. Seems like this issues is caused by adding multiple pending/working orders.

            Comment


              #7
              Hello,

              When I tested this in market replay I did not get the duplication:

              Code:
              PendingSubmit - b9ea16901f29479f9b5eea944ca865e0
              6030 INST(TF) 9/1/2011 12:00:00 AM Time: 7/6/2011 11:15:00 PM MESSAGE: UPDATE: PendingSubmit: Order='b9ea16901f29479f9b5eea944ca865e0/Replay101' Name='EnterLong' State=PendingSubmit Instrument='TF 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Enter' Filled=0 Fill price=0 Token='b9ea16901f29479f9b5eea944ca865e0' Gtd='1/1/0001 12:00:00 AM' [A=848.8000 B=848.6000 C=848.6000]
              Accepted - b9ea16901f29479f9b5eea944ca865e0
              6030 INST(TF) 9/1/2011 12:00:00 AM Time: 7/6/2011 11:15:00 PM MESSAGE: UPDATE: Accepted [A=848.8000 B=848.6000 C=848.6000]
              Working - b9ea16901f29479f9b5eea944ca865e0
              6030 INST(TF) 9/1/2011 12:00:00 AM Time: 7/6/2011 11:15:00 PM MESSAGE: UPDATE: Working: Order='b9ea16901f29479f9b5eea944ca865e0/Replay101' Name='EnterLong' State=Working Instrument='TF 09-11' Action=Buy Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Enter' Filled=0 Fill price=0 Token='b9ea16901f29479f9b5eea944ca865e0' Gtd='1/1/0001 12:00:00 AM' [A=848.8000 B=848.6000 C=848.6000]
              Filled - b9ea16901f29479f9b5eea944ca865e0
              6030 INST(TF) 9/1/2011 12:00:00 AM Time: 7/6/2011 11:15:00 PM MESSAGE: UPDATE: Filled [A=848.8000 B=848.6000 C=848.6000]
              PendingSubmit - 7645431d4a58401cad06fdf56cb8c01e
              6040 INST(TF) 9/1/2011 12:00:00 AM Time: 7/7/2011 12:10:00 AM MESSAGE: UPDATE: PendingSubmit: Order='7645431d4a58401cad06fdf56cb8c01e/Replay101' Name='ExitLong' State=PendingSubmit Instrument='TF 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Exit' Filled=0 Fill price=0 Token='7645431d4a58401cad06fdf56cb8c01e' Gtd='1/1/0001 12:00:00 AM' [A=847.6000 B=847.3000 C=847.4000]
              Accepted - 7645431d4a58401cad06fdf56cb8c01e
              6040 INST(TF) 9/1/2011 12:00:00 AM Time: 7/7/2011 12:10:00 AM MESSAGE: UPDATE: Accepted [A=847.6000 B=847.3000 C=847.4000]
              Working - 7645431d4a58401cad06fdf56cb8c01e
              6040 INST(TF) 9/1/2011 12:00:00 AM Time: 7/7/2011 12:10:00 AM MESSAGE: UPDATE: Working: Order='7645431d4a58401cad06fdf56cb8c01e/Replay101' Name='ExitLong' State=Working Instrument='TF 09-11' Action=Sell Limit price=0 Stop price=0 Quantity=1 Type=Market Tif=Gtc OverFill=False Oco='Exit' Filled=0 Fill price=0 Token='7645431d4a58401cad06fdf56cb8c01e' Gtd='1/1/0001 12:00:00 AM' [A=847.6000 B=847.3000 C=847.4000]
              Filled - 7645431d4a58401cad06fdf56cb8c01e

              Comment


                #8
                Notice how I added my own native print and it matched your prints. I did not see any stop loss or PT get submitted however. Your code looks like you are depending on Position.MarketPosition to submit a stop loss and profit target. You would never want to do this expecially when running unmanaged = true.

                You will want to manually submit the stop loss and profit target inside of OnOrderUpdate() with the fill of entry order.

                I look forward to assisting you further.

                Comment


                  #9
                  Why isn't yours firing the:
                  if (m_1==null)
                  m_1=SubmitOrder(0,OrderAction.Sell,OrderType.StopL imit,1,1,1,"OCO","EnterLong");
                  if (m_2==null)
                  m_2=SubmitOrder(0,OrderAction.Sell,OrderType.Limit ,1,10,10,"OCO","EnterLong");

                  Block?

                  It wasn't until I added more complexity (More than a Buy then Sell in my original posting) that it started to double the events. I don't us the Mar****rder test in my code, it was really to find a good way to fire the SL/PT easily.

                  Comment


                    #10
                    Hello,

                    Would need to change it to submit the orders when the entry orders fill. Not sure why your side would work but on my side it does not. If you change this to fill orders in this manner please repost and I will look into further with development at that point to see if this is expected in market replay.

                    I look forward to assisting you further.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by wzgy0920, 04-20-2024, 06:09 PM
                    2 responses
                    26 views
                    0 likes
                    Last Post wzgy0920  
                    Started by wzgy0920, 02-22-2024, 01:11 AM
                    5 responses
                    32 views
                    0 likes
                    Last Post wzgy0920  
                    Started by wzgy0920, Yesterday, 09:53 PM
                    2 responses
                    49 views
                    0 likes
                    Last Post wzgy0920  
                    Started by Kensonprib, 04-28-2021, 10:11 AM
                    5 responses
                    192 views
                    0 likes
                    Last Post Hasadafa  
                    Started by GussJ, 03-04-2020, 03:11 PM
                    11 responses
                    3,235 views
                    0 likes
                    Last Post xiinteractive  
                    Working...
                    X