As requested, I have added the following fields:
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)
- 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 possiblenby 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.
|File Size||9.4 KB|
|# of Downloads||814|
Importing to NinjaTrader 8 is Easy!
To import your 3rd party app or add-on to NinjaTrader, simply follow these 3 steps:
- Download the app or add-on file to your desktop
- From the NinjaTrader Control Center window, select the menu Tools > Import > NinjaScript Add-On…
- Select the downloaded file from your desktop
Visit the NinjaScript File Sharing discussion in the NinjaTrader user forum to interact with fellow traders and the NinjaTrader support team.