Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Drawing Objects w/o removing indicator

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

    Indicator Drawing Objects w/o removing indicator

    I have an indicator that region highlights on my chart. I would like to manually remove some of them after they are drawn but keep the indicator on my chart. How would I do this?

    #2
    Hello habibalex,

    Thank you for your note.

    Drawing objects created by NS can ordinarily be set in the script to be manually removable by setting AllowRemovalOfDrawObjects = true in State == State.SetDefaults within your code. However, this doesn't seem to be the case for Draw.Region even when that's set to true. I'm checking with our development team to see if this is intentional or whether they need to take a closer look at it; however, it seems that Draw.Region drawing objects created by a script currently cannot be removed manually.

    I'll let you know what our development team says.

    Thanks for your patience; I look forward to assisting you further.

    Comment


      #3
      When AllowRemovalOfDrawObjects is true, will that also keep the drawn indicators in their correct states when the script is re-run? Ie: A draw region is placed automatically by NS. I manually move or change the color. Then I reload the NS. I'm expecting the color and new prices to stay there for that object and potentially a new one being created by the script.

      Comment


        #4
        Hello habibalex,

        Thank you for your reply.

        That would not be the case, no. This is because despite that you can modify or delete the object while the script is running, all drawing objects created by a script will be removed when a script is disabled. When you reload the NinjaScript, your modified drawing object would vanish and "reappear" in the original location, as the original was destroyed when the strategy was reloaded.

        That being said, it's not looking like there's currently a way to remove that region entirely without removing the indicator itself from your chart. However, you could set the color for the region to Transparent from the Drawing Objects dialogue (Right Click on chart > Drawing Tools > Drawing Objects) if you just don't want to see it.

        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Is there any other way to emulate placing drawing objects on the chart as if the user has drawn them?

          Comment


            #6
            Hello habibalex,

            Thank you for your reply.

            None that I am aware of, either supported or unsupported. However, I have added a vote for you to a current feature request to allow completely unlocked Drawing Objects to be created by NinjaScript, which would allow you to modify them and keep them on your chart after the script is removed. This request is being tracked under the number SFT-4061.

            As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

            Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

            Please let us know if we may be of further assistance to you.

            Comment


              #7
              Pls add my vote. Thanks.

              Comment


                #8
                Hello Leeroy_Jenkins,

                Thank you for your reply.

                I've added a vote for you to SFT-4061 as well.

                Please let us know if we may be of further assistance to you.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                607 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                353 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                560 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                561 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X