• 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 canuck, Yesterday, 07:52 PM
      0 responses
      2 views
      0 likes
      Last Post canuck
      by canuck
       
      Started by itrader46, 10-21-2019, 11:12 PM
      2 responses
      17 views
      0 likes
      Last Post koganam
      by koganam
       
      Started by walter739, Yesterday, 06:04 PM
      0 responses
      3 views
      0 likes
      Last Post walter739  
      Started by MarkWise, Yesterday, 03:04 PM
      2 responses
      8 views
      0 likes
      Last Post MarkWise  
      Started by maltese, Yesterday, 02:38 PM
      2 responses
      11 views
      0 likes
      Last Post maltese
      by maltese
       
      Working...
      X