Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting the proper TickTime

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

    Getting the proper TickTime

    So is the requirement of OnMarketData() and OnMarketDepth() in conflict with putting all logic in the if(FirstTickOfBar) else (for the other ticks)?

    Does all of the current logic have to be rewritten just to get the tick time???

    If so, note that mine is a posted recommendation and request that all information is supplied when writing the code in this fashion. It should have been extremely simple to include the seconds with the other price information, instead of always seconds=00.

    When the Open, Close, etc. are all correct...why have incorrect time information tied to the tick pricing/bars?

    #2
    Not sure what you mean. OnMarketData/Depth() are their own methods. They have nothing to do with whatever you do in OnBarUpdate().

    The methods can "interact" by using shared variables and such. For sure you will need to reprogram your logic to take into account the tick times if that is something you want to use.

    Time[] is the timestamp of the bar, just like how Close[] is the close of the bar and not the close of the tick. Time[] is not the timestamp of the last traded tick. Bars do not include tick timestamps as that is not the timestamp of the bar. Showing tick timestamps here would be inconsistent behavior and unexpected. If you want tick timestamps you need to grab it from OnMarketData/Depth(). If you don't care what the exchange is actually stamping those ticks at, you could even just use DateTime.Now and just attach grab your current PC clock time as the tick comes in and use that as the tick's timestamp.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    582 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    338 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X