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:	129
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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    153 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    305 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    244 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    176 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X