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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      63 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      90 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      47 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      105 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      63 views
      0 likes
      Last Post PaulMohn  
      Working...
      X