Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

FirstBarIndexPainted LastBarIndexPainted equivalent

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

    FirstBarIndexPainted LastBarIndexPainted equivalent

    In NT7 FirstBarIndexPainted and LastBarIndexPainted were the index of the bar series on the chart. I wanted to verify that this has been updated to :

    Code:
    FirstBarIndexPainted = chartControl.LastSlotPainted - chartControl.SlotsPainted

    #2
    Hello habibalex,

    Thanks for your post.

    For most purposes ChartBars.ToIndex and ChartBars.FromIndex should return what you need.

    http://ninjatrader.com/support/helpG..._fromindex.htm

    http://ninjatrader.com/support/helpG...rs_toindex.htm

    The difference is, chartControl.LastSlotPainted does not look for the last actual bar with information on the chart. This looks for the last slot on the chart, whether or not there is a bar there. This is so that if you have a drawing tool or an indicator and you want to be able to scroll the chart into the blank space after the chart and still be able to calculate using indexes.

    The ChartBars.ToIndex will return the index of the last actual bar with information on the chart.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Rapine Heihei, Today, 08:19 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Rapine Heihei, Today, 08:25 PM
    0 responses
    5 views
    0 likes
    Last Post Rapine Heihei  
    Started by f.saeidi, Today, 08:01 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Rapine Heihei, Today, 07:51 PM
    0 responses
    6 views
    0 likes
    Last Post Rapine Heihei  
    Started by frslvr, 04-11-2024, 07:26 AM
    5 responses
    97 views
    1 like
    Last Post caryc123  
    Working...
    X