Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

draw region

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

    draw region

    Good morning sir
    This indicator plots a region when conditions are met
    I do not want it to appear in all regions
    I want it to show only the last 5 regions in the graph
    I hope for help please
    Cordially​


    Click image for larger version

Name:	draw.png
Views:	119
Size:	23.1 KB
ID:	1254779

    #2
    Hello jimmy12,

    If you only wanted to show a certain number of regions you would need to edit the code to either remove previous regions in addition to drawing them or use non unique tag names. If you wanted to remove the previous regions you would need to know the specific tags on those regions so you don't accidently clear the current 5 regions. If you use non unique tag names you could specify 5 tags and then draw a region that has one of those tags. In the future when you use that same tag it would update the previous drawing object so it would be removed from the previous area.

    Both of these changes would require adding additional logic to control how you want the regions to work. Using a List may be the most simple approach, you would add each of the drawn objects to the list and then loop over the list to call RemoveDrawObject() for all but the last 5 elements in the list. https://ninjatrader.com/support/help...moveDrawObject

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    591 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    343 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    556 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    553 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X