• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Determine index of the first bar painted

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

    Determine index of the first bar painted

    I want to find the index of the first bar that is displayed on the chart in order to find X value of the bar.
    I found the API for FirstTimePainted. However I want the index but can't find it in the docs.
    What is the API to get the index of the first displayed bar?

    #2
    have you tried ChartBars.FromIndex ?

    https://ninjatrader.com/support/help...Bars.FromIndex

    Comment


      #3
      Hello afshinmoshrefi,

      Thanks for your post.

      As member gubbar924 advised, you can use ChartBars.FromIndex. The help guide link advised that FromIndex is an int representing the first bar index painted on the chart.

      Here is the link to GetXByBarIndex(): https://ninjatrader.com/support/help...bybarindex.htm
      Paul H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by robforee, Today, 02:01 PM
      0 responses
      7 views
      0 likes
      Last Post robforee  
      Started by VCtrader, Today, 01:57 PM
      0 responses
      5 views
      0 likes
      Last Post VCtrader  
      Started by sdauteuil, Today, 12:16 PM
      0 responses
      4 views
      0 likes
      Last Post sdauteuil  
      Started by asmmbillah, Today, 12:06 PM
      0 responses
      8 views
      0 likes
      Last Post asmmbillah  
      Started by EminiTrader, Today, 11:05 AM
      0 responses
      11 views
      0 likes
      Last Post EminiTrader  
      Working...
      X