Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

number to string

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

    number to string

    I am trying to convert the result of an indicator to a string to print on the chart.

    double myindicatorvalue = Close[0] + High[1];

    I want to insert it into this:

    graphics.DrawString("myindicatorstring", headerFont, headerTitleBrush, 10, yOffset + 120);

    so how do I turn myindicatorvalue into myindicatorstring?

    my indicator is a plot and i tried something like this

    graphics.DrawString(plot.myplot, headerFont, headerTitleBrush, 10, yOffset + 120);

    but NT did not like that. Is there a way to use my plot name?

    Thanks
    Last edited by velocity; 11-28-2009, 09:12 AM.

    #2
    myindicator.ToString()

    or

    myindicator.ToString("###.###") with a format

    Comment


      #3
      I don't quite follow what you are saying.

      myindicatorstring = myindicatorvalue.ToString();

      I tried the above but I don't know if that is what you were referring to.

      Comment


        #4
        Yes, that's correct. The ToString method returns a string version of your double value.

        Comment


          #5
          I got it. Thanks for the help.
          Last edited by velocity; 11-28-2009, 11:08 AM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          579 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
          554 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