Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 11:49:28 +0000



Post From: Deleting all user drawn text drawings upon removing study

[2015-12-02 19:33:49]
KhaosTrader - Posts: 128
Hi,

I have a study that writes a lot of text drawings that need to be dynamically modified (which is why they are user drawings)... However, when I remove the study, I get remaining text drawings all over the place. I wrote this code , hoping it would delete them.. please advise on how I can make this work.

SC_TOOL_UniqueID is a persistent integer variable, that holds all the drawing IDs

  if (sc.Index == 0 || sc.LastCallToFunction)
  
  {
  
    for (int i = 0; i <= SC_TOOL_UniqueID; i++)
    
    sc.DeleteUserDrawnACSDrawing(sc.ChartNumber, i);

  }