Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by volIQ, 03-27-2024, 04:28 PM
|
3 responses
21 views
0 likes
|
Last Post
by RJay
Today, 05:41 AM
|
||
Started by Nickgiaco, 02-26-2024, 10:23 AM
|
2 responses
72 views
0 likes
|
Last Post Today, 05:12 AM | ||
Started by Johndc, Today, 04:39 AM
|
0 responses
4 views
0 likes
|
Last Post
by Johndc
Today, 04:39 AM
|
||
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
9 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 02:00 AM |
Comment