FirstBarIndexPainted = chartControl.LastSlotPainted - chartControl.SlotsPainted
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
FirstBarIndexPainted LastBarIndexPainted equivalent
Collapse
X
-
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:Tags: None
-
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
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
669 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
378 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
111 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
575 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
580 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment