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 CarlTrading, 03-31-2026, 09:41 PM
            1 response
            152 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            87 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            131 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            127 views
            1 like
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            106 views
            0 likes
            Last Post CarlTrading  
            Working...
            X