Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Make Chart Background Flash
Collapse
X
-
Make Chart Background Flash
I would like to make the chart background flash whenever a Tick-bar closes, in order to draw my attention to it. Is this possible?Tags: None
-
Hello reach4thelasers,
Yes, this is possible.
One way you can do this would be to use a drawing object that fills the region of the chart and apply it trigger it to change on the close of bar of an additional data series. Since tick bars happen very often, to make the screen 'flash' you will want to change the drawing object to be transparent in within OnRender() when that bar is not closed.
The tools to create this in an indicator would require:
- Additional Data Series
- Drawing Object
- OnRender() override
- Variable to control how long the flash should last
- Counter to control flashes for each new bar/tick
For example, with a 1 tick data series added, you could check for the close of the additional data series to see if a new tick has been made.
Within OnRender(), you could check if the counted tick is greater than the last counted tick. If it is, and the drawing object was not already created for this tick, then you can change the region drawing object to a visible color, if the conditions are not true you can set the region drawing object to be an invisible color.
You may also wish to use the properties within ChartControl to draw the region over the entire visible range of the chart.
Documentation on the tools required to create this indicator can be found here:
Draw.RegionHighlightX() - https://ninjatrader.com/support/help...highlightx.htm
OnRender() - https://ninjatrader.com/support/help...e_onrender.htm
MultiTime Frame and Instruments - https://ninjatrader.com/support/help...nstruments.htm
ChartControl - https://ninjatrader.com/support/help...artcontrol.htm
Please let me know if you have any additional questions.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
43 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
26 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|
||
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
163 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
98 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
158 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|

Comment