Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Text Info Being Removed OnBarUpdate

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

    Draw.Text Info Being Removed OnBarUpdate

    I am drawing text (double value) above the previous bar. The text gets removed when a new bar is created OnBarUpdate and I want the text to remain. This is something that I have fixed in the past by putting in a counter. That fix is not working this time. Do you have any suggestions?
    Thanks
    Les P

    Draw.Text(this, "tag10"+countGrn, false, " "+CBoxDelta[1] , 1, High[0] + 2*TickSize, -2, PlotBrushes[0][0], myFont , System.Windows.TextAlignment.Center, Brushes.Transparent, null, 1);

    #2
    Hello lesterboles,

    Thanks for your post.

    There can only be one draw object per tag name on the chart, when you reuse the tag name the function is to remove the previous version and replace it with the latest version of the draw object. This is the design of the system.

    You can keep all your objects on the chart by assigning a unique tag name which is what you are doing with your counter.

    I would suggest using a Print statement prior to the draw statement to ensure that the counter is actually counting. Print (Time[0]+" Counter value = "+countGrn);

    An alternate way to create unique tag names, on a once per bar basis, is to use +CurrentBar, IE: "tag10"+CurrentBar.

    Comment


      #3
      Thanks Paul_H, will give it a shot.

      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