Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawRegionHighlightY Using Bars

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

    DrawRegionHighlightY Using Bars

    I'm programming a Forex Session Time indicator. I need to highlight the chart background for the current bar depending on the session.

    I am thinking I will use DrawRegionHighlightY for this, but it takes Coordinates and not bar numbers. How can I draw a region highlight from the previous bar to the current bar?

    Also will there be any performance issues with drawing a new RegionHighlight for every bar?

    Thanks!

    Kevin

    #2
    Hello reach4thelasers,

    Thank you for the question.

    I wanted to check, the RegionHighlightY tool is a chart wide tool meaning it is like a Horizontal Line in the sense it should cover the total chart area and not a specific amount of bars, did you instead mean to use the Region tool which can cover a specific number of bars? http://ninjatrader.com/support/helpG...raw_region.htm

    If not, the RegionHighlightY can only take price values, it does not take BarsAgo or Time values as this spans the visible chart area.

    If you wanted to use a tool similar to RegionHighlightY but also use a BarsAgo to limit its width to a segment of the chart, you could use the Region tool or this would require that you duplicate and redevelop the RegionHighlightY drawing tool so that it does not span the entire chart and has a BarsAgo instead.

    I look forward to being of further assistance.

    Comment


      #3
      Hey there Jesse, thanks for the response. I managed to do it without the DrawRegionTool in the end.

      I've attached my Forex Sessions Indicator for anyone who wants it. I've not made it customizable in any way, but if anyone wants to extend it (e.g. to cope with the lighter skins on ninjatrader) feel free. I've used discreet shading based on market liquidity so that its not too much of an eyesore and can be left on the chart permanently.
      Attached Files

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      563 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      329 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
      547 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      548 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X