Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with Fonts

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

    Help with Fonts

    Does anyone know of an example indicator where the long form of DrawText() is used please? Iv'e not been able to sort out what to use for the Font parameter. I'm sure its not just e.g. 'Times'.

    Thanks
    Dave

    #2
    Hello,

    Here you go:
    DrawText("end","testing",0,High[0],Color.Black);
    DrawText(
    "new",true,"2 testing",0,High[0],100,Color.Black,new Font("Arial",15,FontStyle.Bold),StringAlignment.Center,Color.Aqua ,Color.Blue,1);

    DenNinjaTrader Customer Service

    Comment


      #3
      Thanks Ben.
      Need to get a book on C# I think. Anything you would recommend? Would not need to go right from the begining, but I'm certainly no professional.

      Comment


        #4
        Hi Dave,

        Not sure if we can recommend a book for you. Perhaps someone in the community can help out. Otherwise you might want to Google.

        In addition, these links might help:
        http://www.ninjatrader-support.com/H...tml?Overview18

        and
        http://www.softsteel.co.uk/tutorials.../contents.html
        Vince B.NinjaTrader Customer Service

        Comment


          #5
          Hi Dave,

          I had the same problem and found the SampleChangeFont in the Samples section of the Forum had a solution.

          Relevant Code:

          #region Variables
          private Font largeFont = new Font("Arial", 12); // Large font variable
          private Font smallFont = new Font("Arial", 8); // Small font variable
          #endregion


          DrawText("lowText", true, Low[0].ToString(), 1, Low[0] - 2 * TickSize, Color.Red, smallFont, StringAlignment.Near, Color.Transparent, Color.Transparent, 0);

          Greg

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by sinpeople, Today, 07:20 AM
          1 response
          2 views
          0 likes
          Last Post NT-Roland  
          Started by Frank1000, Today, 03:05 AM
          1 response
          4 views
          0 likes
          Last Post NT-Roland  
          Started by ntdev, Today, 01:14 AM
          4 responses
          16 views
          0 likes
          Last Post ntdev
          by ntdev
           
          Started by ct, Today, 02:22 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by yodaler, Yesterday, 06:12 PM
          4 responses
          13 views
          0 likes
          Last Post NinjaTrader_Jason  
          Working...
          X