Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Data Loaded

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

    Chart Data Loaded

    Hello,

    Is there a way to retrieve the number of days of data being loaded onto a chart programatically? For example, if someone loads 4 days of data, how can my code retrieve the value of 4? I need to perform some operations based on this value.

    Thank you.

    #2
    Hello,

    There is no supported properety in NinjaScript for this but you could try the syntax:

    Bars.BarsData.DaysBack

    This seems to return the primary series DaysToLoad, being that this is unsupported I do not know if there are any issues with using this so I would advise testing thoroughly if you do use this.

    The alternate would be to get bar 0's Time[0] date and subtract that from the currentbar's Time[0] to get a difference.

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

    Comment


      #3
      Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by DeskTroll, Today, 12:09 PM
      3 responses
      23 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Pabulon, 12-02-2024, 03:42 PM
      14 responses
      90 views
      0 likes
      Last Post Pabulon
      by Pabulon
       
      Started by tfa2806trader, Today, 12:04 PM
      10 responses
      25 views
      0 likes
      Last Post tfa2806trader  
      Started by trdninstyle, 11-26-2024, 12:23 PM
      62 responses
      186 views
      0 likes
      Last Post trdninstyle  
      Started by lorien, 08-08-2021, 07:33 AM
      12 responses
      722 views
      0 likes
      Last Post AndyM871  
      Working...
      X