Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Removing Text

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

    Removing Text

    I have an indicator that places text below the bar. I have a condition statement that if true it places the word "buy" below the bar. However later in the code if a different condition is true, I want to ERASE the word "buy" and print "major buy" instead. (this indicator is a CalculateOnBarClose false)

    Problem: How do I erase the word "buy". Here is my code for the "buy":

    DrawText(
    "Text11"+ CurrentBar, "buy", 0, Low[0] - 4 * TickSize, Color.Black);

    Here is how I am trying to remove it:

    RemoveDrawObject(
    "Text11");

    Is the text an actual DrawObject?

    Thanks



    Last edited by velocity; 12-21-2009, 07:46 AM.

    #2
    Originally posted by velocity View Post
    DrawText("Text11"+ CurrentBar, "buy", 0, Low[0] - 4 * TickSize, Color.Black);
    Try it:
    DrawText ("Text11", "buy", 0, Low [0] - 4 * TickSize, Color.Black);

    Comment


      #3
      Thanks for the suggestion, but that did not do it.

      Support, Any other Ideas?

      thanks

      Comment


        #4
        Originally posted by velocity View Post
        Thanks for the suggestion, but that did not do it.
        Velocity,

        I think that you are using the (example) "Text11288" object, but the "Text11" object you want to remove.

        Check:

        Print ( "Text11" + CurrentBar);
        Last edited by tamas; 12-21-2009, 08:06 AM.

        Comment


          #5
          I don't think that's the problem.

          Comment


            #6
            velocity,

            That is the problem. Your objects are uniquely named, just use a static name and instead of drawing new objects all the time, it will just modify the preexisting object. Remove the + CurrentBar from your tag name.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

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