NEW DOWNLOAD LINK: https://ninjatraderecosystem.com/use...nload/barinfo/
OLD Download/rate here: https://ninjatrader.com/support/foru...atid=7&lpage=1
I've written this script to be able to quickly see basic chart/bar info
without having to use the Data Box or clicking the middle mouse button/wheel.
Some basic functionality include:
- The option to select which fields you'd like to see/hide.
- Bar Time/Date
- Open/High/Low/Close values
- Ticks per bar (for historical values, you will need to enable Tick Replay)
- Volume per bar
- Volume per Tick average per bar (for historical values, you will need to enable Tick Replay)
- Bid
- Ask
- Spread
- The options to change the font, font size, and text colors.
- When the "Visible" property checkbox in the "Indicators" window is unchecked,
even though this indicator is not rendered like a typical indicator,
unchecking will still allow this indicator to be hidden from view.
---
Aside from the basics, I've tried to make this script as resource friendly as possible
by using the following:
Rather than updating values directly within OnMouseMove(),
I've used a Timer to regularly trigger the UpdateValues() method
which then processes the updates for values, colors, etc.
This way, we can include the following two options to disable/enable the Timer/updates as needed:
First, disable the Timer if the mouse is no longer over the ChartControl.
The Timer is re-enabled when the mouse re-enters the ChartControl.
Second, disable the Timer if the chart window is deactivated (loses focus).
The Timer is re-enabled when the chart window is activated again.
You can use any combination of the two options.
If both options are enabled, the Timer will remain disabled if the chart window
is reactivated while the mouse still remains out of the ChartControl.
(For example, you click on the upper menu area, or the blank area at the bottom of the window)
---
You can manually change the speed/freqency at which this script updates values.
---
If you have "Use Last Visible Bar" checked and the last visible bar is not the absolute last bar on the chart
the Timer will automatically be disabled for historical bars as they do not update values.
It will automatically be re-enabled when needed.
If you have "Use Last Visible Bar" unchecked or the last visible bar is the absolute last bar on the chart while checked,
the script automatically checks to see if any new updates have been made in the last 30 seconds,
if no new updates made in that time, the Timer will automatically shut off.
Again, it will automatically be re-enabled when needed.
---
If you hold the mouse over the same candle, the Timer will shut off under the following conditions:
- If you have "Use Last Visible Bar" checked
- If the last visible bar is not the absolute last bar on the chart,
holding the mouse over the same candle will disable the Timer until the mouse is moved again.
- If the last visible bar is the absolute last bar on the chart,
holding the mouse over the same candle will disable the Timer until there is an update in market data.
- If you have "Use Last Visible Bar" unchecked
- Holding the mouse over the same candle will disable the Timer until there is an update in market data.
---
"Thank you" to Chelsea Bell of the NT support team for his "ChartCustomToolBarExample" script.
(https://ninjatrader.com/support/foru...d.php?p=499327)
A good portion of code for this indicator was taken from Chelsea's script and modified as needed.
Image 001 - "Use Last Visible Bar" is checked, middle mouse button is clicked just to show that indicator values match.
Image 002 - Font and font size has been changed, text wrapping changed to no wrap
Image 003 - "Use Last Visible Bar" is now unchecked, indicator data correctly shows the last available candle's data (which would be friday 4 pm cst) even though the last visible bar is still the 7 am bar, also some of the value options have been unchecked, font and font size changed again, this time text wrapping changed to WrapWithOverflow
Comment