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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    67 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    36 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    60 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X