Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw with Unique Tag names causes error

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

    Draw with Unique Tag names causes error

    Hi,

    [EDIT] I think I see what the problem was; my tags were not in fact unique for everything !!!
    Sorry, but this can be ignored for now !!!

    In a NinjaScript Editor developed Indicator...

    I'm confused about Tag names for Draw.Dot and Draw.Text . Despite my using absolutely unique names for the tags,
    I'm getting these exceptions thrown to the Log file. No tag is ever the same for any Draw... call. All done inside
    OnBarUpdate...

    Is there a restriction on the total number of Tags? or the length of the Tag string? These tags shown are generated by
    simple concatenation of SRisk with this.CurrentBar, and I've also tried just incrementing counters; and the same
    situation arises.

    Only one instance of the indicator is running, OnBarUpdate is set to run only on bar Close... My understanding was
    that we simply had to ensure the "myTag" was a unique string; but there must be something more to it ??

    I am not using the overloads involving isGlobal, although at one point I suspected I might have to do that...

    THE LANGUAGE OF THE ERROR MESSAGE TALKS ABOUT "TYPE" of drawing tool; and I confess to not
    understanding what that means.

    hyper

    Code:
    11/2/2021 12:23:04 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47490' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:23:00 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47488' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:22:58 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47487' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:42 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47449' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:40 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47448' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:36 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47447' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:34 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47446' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:32 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47445' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:30 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47444' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:28 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47443' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:26 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47442' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:24 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47441' is already in use by another active drawing tool of a different type and will be ignored.,
    11/2/2021 12:21:22 PM,Default,Active drawing object tag names must be unique per drawing tool type the tag 'SRisk47440' is already in use by another active drawing tool of a different type and will be ignored.,
    Last edited by Hyper; 11-02-2021, 11:57 AM.

    #2
    Hello Hyper,

    Thank you for your note.

    Are you using "SRisk" + CurrentBar for both Draw.Dot and Draw.Text? The tag can't be the same between those two different types.

    I suspect if you make sure you're using "SRiskDot" + CurrentBar for Draw.Dot tags and "SRiskText" + CurrentBar for the text you won't get those prints. Are you ensuring the tags are also unique between types of drawing objects?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Originally posted by NinjaTrader_Kate View Post
      Hello Hyper,

      Thank you for your note.

      Are you using "SRisk" + CurrentBar for both Draw.Dot and Draw.Text? The tag can't be the same between those two different types.

      I suspect if you make sure you're using "SRiskDot" + CurrentBar for Draw.Dot tags and "SRiskText" + CurrentBar for the text you won't get those prints. Are you ensuring the tags are also unique between types of drawing objects?

      Thanks in advance; I look forward to assisting you further.
      YES, ABSOLUTELY. That's what I discovered; and so sorry about the false alarm; but
      that is more or less the error I made !!! It's all working now that I fixed the tag situation !!!
      THANK YOU.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      331 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
      549 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      549 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X