Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText Example

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

    DrawText Example

    Hello

    I'm playing with the DrawText command and I read the available material about it on the support section of the site, but I'm looking for an actual example (with real values) for ALL of its parameters, ie:

    DrawText(string tag, bool autoScale, string text, DateTime time, double y, int yPixelOffset, Color textColor, Font font, StringAlignment alignment, Color outlineColor, Color areaColor, int areaOpacity)

    Thanks a lot.
    Last edited by laocoon; 03-01-2012, 02:02 AM.

    #2
    laocoon, consider for example -

    DrawText("tag", true, "An Example for DrawText", 0, 1360, 0, Color.Blue, new Font("Arial", 10), StringAlignment.Center, Color.Aquamarine, Color.LightGray, 5);

    If you don't know what to enter as parameters into the overloads available for a method, let Intellisense by your guide -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      DrawText("tag", true, "An Example for DrawText", 0, 1360, 0, Color.Blue, new Font("Arial", 10), StringAlignment.Center, Color.Aquamarine, Color.LightGray, 5);
      it would be really helpfull if this example was also included in the NT7 help file.
      Curently the only example listed is of the "simple" syntax version of drawtext.

      Actually I would suggest to provide a code example for each of the listed Syntax versions listed on top of the page.
      This would also apply for all of the available commands in the language reference of the NT7 help file.


      Marco

      Comment


        #4
        Originally posted by marcow View Post
        it would be really helpfull if this example was also included in the NT7 help file.
        Curently the only example listed is of the "simple" syntax version of drawtext.

        Actually I would suggest to provide a code example for each of the listed Syntax versions listed on top of the page.
        This would also apply for all of the available commands in the language reference of the NT7 help f
        Marco

        I guess this would help non programmer..

        It would make it easier than having to look up and understand parameters in use...

        And even though i am a programmer, having a cut and paste for something like a font or color or whatever would make life easier to all!

        Comment


          #5
          Thanks for the feedback guys, I've added to our list of suggestions to enhance this area.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            This example works. Thank you.

            I tried to change the "double y" by Close[0] and works too.

            DrawText("tag", true, "An Example for DrawText", 0, Close[0], 0, Color.Blue, new Font("Arial", 10), StringAlignment.Center, Color.Aquamarine, Color.LightGray, 5);


            But doesnt work if I try with Close[0]+30 as a double y.

            How could I set Close[0]+30 for the y parameter?

            Thanks

            Comment


              #7
              Excuse me. I found the solution:

              Close[0] + 30 *TickSize

              Thanks

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by funk10101, Today, 09:43 PM
              0 responses
              6 views
              0 likes
              Last Post funk10101  
              Started by pkefal, 04-11-2024, 07:39 AM
              11 responses
              37 views
              0 likes
              Last Post jeronymite  
              Started by bill2023, Yesterday, 08:51 AM
              8 responses
              44 views
              0 likes
              Last Post bill2023  
              Started by yertle, Today, 08:38 AM
              6 responses
              26 views
              0 likes
              Last Post ryjoga
              by ryjoga
               
              Started by algospoke, Yesterday, 06:40 PM
              2 responses
              24 views
              0 likes
              Last Post algospoke  
              Working...
              X