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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    50 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    16 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X