Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How long orders stay active

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

    How long orders stay active

    In a strategy created in the wizard, long entry is specified at bid-2ticks. Most of these orders will not fill immediately.How long does this order stay active? Is there a time setting to keep the order alaive for a certain time such as 2 seconds, and cancel if not filled in two seconds.

    How is this issue taken into account in the strategy analyzer?

    #2
    Hello,

    Working order stay active for one bar and must be resubmitted each bar to remain working. If you want the order to be removed after a certain time you will need to programmatically monitor time until you want to cancel the order, then cancel it:


    This is true unless you se the liveUntilCancelled feature:


    This may be a little tricky to backtest because you only have the OHLC values available to execute on:


    Let me know if you have more questions.
    DenNinjaTrader Customer Service

    Comment


      #3
      1. I am trying to use the wizard ONLY and strongly prefer to not get in the coding. My order is created as part of the strategy by the wizard.

      I want to make sure I completely understand your answer. Since I am using 6 second bars, does it mean that the order will stay alive for a maximum of 6 seconds. for exammple, if the order was submitted at 2.4 seconds into the bar, the order will be cancelled after 3.6 seconds if not filled. AND WILL NOT BE AUTOMATICALLY RESUBMITTED.

      2. Since i am using 6sec bars, i want to see seconds on the x axis of the chart. It shows only minutes. How do I show seconds.

      Without programming, what kind of time settings (other than day or gtc) are possible on the automaticaly generated orders from a strategy.

      3. Idealy i would like to include in my strategy CANCEL THE ORDER IF NOT FILLED IN 'x' seconds. x can be a numeric value or a numeric value determined by volatility.

      4 How are market orders automaticaly generated by a strategy submitted to IB?

      5.IB submits market orders as limit, cancels them if not filled and resubmits them at the new price where they will fill. I have seem market orders at IB not getting filled. If a market order is not filled by the end of the bar, does nt automatically cancel it or what else happens?

      6. As you know IB filters it ticks. I have collected over 2 months of data from ib by letting the 6 second charts run during the market hours. Has NT stored every tick that came from IB or just the ohlc and vol for each 6sec bar.

      7. order execution on historical data collected as above on 6 sec bars is SIGNIFICANTLY OFF from the real time results using another program. One can clearly see the conditions for an order completely met on the chart in nt, but the order is not placed.; exactly at the same split second my other program placed the automaticaly generated order with ib in real time and the order executed.

      It seems that nt fails to submit ordres (looking at the historical charts) about 25% of the time. The behavior seems random and is especially pronounced when the order condition lasts less than two 6sec bars? Can you please explain your experience? IS THERE A FLAW IN NT DESIGN THAT MAKES IT FLAKY ON SMALLER TIME FRAMES?
      IS NT NOT SUITABLE FOR SUB-MINUTE TRADES? ARE THERE SOLUTIONS?

      8. in order handling using wizard, can you please share the EXACT, NOT VAGUE, difference quantitatively between default and liberal?

      9 in order handling using wizard, can you please explain EXIT ON CLOSE--TRUE/FALSE.? is it close of the day or the bar? If bar, should the stting be on false to immediately execute the exit order generated by the strategy from the wizard

      Comment


        #4
        Hello,

        1- It means that you will need to keep a condition evaluating to true and submitting the working order for each bar to keep the order working. Just once per bar is enough. Yes, every 6 seconds in your case. But don't think of it in time, think of it in bars/intervals.

        AND WILL NOT BE AUTOMATICALLY RESUBMITTED.
        >>Yes

        2- I am sorry, you cannot modify these values. However do you have 00:00:00 format on the x axis when you are on a six second chart? What data feed are you testing this on?

        3- You will need to create a criteria using "Time" that does this.

        4- I am sorry, please clarify. The strategy sends a signal to IB requesting the order and IB creates the order and sends it to the market. This link may help:
        Note: This information is relevant for NinjaTrader 7 only. For NinjaTrader 8, please click here (https://ninjatrader.com/support/helpGuides/nt8/where_do_your_orders_reside_.htm). CQG Orders in a state "Accepted" or "Working" are at the exchange. If the exchange does not support a specific order type, the


        5- If the order is not filled the order is cancelled at the end of the bar.

        6- If you are storing the data, every tick is stored.

        7- NT was orignally designed for inter-minute trading. It is rock solid. You are likely looking at different data sets, which will not be the same, or you trying to compare live results with backtest results:


        I suggest posting some screen shots of what you are looking at so we can compare the same thing and tell you what is wrong with what you are looking at. NT certainly does not skip 25% of the trades, and does not miss any trades unless something in this link happens:


        But anything in the above link is true for every platform, not just NT.

        8- Have you seen this:
        The two system fill algorithms are:


        Default
        An algorithm that takes a conservative and more realistic approach to filling limit and stop limit orders.
        • <LI class=rvps1>Limit orders only fill if the limit price was penetrated
        • Limit orders are always filled at the limit price specified never better (for example, if a limit order is submitted on bar n, NT will check if the order is filled on bar n+1, if this bar gaps down and the limit order was a buy, the order would be filled at the limit price and NOT the high of bar n+1)


        Liberal
        An algorithm that takes a liberal approach to filling limit and stop limit orders.
        • <LI class=rvps1>Limit orders fill if the limit price was touched <LI class=rvps1>On gap down bars, buy limit orders will fill at the high of the gap down bar
        • On gap up bars, sell limit orders will fill at the low of the gap up bar


        Slippage can also be set expressed in "ticks" or, the minimum value of fluctuation for an instrument. Slippage is only applied to market and stop market orders since slippage is impossible with a limit order.

        You can get that information here:


        9- This information can be found in the link above:
        Exit on close
        When enabled, open positions are closed on the last bar of a session


        I am happy to clarify anything you need. Just let me know.
        DenNinjaTrader Customer Service

        Comment


          #5
          qestions aring from your answers

          Please scroll down to see qestions aring from your answers



          Originally posted by NinjaTrader_Ben View Post
          Hello,

          1- It means that you will need to keep a condition evaluating to true and submitting the working order for each bar to keep the order working. Just once per bar is enough. Yes, every 6 seconds in your case. But don't think of it in time, think of it in bars/intervals.

          AND WILL NOT BE AUTOMATICALLY RESUBMITTED.
          >>Yes

          2- I am sorry, you cannot modify these values. However do you have 00:00:00 format on the x axis when you are on a six second chart? What data feed are you testing this on?

          IB data from running over the last 2 months. How do I get 00:00:00 format? I have 00.00

          3- You will need to create a criteria using "Time" that does this.

          Can I do this in the wizard, how?

          4- I am sorry, please clarify. The strategy sends a signal to IB requesting the order and IB creates the order and sends it to the market. This link may help:
          Note: This information is relevant for NinjaTrader 7 only. For NinjaTrader 8, please click here (https://ninjatrader.com/support/helpGuides/nt8/where_do_your_orders_reside_.htm). CQG Orders in a state &quot;Accepted&quot; or &quot;Working&quot; are at the exchange. If the exchange does not support a specific order type, the


          When Ib receives a market order through API, it does not send a market order to the exchange, rather it sends a limit order at the ask if it was a long oder and so on. if the order does not fill and ask changes, ib cancels the order and resubmits a new limit order at the new ask. Hope this info helps you answer my question

          5- If the order is not filled the order is cancelled at the end of the bar.

          6- If you are storing the data, every tick is stored.

          7- NT was orignally designed for inter-minute trading. It is rock solid. You are likely looking at different data sets,

          I can not be sure but both data sets should be same. ONe data set is over two months keeping NT 6 sec charts running and now used for historical testing of a specific strategy. The other data set is another program automatically submitting orders generated from EXACTLY THE SAME SPECIFIC STRATEGY RUNNING IN THIS OTHER PROGRAM TO IB IN REAL TIME.
          hOPE THIS HELPS YOU TO ANSWER MY QUESTION AND GUIDE ME IN MORE DETAIL

          which will not be the same, or you trying to compare live results with backtest results:


          Does it mean that there is no point in backtesting strategies based on 6 sec bars and desined to exit under 2 minutes

          I suggest posting some screen shots of what you are looking at so we can compare the same thing and tell you what is wrong with what you are looking at. NT certainly does not skip 25% of the trades, and does not miss any trades unless something in this link happens:


          But anything in the above link is true for every platform, not just NT.

          8- Have you seen this:
          The two system fill algorithms are:


          Default

          An algorithm that takes a conservative and more realistic approach to filling limit and stop limit orders.
          • <LI class=rvps1>Limit orders only fill if the limit price was penetrated
          • Limit orders are always filled at the limit price specified never better (for example, if a limit order is submitted on bar n, NT will check if the order is filled on bar n+1, if this bar gaps down and the limit order was a buy, the order would be filled at the limit price and NOT the high of bar n+1)

          Liberal

          An algorithm that takes a liberal approach to filling limit and stop limit orders.
          • <LI class=rvps1>Limit orders fill if the limit price was touched <LI class=rvps1>On gap down bars, buy limit orders will fill at the high of the gap down bar
          • On gap up bars, sell limit orders will fill at the low of the gap up bar

          Slippage can also be set expressed in "ticks" or, the minimum value of fluctuation for an instrument. Slippage is only applied to market and stop market orders since slippage is impossible with a limit order.

          You can get that information here:


          9- This information can be found in the link above:
          Exit on close
          When enabled, open positions are closed on the last bar of a session


          I am happy to clarify anything you need. Just let me know.
          10. What are the differences between IB paper trader and nt sim using real time ib connection? In your experience, are the performance results from the two same or different?

          11. are there tools or suggested methods to efficiently monitor in real time orders placed and fills in real time using a strategy from nt sim with ib real time data?

          Comment


            #6
            Hello,

            I think one statement will clear all of this up for you: IB does not support tick data with NT. Because of this you won't be able to do a lot of what you want to do. However the Time values in conditions using seconds can be used in the Wizard. See my screen shot attached. So you won't be able to do things with tick data, but time will change per second of course. What you are trying to do in NT is using IB, is not possible. You need tick data to use second based bars.

            If that doesn't clear it up, please repost the issues you still have and I will help.

            10. What are the differences between IB paper trader and nt sim using real time ib connection? In your experience, are the performance results from the two same or different?

            >>I don't know about the performance of IB paper trader so I can't help you. I assume it is similar to ouur sim101 accounts in performance, but I don't know. I suggest testing it. The difference is that IB paper trader works like an IB account and is available via their platform (I think) but is available like any other account in NT. Sim accounts in NT will be available in NT only and are local to NT. I suggest using them to test it. I do not have access to IB paper trader accounts so I can't really help you with those. Ask IB about them maybe?

            11. are there tools or suggested methods to efficiently monitor in real time orders placed and fills in real time using a strategy from nt sim with ib real time data?

            >>What do you mean by "monitor"? If I understand you, yes. Just place an order in the Sim101 account in NT while connected to IB and you can monitor it in NT.

            Let me know if I can help further.
            Attached Files
            DenNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            648 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X