Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Connection time (NOW) for Delayed Datafeed (BarTimer doesnt work)

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

    Connection time (NOW) for Delayed Datafeed (BarTimer doesnt work)

    In BarTimer if you do (i.e. ES 12-20, 1 min chart, Kinetick datafeed):


    HTML Code:
    Print(Bars.GetTime(Bars.Count - 1) + "  >>>>>  "+ Now);
    it outputs like:

    HTML Code:
    ...
    ... 4:34:00 PM >>>>> ... 4:43:14 PM
    ​​​​​​​... 4:34:00 PM >>>>> ... 4:43:15 PM
    ...
    So, I assume that's because the live datafeed is delayed. So, the property "Now" is never able to work well with delayed live datafeed. So, what is remedy in such cases? Is there any parameter that tells how many minutes is the datafeed delayes, so we manually added that to ".GetTime(lastbar):, so we could make BarTimer to work on delayed (live) datafeed charts?
    ​​​​​​​

    #2
    Hello ttodua,

    Thank you for your post.

    Contact your data provider or broker to inquire if data is delayed for specific instruments with your real-time data subscription.

    NinjaTrader does not have a supported property or method to detect if data delayed internally.

    The time returned by Bars.GetTime() andTime[0] is the close time of the bar. This will show the chart shows as the close time of the bar in the DataBox window.
    The current PC time can be found with Core.Globals.Now(). The current time will be less than the close time of the bar on time-based series.
    The Bars.Count is constantly adjusted and is not equal to CurrentBar. Use either Time[0], or Bars.GetTime(CurrentBar) to the time of the currently updating bar.

    Please let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    82 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    43 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    56 views
    0 likes
    Last Post CarlTrading  
    Working...
    X