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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    54 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    72 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    38 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    99 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X