Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

replay showing incorrect bar time

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

    replay showing incorrect bar time

    i am running a replay and when i put the print out put for following
    Bars.GetTime(0)

    it shows 2016-01-17 5:20:00 PM which is the last bar bar in the chart and not the time of the bar in play. how do i get the correct time of the bar in play

    #2
    Hello junkone,

    Thanks for your post.

    Please see the helpguide on GetBar: http://ninjatrader.com/support/helpG...us/?getbar.htm The definition shows, "Returns the bar index of the 1st bar from oldest to newest that matches the time stamp based on the DateTime parameter passed in. If the time stamp passed in is older than the 1st bar, a bar index of 0 is returned. If the time stamp is newer than the last bar, the last bar index is returned."

    Please use something like:

    Print ("End Time of Bar :"+Time[0]);

    Time[]: http://ninjatrader.com/support/helpG...eries_time.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    144 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    297 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    242 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    339 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    172 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X