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 andrewtrades, Today, 04:57 PM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by chbruno, Today, 04:10 PM
          0 responses
          3 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          436 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          6 views
          0 likes
          Last Post FAQtrader  
          Started by rocketman7, Today, 09:41 AM
          5 responses
          19 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X