Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            596 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            554 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X