Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Orders "Exit Position"

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

    Unmanaged Orders "Exit Position"

    I have been working on getting my Unmanaged Order Library functional under NT8. I have bumped into a major limitation that I cant figure out if I am causing or is an issue with Unmanaged orders under NT8. The issue is I can GO LONG or but not flatten. That is, I can issue a BUY order for 1 contract, this internally triggers a SL/PT, then I cancel the SL/PT to change position and exit the LONG with a SELL. The order is accepted and works it way through processing all the way to "WORKING", but never reaches the FILLED state. I am using NTBroker connection.

    Here is a snippet of the output for the LONG and FLAT request:
    7/15/2015 6:14:01 PM Strategy 'LOMTestStrategy01/48559767': Entered internal SubmitOrderUnmanaged() method at 7/15/2015 6:14:01 PM: BarsInProgress=0 Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='GoLongMarket0'
    LOMTestStrategy01 60 INST(CL 08-15) Time: 7/15/2015 6:14:01 PM MarkPos: Flat OSS: 1 CSS: 0 MESSAGE: OnOrderUpdate: PROCESSING: orderId='NT-00000-254' account='Sim101' name='GoLongMarket0' orderState=Submitted instrument='CL 08-15' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='ENTER0__48559767_1' filled=0 averageFillPrice=0 id=-1 gtd='2099-12-01' [A=51.4400 B=51.4400 C=51.4400]
    LOMTestStrategy01 60 INST(CL 08-15) Time: 7/15/2015 6:14:01 PM MarkPos: Flat OSS: 1 CSS: 0 MESSAGE: OnOrderUpdate: PROCESSING: orderId='NT-00000-254' account='Sim101' name='GoLongMarket0' orderState=Accepted instrument='CL 08-15' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='ENTER0__48559767_1' filled=0 averageFillPrice=0 id=-1 gtd='2099-12-01' [A=51.4400 B=51.4400 C=51.4400]
    LOMTestStrategy01 60 INST(CL 08-15) Time: 7/15/2015 6:14:01 PM MarkPos: Flat OSS: 1 CSS: 0 MESSAGE: OnOrderUpdate: PROCESSING: orderId='NT-00000-254' account='Sim101' name='GoLongMarket0' orderState=Working instrument='CL 08-15' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='ENTER0__48559767_1' filled=0 averageFillPrice=0 id=-1 gtd='2099-12-01' [A=51.4400 B=51.4400 C=51.4400]
    LOMTestStrategy01 CL 08-15 LocalOrderSubmitted: orderId='NT-00000-254' account='Sim101' name='GoLongMarket0' orderState=Working instrument='CL 08-15' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='ENTER0__48559767_1' filled=0 averageFillPrice=0 id=-1 gtd='2099-12-01'
    LOMTestStrategy01 60 INST(CL 08-15) Time: 7/15/2015 6:14:01 PM MarkPos: Flat OSS: 1 CSS: 0 MESSAGE: OnOrderUpdate: PROCESSING: orderId='NT-00000-254' account='Sim101' name='GoLongMarket0' orderState=Filled instrument='CL 08-15' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='ENTER0__48559767_1' filled=1 averageFillPrice=51.45 id=-1 gtd='2099-12-01' [A=51.4400 B=51.4400 C=51.4400]
    LOMTestStrategy01 60 INST(CL 08-15) Time: 7/15/2015 6:14:01 PM MarkPos: Flat OSS: 1 CSS: 0 MESSAGE: OnExecute: PROCESSING: orderId='NT-00000-254' account='Sim101' name='GoLongMarket0' orderState=Filled instrument='CL 08-15' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='ENTER0__48559767_1' filled=1 averageFillPrice=51.45 id=-1 gtd='2099-12-01' OrderState=Filled [A=51.4400 B=51.4400 C=51.4400]
    ============================================= Try to Go Flat =============
    7/15/2015 6:16:10 PM Strategy 'LOMTestStrategy01/48559767': Entered internal SubmitOrderUnmanaged() method at 7/15/2015 6:16:10 PM: BarsInProgress=0 Action=Sell OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='ExitMarketLong0'
    LOMTestStrategy01 70 INST(CL 08-15) Time: 7/15/2015 6:16:10 PM MarkPos: Long OSS: 0 CSS: 0 MESSAGE: OnOrderUpdate: PROCESSING: orderId='NT-00003-256' account='Sim101' name='ExitMarketLong0' orderState=Submitted instrument='CL 08-15' orderAction=Sell orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='EXIT0__48559767_3' filled=0 averageFillPrice=0 id=-1 gtd='2099-12-01' [A=51.4600 B=51.4600 C=51.4600]
    LOMTestStrategy01 70 INST(CL 08-15) Time: 7/15/2015 6:16:10 PM MarkPos: Long OSS: 0 CSS: 0 MESSAGE: OnOrderUpdate: PROCESSING: orderId='NT-00003-256' account='Sim101' name='ExitMarketLong0' orderState=Accepted instrument='CL 08-15' orderAction=Sell orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='EXIT0__48559767_3' filled=0 averageFillPrice=0 id=-1 gtd='2099-12-01' [A=51.4600 B=51.4600 C=51.4600]
    LOMTestStrategy01 70 INST(CL 08-15) Time: 7/15/2015 6:16:10 PM MarkPos: Long OSS: 0 CSS: 0 MESSAGE: OnOrderUpdate: PROCESSING: orderId='NT-00003-256' account='Sim101' name='ExitMarketLong0' orderState=Working instrument='CL 08-15' orderAction=Sell orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='EXIT0__48559767_3' filled=0 averageFillPrice=0 id=-1 gtd='2099-12-01' [A=51.4600 B=51.4600 C=51.4600]
    I get the same problem with a SHORT to FLAT as well. No Fill on the BuyToCover and no call to OnExecutionUpdate(). Is there something that changed in NT8? This was the proper approach in NT7.



    #2
    Hello NJA_MC,

    Thank you for your post.

    May we review the Log and Trace for this occurrence?

    You can send them over to platformsupport[at]ninjatrader[dot]com with this thread as reference: "http://ninjatrader.com/support/forum/showthread.php?t=76330"

    Comment


      #3
      Okay,

      Should be in your Inbox. I added a test script as well as I couldn't get the TRACE to show much in the log files. NT7 printed a lot of stuff, NT8 doesn't seem to.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by schmidtbc16, Today, 03:36 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by RT001, Today, 03:25 PM
      2 responses
      12 views
      0 likes
      Last Post RT001
      by RT001
       
      Started by mbrandau, Today, 01:58 PM
      5 responses
      37 views
      0 likes
      Last Post mbrandau  
      Started by remcovdmeulen, Today, 02:15 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by gbrad, Today, 09:57 AM
      7 responses
      15 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X