Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error sending closing order from Ninja to IB

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

    Error sending closing order from Ninja to IB

    Hello

    I m writing a strategy in unmanaged mode where i m experiencing problems when i m in a position and i want to reverse.
    e.g. if i m one contract short and I run the following code:
    EnterLong(1);
    I get the error:
    Interactive Brokers. Order rejected - reason: no such order: order done (201) affected order: buyToCover 1 Stop

    It looks to as if Ninja is sending IB an order to close my short position with a buyToCover order which IB does not understand.

    Does anybody have an idea how to solve this using managed mode?

    Thanks
    Michael

    This is the log in TWS: CA 10:14:50:260 JTS-CCPDispatcher-1268: Order Canceled - reason:
    CA 10:14:50:260 JTS-ChartOrderProcessor-65: TRADER | WARNING | Completed time is not set on order | id=1591925640 mod=1 liq=false sym=CL side=BUY qty=1 tif=DAY orderType=STP lmtPrice=102.07 stopPrice=102.15 offsetAmt=102.15 originator=Socket orderRef=null ruleGroup=[] state=jfix.FixOrderState$CancelConfirmed acct=DU185578. faParams=null cum=0 conid=43635373 exch=NYMEX compExch=null best=null vwapTime=null goodTil=ExpireDateTime [null] secType=FUT ddeId=995 avpx=1.7976931348623157E308 cumFill=0 preserveDeactivate=false state=jfix.FixOrderState$CancelConfirmed chameleonParams=null adjustedAttribs=None 1.7976931348623157E308 1.7976931348623157E308 1.7976931348623157E308 1.7976931348623157E308 Attributes: BlockOrder=false TrailingUnit=amt StartingPrice=1.7976931348623157E308 ReferencePriceType=None OptOutSmartRouting=false DisplaySize=2147483647 Clearing=/IB OpenCloseAttrib=O AcceptLargeSize=false ReferenceContractId=2147483647 StockRangeLower=1.7976931348623157E308 Hidden=false SweepToFill=false FirmQuoteOnly=false StockRangeUpper=1.7976931348623157E308 OcaGroup=CL 06-14/0001f4e5.53729ce7.01.01-591 ReferenceContractExchange=null OutsideRth=true TwoSidedCrossOrderId=null StockRefPrice=1.7976931348623157E308 MinimumQuantity=2147483647 PercentOffset=1.7976931348623157E308 AllOrNone=false PeggedChangeAmount=1.7976931348623157E308 MarketCapPrice=1.7976931348623157E308 ReceiptTime=20140514-08:07:41 TriggerMethod=Default FacilitationPct=2147483647 ETradeOnly=false NbboPriceCap=1.7976931348623157E308 Delta=1.7976931348623157E308 TouchedTrigger=102.15 OrderCreationTime=20140514-08:07:41 ReferenceChangeAmount=1.7976931348623157E308 OptionAcctAttrib=c CrossQuantity=2147483647 AlgoAttribts: null CompletedAttribs: TrailingKeyAttrib=null
    CA 10:14:50:260 JTS-CCPDispatcher-1268: Error: illegal onRejected for order id=1591925640 mod=1 liq=false from state jfix.FixOrderState$CancelConfirmed
    CA 10:14:50:260 JTS-ChartOrderProcessor-65: TRADER | WARNING | Completed time is not set on order | id=1591925641 mod=1 liq=false sym=CL side=BUY qty=1 tif=DAY orderType=LMT lmtPrice=82.05 stopPrice=82.05 offsetAmt=0.0 originator=Socket orderRef=null ruleGroup=[] state=jfix.FixOrderState$CancelConfirmed acct=DU185578. faParams=null cum=0 conid=43635373 exch=NYMEX compExch=null best=NYMEX vwapTime=null goodTil=ExpireDateTime [null] secType=FUT ddeId=996 avpx=1.7976931348623157E308 cumFill=0 preserveDeactivate=false state=jfix.FixOrderState$CancelConfirmed chameleonParams=null adjustedAttribs=None 1.7976931348623157E308 1.7976931348623157E308 1.7976931348623157E308 1.7976931348623157E308 Attributes: BlockOrder=false CompletedOrderType:Cancelled by User TrailingUnit=amt StartingPrice=1.7976931348623157E308 ReferencePriceType=None OptOutSmartRouting=false DisplaySize=2147483647 Clearing=/IB OpenCloseAttrib=O AcceptLargeSize=false ReferenceContractId=2147483647 StockRangeLower=1.7976931348623157E308 Hidden=false SweepToFill=false FirmQuoteOnly=false StockRangeUpper=1.7976931348623157E308 CompletedOrderTime=20140514-08:14:50 OcaGroup=CL 06-14/0001f4e5.53729ce7.01.01-591 ReferenceContractExchange=null TwoSidedCrossOrderId=null StockRefPrice=1.7976931348623157E308 MinimumQuantity=2147483647 PercentOffset=1.7976931348623157E308 AllOrNone=false PeggedChangeAmount=1.7976931348623157E308 MarketCapPrice=1.7976931348623157E308 ReceiptTime=20140514-08:07:41 TriggerMethod=Default FacilitationPct=2147483647 ETradeOnly=false NbboPriceCap=1.7976931348623157E308 Delta=1.7976931348623157E308 TouchedTrigger=101.04 OrderCreationTime=20140514-08:07:41 ReferenceChangeAmount=1.7976931348623157E308 OptionAcctAttrib=c CrossQuantity=2147483647 AlgoAttribts: null CompletedAttribs: TrailingKeyAttrib=null
    CA 10:14:50:260 JTS-CCPDispatcher-1268: Order Canceled - reason:
    CA 10:14:50:360 AWT-EventQueue-0: EXEC Sorting now main model 30730826
    CA 10:14:50:360 AWT-EventQueue-0: EXEC Sorting now main model 22269677
    CA 10:14:50:360 AWT-EventQueue-0: EXEC Sorting now main model 10840492
    CA 10:14:50:360 AWT-EventQueue-0: EXEC Sorting now main model 24800890
    CA 10:14:50:370 AWT-EventQueue-0: No such order: order done

    #2
    Thanks for the report, just to clarify - with the Enter() methods you would definitely be in managed mode and not unmanaged.

    Which NT7 release version and TWS build are you exactly using in your setup?

    Would be great if you could contact us via Help > Mail to Support so we could review the NT native diagnostic files for this issue.

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      here the info:

      Build 944.3c, Apr 29, 2014 5:52:27 PM
      Jolt Build 1.2.6, Feb 14, 2014 04:09:43 PM
      Nia Build 1.11.5, Jan 22, 2014 05:21:07 PM
      ModelNav Build 1.1.47, Jan 7, 2014 10:26:24 AM
      Riskfeed Build 1.24.7, Mar 5, 2014 10:12:20 AM


      Java Version: 1.7.0_55
      OS: Windows 7 (x86, 6.1)

      Comment


        #4
        Ok, thanks - do you use that in tandem with NT7 Release 22, so the 7.0.1000.22?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I just sent the email.
          My Ninja sais: NinjaTrader 64bit 7.0.1000.22 multibroker live.

          Does that help?

          Thanks
          Michael

          Comment


            #6
            Yes, thanks. Will check into your email with the files shortly.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by timko, Today, 06:45 AM
            1 response
            7 views
            0 likes
            Last Post gaz0001
            by gaz0001
             
            Started by Waxavi, 04-19-2024, 02:10 AM
            3 responses
            41 views
            0 likes
            Last Post gaz0001
            by gaz0001
             
            Started by Max238, Today, 01:28 AM
            2 responses
            26 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by Shansen, 08-30-2019, 10:18 PM
            25 responses
            949 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by JonesJoker, 04-22-2024, 12:23 PM
            8 responses
            43 views
            0 likes
            Last Post JonesJoker  
            Working...
            X