Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Difference between TickData and CalculateOnBarClos

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

    Difference between TickData and CalculateOnBarClos

    I want to work with each incoming tick of data volume (price, volume).
    I would like to know which is the difference between adding a new tick dataseries as:

    Add(PeriodType.Tick, 1);

    and then do the script logic inside: if (BarsInProgress==1) then {logic}

    or setting the property:

    CalculateOnBarClose=false;

    and then do the script directly in the OnBarUpdate().

    Do they provide the same kind of data?

    Thank you.
    Last edited by bonnies; 06-15-2017, 07:52 AM.

    #2
    Hello bonnies,

    Adding a 1 tick series would allow the script to load the tick data historically to be used for triggering OnBarUpdate for each tick historically as well as to use for fill prices adding granularity to a larger timeframe historically and this would also work in real-time.


    Using CalculateOnBarClose as false would cause OBarUpdate to trigger for each tick in real-time but does not work historically.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you very much for the explanation.

      If I add the new tick data series at 1 tick for having the data tick historically and then when running in real time I also set the CalculateOnBarClose to false, what does Ninjatrader in this situation: does it has two tick data series overloading the cpu or it only works with one data tick series because both are the same?

      Thank you again for your support.

      Comment


        #4
        Hi bonnies,

        When a bar is closing, OnBarUpdate does not trigger for the tick. So if the primary bar is closing, there isn't a second update for the tick being received.

        Which means, if you were to add a 1 tick series to a script and CalculateOnBarClose is false, OnBarUpdate is only going to trigger once for each tick (secondary bar closing) and once for each primary bar update (a tick being received).

        In other words you would only see two updates each time a tick comes in instead of 3 (or even 4 when when primary bar closes).
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        569 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        548 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X