I'm trying to see if their is an indicator that exists that will count the number of bars on my chart as I grow and shrink the screen.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Number of bars visable on the chart
Collapse
X
-
Number of bars visable on the chart
Hello,
I'm trying to see if their is an indicator that exists that will count the number of bars on my chart as I grow and shrink the screen.Tags: None
-
Hello tom_the_trader,
Thanks for your question.
I am not aware of one on the User App Share and I did not see one when I checked, but you are welcome to have a look for yourself.
This forum is dedicated for developing NinjaScript indicator as opposed to our NinjaScript File Sharing Discussion forum which is dedicated to discussing scripts that are already built.
If you want to build an indicator that does this, you can use SharpDX with custom rendering. You can see our SampleCustomRender example for an example on using SharpDX. Please also be sure to reference the documentation below.
Using SharpDX for custom rendering - https://ninjatrader.com/support/help..._rendering.htm
To get the number of bars visible, you can subtract ChartBars.FromIndex from ChartBars.ToIndex in OnRender.
My colleague Chelsea also has an indicator that draws the symbol name on a chart using SharpDX and that can be referenced as a more simplified text drawing example.
Simple script that adds a background watermark of the instrument symbol (and expiry if a future) to the chart. (Updated July 10th, 2018 ‐ The opacity needed to be casted as a double and divided by 100 to be between 0 and 1) (Update: August 24th, 2021 – Subtracted the ChartPanel.Y so indicator can be […]
The EcoSystem links above are publicly available.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
We look forward to assisting.
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
581 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
338 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment