Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Weird execution time

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

    Weird execution time

    Hi,

    I've written a strategy that executes trades based on cross and on market position check. I compare the values of bar 1 and bar 2 (never bar 0, since it's live bar) and I use "CalculateOnBarClose = false" for tick-by-tick operation.

    The trade on screenshot is taken on 10:40 AM, while the bar stamp is at 10:35 AM. Shouldn't the execution time be 10:35 AM as well, since we checked the previous bar for possible cross and the conditions were met (see the below cross of ADX / EMA(ADX)). The price (it took opening price of that bar) is actually from 10:35, while execution time is at 10:40.

    Any help appreciated.
    Attached Files

    #2
    Hello,

    Multitime frame charts of the same instrument will have executions plotted on the first series of the instrument even if the NS strategy is ran on the second series.

    Is this trade being shown a real time trade or historical?
    What are your BIP 1 and 2 series?
    LanceNinjaTrader Customer Service

    Comment


      #3
      Thanks for your response.

      It is not multi-timeframe strategy nor it's multi-instrument strategy.

      It is a real-time trade, not historical. I'm very aware that it will repaint because NT7 calculates historical values with "onbaclose = true".

      What is BIP?

      Comment


        #4
        Hello,

        Sorry about the misunderstanding. BIP was in regards to if it was a multi series script. It stands for BarsInProgress

        Looking at your PCs clock and the right most bar it leads me to beleive there is a discrepancy between your pc clock and the internet time.

        Please use the steps below to change your Time Zone and sync the PC clock, note to set the server to time.nist.gov.

        You can sync your PC clock by double clicking on the clock in the lower right corner of your desktop. Press 'Change time zone...' Set the Time zone and press 'OK'.

        Once you have done that, click on Internet Time tab set the server to time.nist.gov and then click Update. Your PC clock should now be updated.

        Restart NinjaTrader

        Let me know if I can be of further assistance.
        LanceNinjaTrader Customer Service

        Comment


          #5
          Is the PC clock related to this problem? Aren't the execution times and bar stamps based on the broker server clock?

          Comment


            #6
            Most likely yes.

            The NinjaTrader bars are based off of your local PC time. When this is not in sync you can have incorrectly drawn bars and time stamps
            LanceNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            650 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            577 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X