Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order covers instantly after executing

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

    Order covers instantly after executing

    I have a automated strategy that trades the TF. The exact same code works fine on the ES and CL. However when it trades on the TF the orders are executed and immediately covered. I have my Time in Force set to day as I know ICE does not accept GTC orders. The orders are not rejected they just cover instantly. This happens on both TT and PATS data connection. Any ideas?

    #2
    Hello dancoral,

    The best first step here is to turn on TraceOrders output, so you can see what is submitting the exit order. That will help you narrow it down to the specific exit statement, stop loss or target.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      This only happens in live trading not SIM and will cost me about 2 ticks just to run that test. Any other ideas?

      Comment


        #4
        If you can mail your trace and log files for a day where this occurred, I can take a look. Files are labeled in YYMMDD format and are found in:

        My Documents\NinjaTrader\log
        My Documents\NinjaTrader\trace

        Mail to [email protected] or post to this thread.

        Reference this thread:


        Please indicate the exact date / time where these trades occurred.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Ryan, I sent the files to support. Please let me know what you think

          Comment


            #6
            Likely the issue is submitting stop orders for this instrument \ exchange combination.

            10/4/2010 9:40:26 AM|0|32|Combination order type 'Stop' and time-in-force 'Day' not supported by exchange 'Nybot' Affected Order: BuyToCover 2 Stop @ 678

            This order is rejected and then the strategy closes itself:

            10/4/2010 9:40:26 AM|0|128|Strategy '' submitted an order that generated the following error 'OrderRejected'. Strategy has sent cancel requests, attempted to close the position and terminated itself.

            You may have to check with your broker on supported order types for ICE. If stop orders are not accepted, you could use instead stop limit orders.

            ExitShortStopLimit()
            ExitLongStopLimit()
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              rod alexander

              I have a new Strategy,that originally traded 1 contract per side,as directed.After the 2 day I started having problems with trades increasing to 3 contracts. I assume I wasn't in Sync between Accounts & Strategy positions. Read all I could on the matter. Changed details in Options to Wait until flat before executing live.. Ticked Cancel entry orders when a strategy is disabled.ditto Cancel Exit orders when a strategy order is disabled.
              Checked positions in Control Center, NO Positions. Account Positions Nil.
              My First Order is always for 1 contract,the second order changes to 3, instead of 2 contracts, to leave me in 1 contract per side.If I wasn't in Sync,wouldn't my first order be 2, or more contracts?
              If there is an previous order, or orders,in Virtual,where is it & how do I delete it. to start in Sync every day.
              After the trading day, & the market, Exchange is closed. I always go over the results using various different variations of my strategy to see which one works best. In order to do this I "enable" my strategy, & some times I test in Sim as well, with enable on. But I always trade in DAY,so this as I believe shouldn't place any orders in Virtual.
              I only trade 1strategy, NOT multiples.
              To be absolutely sure I'm not making a mistake, I need to know a simple way of making sure I'm in Sync with Accounts & Strategy. Being a computer laymen. Could you, Please Help.

              Comment


                #8
                Hello ralexander,

                You should use TraceOrders output to see information related to strategy submitted orders.

                If your strategy scales in, please see this reference sample for help with a scaling strategy:


                One approach to maintaining sync between a strategy position and an account position is to only run on live data. You can use the following lines for this:

                if (Historical)
                return;

                Add that to top of OnBarUpdate() method
                Last edited by NinjaTrader_RyanM1; 10-06-2010, 09:48 AM.
                Ryan M.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by elderan, Today, 08:03 PM
                0 responses
                1 view
                0 likes
                Last Post elderan
                by elderan
                 
                Started by algospoke, Today, 06:40 PM
                0 responses
                10 views
                0 likes
                Last Post algospoke  
                Started by maybeimnotrader, Today, 05:46 PM
                0 responses
                8 views
                0 likes
                Last Post maybeimnotrader  
                Started by quantismo, Today, 05:13 PM
                0 responses
                7 views
                0 likes
                Last Post quantismo  
                Started by AttiM, 02-14-2024, 05:20 PM
                8 responses
                169 views
                0 likes
                Last Post jeronymite  
                Working...
                X