Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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:


        and
        Discover CISIN, a top-rated software company specializing in developing IT services and solutions. Trust us for expert software development and cutting-edge technology.
        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
          The Trading Mantis
          NinjaTrader Ecosystem Vendor - The Trading Mantis

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by aprilfool, 12-03-2022, 03:01 PM
          2 responses
          326 views
          0 likes
          Last Post BottomShark77  
          Started by AnnBarnes, Today, 12:17 PM
          1 response
          2 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by Lopat, 03-05-2023, 01:19 PM
          4 responses
          167 views
          0 likes
          Last Post Sam2515
          by Sam2515
           
          Started by f.saeidi, Today, 12:14 PM
          0 responses
          3 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by giulyko00, Today, 12:03 PM
          0 responses
          4 views
          0 likes
          Last Post giulyko00  
          Working...
          X