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!
See more
See less

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.
    JesseNinjaTrader Customer Service

    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 Stanfillirenfro, Today, 07:23 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      2 responses
      21 views
      0 likes
      Last Post cmtjoancolmenero  
      Started by olisav57, Yesterday, 07:39 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by cocoescala, 10-12-2018, 11:02 PM
      7 responses
      944 views
      0 likes
      Last Post Jquiroz1975  
      Started by oviejo, Today, 12:28 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X