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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    68 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    151 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    100 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    288 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X