Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time[] series goes back in time

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

    Time[] series goes back in time

    Hi,

    I was working on this strategy that uses two dataseries (ES 1-range and ES 2-renko) and while debugging I discovered that the OnBarUpdate() method gets called with Time[] going backward on multiple occasions

    If I add this snippet in my OnBarUpdate() :

    if (lastTime != null && DateTime.Compare(Times[1][0], lastTime)<0) {
    Print("Time bug??");
    }
    lastTime = Times[1][0];


    I am seeing multiple times in the output that the test evaluates to "true", is this a bug? or am I missing something here.
    I was under the impression that the feed of data should always move forward in time?

    Thank you

    #2
    Hello joostb,

    Thank you for your post.

    Renko bars redraw their open in real time, so it's expected to see ticks with different timestamps much like these below:

    Tick for Bar 487413 at 11/6/2020 7:29:52 AM
    Tick for Bar 487412 at 11/6/2020 7:29:51 AM

    This is expected when using Renko bars on real time data.

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X