Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Make Chart Background Flash

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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:
    1. Additional Data Series
    2. Drawing Object
    3. OnRender() override
    4. Variable to control how long the flash should last
    5. 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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X