Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to increment string?

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

    How to increment string?

    I am trying to draw multiple vertical lines on a chart using DrawVerticalLine. This requires providing a string tag which must be unique each time used. I can't figure out how to increment a string.

    I've tried this:

    In the variable section:

    int TagNbr = 1;

    In the code:

    string myTag = string "myTag" + TagNgr.ToString;
    TagNbr = TagNbr +1;

    The error says I can't use the + operator in this context.

    I'm sure this is awkward and there must be a better way.

    #2
    string myTag = "myTag" + TagNgr.ToString();
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Leeroy_Jenkins, Today, 03:00 AM
    0 responses
    4 views
    0 likes
    Last Post Leeroy_Jenkins  
    Started by Prasanna, Today, 02:53 AM
    0 responses
    2 views
    0 likes
    Last Post Prasanna  
    Started by PeterInBrisbane, Today, 01:07 AM
    0 responses
    10 views
    0 likes
    Last Post PeterInBrisbane  
    Started by fdalgoi, Today, 12:44 AM
    0 responses
    6 views
    0 likes
    Last Post fdalgoi
    by fdalgoi
     
    Started by thomaswilleford, Today, 12:07 AM
    0 responses
    3 views
    0 likes
    Last Post thomaswilleford  
    Working...
    X