Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Region between two values

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

    Draw Region between two values

    Hey guys,

    I am trying to use the draw,region function to highlight the area between 1 and 0.8 in my indicator panel but I face two errors. I looked these codes up but could not solve the issue. Can someone explain to me how to use the draw.region function properly ? Below you can find the part of the code which should include the statements. Many thanks in advance !

    if (L0[0] >= L1[0])
    cu = L0[0] - L1[0];
    else
    cd = L1[0] - L0[0];

    if (L1[0] >= L2[0])
    cu += L1[0] - L2[0];
    else
    cd += L2[0] - L1[0];

    if (L2[0] >= L3[0])
    cu += L2[0] - L3[0];
    else
    cd += L3[0] - L2[0];
    if (cu + cd != 0){
    LRSI[0] = (cu / (cu + cd));

    (Draw region should be included here)

    #2
    Hello muratb35, thanks for your post.

    All of the Draw.Region method overloads can be seen on the documentation page here:
    https://ninjatrader.com/support/help...t8/?region.htm

    Here are also some publicly available indicators that use Draw.Region:
    https://ninjatraderecosystem.com/use...load/repeater/
    https://ninjatraderecosystem.com/use...color-regions/
    https://ninjatraderecosystem.com/use...el-with-color/

    Please let me know if I can assist any further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    576 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 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