Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OCO orders on IB servers

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

    OCO orders on IB servers

    Hi! in Automated trading, in a situation where i have multiple entries, my target and stop loss are based on Avg Price...so far i have been using the Conditions and Actions window in Strat wizard , it works BUT stop and target are NOT based on IB servers... i simulated a crash of NT by closing it in a middle of a trade and the stop and target disappeared from IB TWS...

    As far as i know i can't use the Stops and Targets window in Strat Wizard for the types of stop and tgt that i use because they are calculated on AvgPrice not single entry or Cash...

    >>> I want my Stop and Target
    1- to be calculated on Avg Price of multiple entries
    2- to be OCO orders
    3- to reside on IB servers..

    how can do that ??


    thanks for help !!!

    #2
    Hello Number9,

    Thanks for the post and welcome to the NinjaTrader forums!

    Yes, orders should generally be held with TWS if submitted there. Can you please provide some more details on your setup:
    What account did you submit orders to?
    What version of TWS are you using?
    What was the state listed for these orders in the orders tab of control center?
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      thanks for the quick reply....
      What account did you submit orders to?
      real live real money IB account

      What version of TWS are you using?
      Build 909.9 Oct 26 2010

      What was the state listed for these orders in the orders tab of control center?
      working and accepted



      Comment


        #4
        Thank you for including those details. You should be using version 911 of TWS. The download for this is available here:


        As well, follow all the guidelines listed for API settings within the TWS application here.


        Explicit OCO linking is only available with Set statements or when specifying an OCO id when using unmanaged orders. I do not see the same issue testing with Set statements on IB paper trading account here. The orders remain at TWS, and are given matching OCO ID.

        If you're using NinjaScript Exit() commands, there is no explicit OCO link with for example ExitLongLimit() and ExitLongStop(). In order for NinjaTrader to cancel remaining exit orders with this setup, it needs to be running with an active connection to IB. Once the strategy reports a flat state based on an exit order fill, it then cancels any remaining orders associated with that position.

        There is also a setting for when exit orders are cancelled when a strategy is disabled. You can toggle this through Tools > Options > Strategies > NinjaScript tab.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Explicit OCO linking is only available with Set statements

          Could you please tell me more about this and/or where i can find the information about this... thanks..
          Last edited by Number9; 05-25-2011, 02:25 AM.

          Comment


            #6
            Number9, if you work with the wizard pleae use the Set statement for your exits from the Stop / Targets section, not the Exit orders like in your shown shot, those would not be OCO per default.



            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by mattbsea, Today, 05:44 PM
            0 responses
            2 views
            0 likes
            Last Post mattbsea  
            Started by RideMe, 04-07-2024, 04:54 PM
            6 responses
            31 views
            0 likes
            Last Post RideMe
            by RideMe
             
            Started by tkaboris, Today, 05:13 PM
            0 responses
            2 views
            0 likes
            Last Post tkaboris  
            Started by GussJ, 03-04-2020, 03:11 PM
            16 responses
            3,281 views
            0 likes
            Last Post Leafcutter  
            Started by WHICKED, Today, 12:45 PM
            2 responses
            20 views
            0 likes
            Last Post WHICKED
            by WHICKED
             
            Working...
            X