Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simulator Delay below 1 second

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

    Simulator Delay below 1 second

    Hi,

    I am simulating on tick data (which is second data in NT...). If I send an order at Time0, will the 'nextLow/nextHigh variables in the filltype from the matching come from data at Time0 , +1second, or +2 seconds in the following cases?

    Delay exchange = 0

    1) Delay comm = 0

    2) Delay comm = 100ms

    Also, in each case, the 'nextLow/nextHigh variables in the filltype class will come from which time?

    Thanks

    #2
    benoirat, the filltype would only come into play in the historical processing part of your testing, not when you actually trade live in the simulator (in replay those delay settings are non effective).
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand, I am talking about backtesting with the strategy analyser.

      I am using multiple bars (bid, ask, last) with liberal fill.

      1) At time T0 I send an order on the 'last' bar.

      2) I receive a fill, which seems is filled on the nexthigh (next last tick is T + 48 seconds).

      3) At time t + 1 second, I have an update on my bid bar. At this point my backtest time is T + 1 second, but I have already been filled on the last bar of T + 48 seconds.

      This is clearly very wrong. How do I have the simulator feed me all bid/ask updates up to T+48 (in this example) seconds before it gives me OnExecution?

      Comment


        #4
        Ok, you sent the order on the last update - but to which series the last or another one specifically?

        The fill in backtesting would always be given for the next bar, that's what we would expect. OnExecution is not really tied to bars update, so the execution time can report in advance reflecting getting filled on the next bar / the earlist possible trade location in backtesting.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks for the explanation Bertrand,

          I am sending the order on any bar update, but sending the order on the 'last' bar.

          Is there a way for me to not get the trade in advance as compared to the bar updates (this is way too optimistic in some cases)? Would using onpositionupdate to update my position be synchronized with the bar updates?

          Thanks

          Comment


            #6
            I guess I'm not following you then, the fill you get in always for the next bar you sent the order to - it would not be overstating performance this way - what you would see however is the execution time report in advance of your current processed bar time if you check out of OnBarUpdate context and that would be completely expected, since you are seeing an execution on the next bar.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Ok,

              I take my trading decisions on onbarupdate, but taking into account prices AND position, so I guess that I will have to filter out the executions that have a timestamp ahead of the onbarupdate in my trigger algo.

              It would be nice though if NT would trigger all events chronologically, like it would most likely happen in real life. If this can be put on a wish list I would be hapy to see it there :-)

              Comment


                #8
                'It would be nice though if NT would trigger all events chronologically, like it would most likely happen in real life'

                This is what what happens, the events are in sequence - however the time you get reported is the timestamp of the execution bar, so it can seem it executes in advance > which actually is not the case.
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by lorem, Yesterday, 09:18 AM
                4 responses
                13 views
                0 likes
                Last Post lorem
                by lorem
                 
                Started by Spiderbird, Today, 12:15 PM
                0 responses
                5 views
                0 likes
                Last Post Spiderbird  
                Started by cmtjoancolmenero, Yesterday, 03:58 PM
                12 responses
                42 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by FrazMann, Today, 11:21 AM
                0 responses
                6 views
                0 likes
                Last Post FrazMann  
                Started by geddyisodin, Yesterday, 05:20 AM
                8 responses
                52 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X