Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Bars.Count is not absolute when TickReplay is enabled

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

    Bars.Count is not absolute when TickReplay is enabled

    Hello!

    I use Bars.Count to immediately determine how many total bars are loaded on a chart. This works great when TickReplay is not enabled. So on the first call of OnBarUpdate, I know immediately there's 2000 bars on the chart, for example. Then on each call of OnBarUpdate, CurrentBar increments from 1 up to 2000

    However, when TickReplay is enabled, Bars.Count is NOT a total count. When TickReplay is enabled, It does not contain the total number of bars on the chart. Instead, Bars.Count starts at 1, and increases...same as CurrentBar in the prior example.


    So when TickReplay is enabled, how can I find out, immediately, the total number of bars on a chart?

    #2
    Hello,

    Thank you for the post.

    I am currently reviewing this case and will reply back here once I more details on this.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello,

      I just wanted to reply back on this item.

      It looks like this would be expected and there is no way to know ahead of time while using TickReplay what the Count will be. It was suggested to check if you are using TickReplay, and if so disable the logic that currently uses Count.

      The reason is because tick replay runs a true simulation of ticks to build the bars. The bars are NOT known ahead of time.



      I look forward to being of further assistance.
      JesseNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by alifarahani, Today, 09:40 AM
      6 responses
      38 views
      0 likes
      Last Post alifarahani  
      Started by Waxavi, Today, 02:10 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      14 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by Waxavi, Today, 02:00 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by gentlebenthebear, Today, 01:30 AM
      3 responses
      17 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X