Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by nandhumca, Today, 03:41 PM
    0 responses
    1 view
    0 likes
    Last Post nandhumca  
    Started by The_Sec, Today, 03:37 PM
    0 responses
    3 views
    0 likes
    Last Post The_Sec
    by The_Sec
     
    Started by GwFutures1988, Today, 02:48 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by ScottWalsh, 04-16-2024, 04:29 PM
    6 responses
    32 views
    0 likes
    Last Post ScottWalsh  
    Started by frankthearm, Today, 09:08 AM
    10 responses
    36 views
    0 likes
    Last Post frankthearm  
    Working...
    X