• 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 bc24fl, Today, 10:00 AM
      3 responses
      8 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by TonyParisi, Today, 07:38 AM
      2 responses
      11 views
      0 likes
      Last Post TonyParisi  
      Started by fx.practic, Today, 10:03 AM
      2 responses
      7 views
      0 likes
      Last Post fx.practic  
      Started by traderpards, 12-12-2018, 01:15 PM
      6 responses
      154 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by Cyanez, Today, 08:41 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X