Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tick Data in "Calculate.OnBarClose" & "Calculate.OnEachTick"

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

    Tick Data in "Calculate.OnBarClose" & "Calculate.OnEachTick"

    As the topic name mentioned, what's the difference between applying AddDataSeries(Data.BarsPeriodType.Tick, 1) from Calculate.OnBarClose and use Calculate.OnEachTick instead?

    If I use the tick data from AddDataSeries(Data.BarsPeriodType.Tick, 1) with Calculate.OnBarClose at OnBarUpdate, I will get the same data as if I applied Calculate.OnEachTick ​​, correct?

    Thank you !​

    #2
    Hello Curerious,

    The Calculate setting will cause each series to calculate at that rate. If you were using a 1 minute primary and have a 1 tick secondary that would mean when using OnBarClose the OnBarUpdate is called every 1 minute for the primary and then every 1 tick for the secondary. Calculate would only change the result in realtime when you are using OnEachTick or OnPriceChange, that would let the series calculate at a faster or slower rate, for example the 1 minute could be called as frequently as every tick.

    Comment


      #3
      Got you, thanks Jesse !

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      42 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      25 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      162 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      98 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      157 views
      2 likes
      Last Post CaptainJack  
      Working...
      X