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 kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
24 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
14 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
20 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
20 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|
||
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
135 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|

Comment