Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawRegion Problem

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

    DrawRegion Problem

    Hi there - I'm trying to shade the area between two dataseries...As a test, I'm shading the area between the prior day's high & low. The first example works fine, but the second example has an issue. Any help would be greatly appreciated.

    Example 1:
    Code:
    DrawRegion("Test1", CurrentBar, 0, PriorDayOHLC().PriorHigh, PriorDayOHLC().PriorLow, Color.Empty, Color.Blue, 2);
    Example 2:
    Code:
    zoneHigh.Set(PriorDayOHLC().PriorHigh[0]);
    zoneLow.Set(PriorDayOHLC().PriorLow[0]);
    
    DrawRegion("Test2", CurrentBar, 0, zoneHigh, zoneLow, Color.Empty, Color.Blue, 2);
    Note: zoneHigh and zoneLow are DataSeries inialized in Initialize().

    #2
    un$ane, are there any errors in the logs? Are you able to plot these zones? Your code looks fine, so it should be working. I just tested it out on my computer and everything appears to function correctly.
    Attached Files
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply Austin. Go back further on your chart...Is it shading all the days correctly?

      Comment


        #4
        It does not shade the days independently. The example you provided will set the entire region (from the first bar to last) with just yesterday's high and low. You will have to draw a new region for each day if you'd like each individual day's highs and lows highlighted.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

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