Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OrderFillResolution not working

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

    OrderFillResolution not working

    Hi,

    I have a custom strategy that is set to process historical order fills based on a 1 tick data series:

    Code:
    OrderFillResolution = OrderFillResolution.High;
    OrderFillResolutionType = BarsPeriodType.Tick;
    OrderFillResolutionValue = 1;​
    However, it seems to only be processing historical order fills based on a 1 second data series, or rather binned to a 1 second granularity...below is information printed from OnOrderUpdate()

    Notice the timestamps all occur evenly on the second. When I run this same strategy on realtime data, order updates occur at the timestamps of the 1 tick series including milliseconds. To replicate this behavior, simply submit an order on every bar update and you will see what I'm referring to. This becomes an issue when multiple events happen within the same second, because the fill algorithm assumes the price is already at the close of the given 1 second bar, potentially causing erroneous fills for previous events within that bar. Please advise, the fill algorithm should not bin fills by the second when the order fill resolution is set to 1 tick.

    Code:
    order update: ChangePending, 06:08:27.000 AM, 2
    order update: ChangeSubmitted, 06:08:27.000 AM, 2
    order update: Accepted, 06:08:27.000 AM, 2
    order update: Working, 06:08:27.000 AM, 2
    
    order update: ChangePending, 06:08:36.000 AM, 2
    order update: ChangeSubmitted, 06:08:36.000 AM, 2
    order update: Accepted, 06:08:36.000 AM, 2
    order update: Working, 06:08:36.000 AM, 2
    
    order update: ChangePending, 06:08:58.000 AM, 2
    order update: ChangeSubmitted, 06:08:58.000 AM, 2
    order update: Accepted, 06:08:58.000 AM, 2
    order update: Working, 06:08:58.000 AM, 2​

    #2
    Does your market data have milliseconds in it? It could be binned to the second if, for instance, your market data has only seconds resolution.

    But also, I have observed that the trade list when the trades are displayed on the chart with markers always moves the trades visually to the last bar in that second even if the data has milliseconds in it, so possibly the trades themselves are being only stored with 1-second resolution? If the visual observation has underlying a trade object that doesn't allow milliseconds to be stored, then that would explain that and also your observed issue all at once.
    Last edited by QuantKey_Bruce; 06-01-2023, 04:26 AM.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello schmidtbc16,

      Thank you for your post.

      It does seem that this behavior depends on the granularity of data offered by your data provider. We have a section about "Shared Timestamps" on the help guide page about multi-time frame and instruments that might be helpful to review in your case:


      You can likely review the timestamps of your tick data in the Control Center > Tools > Historical Data window. Select an instrument and expand the folders for tick data to review how frequently the data is stamped (second or millisecond granularity).

      Please let us know if we may be of further assistance.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      54 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      72 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X