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

change font for drawtextfixed

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

    change font for drawtextfixed

    Dear friends.
    I use DrawTextFixed, and I want to change font style. I want to change font size and change color. I have read manual, but when I try to use some font data I have troubles.
    Could you provide to me some sample?

    #2
    Hello daglas,
    Thanks for writing in and I am happy to assist you.

    Please use the below overload to change the font size while drawing a DrawTextField

    DrawTextFixed(string tag, string text, TextPosition textPosition, Color textColor, Font font, Color outlineColor, Color areaColor, int areaOpacity)


    Please refer to this sample code which demonstrates how to change the font in the NinjaScript code.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks for help.
      I have try such construction
      DrawTextFixed("prob1","probability for range",x,TextPosition.TopLeft,Color.Green,largeFon t);
      And I have error message - DrawTextFixed can get 5 arguments.

      Comment


        #4
        Hello daglas,
        You have missed to define the outline color, area color and the opacity.

        Please modify your code to
        Code:
        DrawTextFixed("prob1","probability for range",x,TextPosition.TopLeft,Color.Green,largeFont, Color.Blue, Color.Blue, 3);
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          I count 9 parameters.

          this x parameter makes no sense here, or in the original statements.


          Originally posted by NinjaTrader_Joydeep View Post
          Hello daglas,
          You have missed to define the outline color, area color and the opacity.

          Please modify your code to
          Code:
          DrawTextFixed("prob1","probability for range",x,TextPosition.TopLeft,Color.Green,largeFont, Color.Blue, Color.Blue, 3);
          http://www.ninjatrader.com/support/h...wtextfixed.htm

          Comment


            #6
            Originally posted by NinjaTrader_Joydeep View Post
            Hello daglas,
            You have missed to define the outline color, area color and the opacity.

            Please modify your code to
            Code:
            DrawTextFixed("prob1","probability for range",x,TextPosition.TopLeft,Color.Green,largeFont, Color.Blue, Color.Blue, 3);
            http://www.ninjatrader.com/support/h...wtextfixed.htm
            Many thanks, everything works good.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ghoul, Today, 06:02 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            44 views
            0 likes
            Last Post jeronymite  
            Started by Barry Milan, Yesterday, 10:35 PM
            7 responses
            20 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by AttiM, 02-14-2024, 05:20 PM
            10 responses
            179 views
            0 likes
            Last Post jeronymite  
            Started by DanielSanMartin, Yesterday, 02:37 PM
            2 responses
            13 views
            0 likes
            Last Post DanielSanMartin  
            Working...
            X