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

Bars processed out of order?

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

    #16
    Hello GKonheiser,

    I understand you were using a thinly traded contract and that certainly would cause the onBarUpdates to be issued irregularly.

    Please keep in mind you are dealing with COBC=true and the Close time of the bar, not that it is being processed at 10 PM. The Day bar only has one time which is the end of the bar.

    Thanks for clarifying your coding. Here is a code snippet using BarsInProgress that would help simplify your coding:

    if(BarsInProgress == 1) Print("Day bars " + Time[0]);

    if(BarsInProgress == 2) Print("Minute bars " + Time[0]);

    Please let me know if I can be of further assistance.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by KonAdams, 05-07-2024, 10:53 PM
    3 responses
    19 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by ttrader23, Yesterday, 09:04 AM
    4 responses
    19 views
    0 likes
    Last Post ttrader23  
    Started by millonperez, Today, 07:01 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by jpeep, 08-16-2020, 08:31 AM
    14 responses
    488 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by realblubb, 04-28-2024, 09:28 AM
    3 responses
    36 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X