Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

When Live CalculateOnCloseBar=False what holds current ticks

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

    When Live CalculateOnCloseBar=False what holds current ticks

    Hi, I'm not live yet, so I can't test this out for myself. I assume that when
    CaclulateOnbarClose=False and Historical=False
    The incoming ticks will populate the Bar with the Index of 0 ie. Open[0],High[0],Low[0],Close[0], where Close will alway be the last tick incoming tick.

    is this correct, or do you store this Work-in-progress data somewhere else?

    if it is stored here, then I can't get my head around how I can have a smooth transition from Historical to live. for example in historical mode, if I want to buy at the currentbar high + 1 tick, I can say High[0]+1 ticksize, but that will have a much different meaning with incoming ticks where High[0]+1 ticksize will be 1 tick above the next bars open instead of 1 tick above the last bars high.

    Please point me in the right direction.

    Thanks.
    W2

    #2
    Hello,

    Yes with COBC=False Close[0] will always be the last tick of the current bar. Wheras Close[1] will be the last tick of the last bar.

    Close[0] will constantly update until the bar is finished. Close[1] will always remain the same as OnBarUpdate() also runs live on every tick recieved. Wheras Historical only runs once, as historical data will always run in COBC=True mode. Then when you switch to live it will go to COBC=False.

    Hopefully this clears this up for you.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    60 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    145 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    283 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X