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 Blairski, Yesterday, 09:19 AM
          2 responses
          9 views
          0 likes
          Last Post Blairski  
          Started by tonynt, Today, 09:33 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by minotti1, Today, 08:31 AM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Jim  
          Started by SmartArtsStudio, 05-15-2021, 10:46 AM
          1 response
          15 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Airwave, Today, 06:02 AM
          2 responses
          23 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X