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 Rapine Heihei, Today, 08:19 PM
|
1 response
6 views
0 likes
|
Last Post Today, 08:30 PM | ||
Started by Rapine Heihei, Today, 08:25 PM
|
0 responses
5 views
0 likes
|
Last Post Today, 08:25 PM | ||
Started by f.saeidi, Today, 08:01 PM
|
1 response
4 views
0 likes
|
Last Post Today, 08:17 PM | ||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, Today, 07:51 PM
|
0 responses
6 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by frslvr, 04-11-2024, 07:26 AM
|
5 responses
97 views
1 like
|
Last Post
by caryc123
Today, 07:47 PM
|
Comment