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 CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
26 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
26 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|
||
|
Started by CaptainJack, 03-25-2026, 09:53 PM
|
0 responses
30 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:53 PM
|
||
|
Started by CaptainJack, 03-25-2026, 09:51 PM
|
0 responses
18 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:51 PM
|
||
|
Started by Mindset, 03-23-2026, 11:13 AM
|
0 responses
29 views
0 likes
|
Last Post
by Mindset
03-23-2026, 11:13 AM
|

Comment