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 Hwop38, 05-04-2026, 07:02 PM
            0 responses
            168 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            322 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            246 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            350 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X