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 CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            27 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            20 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            183 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            335 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            260 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X