Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Text Color Is Not Working!!!

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

    Draw Text Color Is Not Working!!!

    Hi,

    For the life of me, I can't figure this out.

    I'm using the following code to try and display blue text on the chart but the text always shows up as Black regardless of what I do.

    Code:
    Draw.Text(this, "myTag"+ CurrentBar, false, counter.ToString(), 0, (Low[0] - atrFactor*.5), 5, Brushes.Blue, textFont, TextAlignment.Center, Brushes.Transparent, null, 0);

    #2
    Hello maltese,

    You have the opacity set to 0. That should be making this object completely invisible and not black....

    What happens if you set the opacity to 100?

    Draw.Text(NinjaScriptBase owner, string tag, bool isAutoScale, string text, int barsAgo, double y, int yPixelOffset, Brush textBrush, SimpleFont font, TextAlignment alignment, Brush outlineBrush, Brush areaBrush, int areaOpacity)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I set the opacity to 100 but the text color still remains black. The color of the text doesn't seem to want to change regardless of what color I specify. I always end up with black font using Draw.Text method.

      Surprisingly, I don't have any problems with Draw.TextFixed...

      Comment


        #4
        Hello maltese,

        I am unable to reproduce this behavior.

        Are you able to reproduce using the attached test script?
        Attached Files
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Yes, I'm still experiencing the problem.
          Attached Files

          Comment


            #6
            Hello maltese,

            I was not able to reproduce this even when using a template named Default.

            I would like to schedule a call with you to take a look during our normal support hours.

            Please send an email to platformsupport [at] ninjatrader [dot] com. In the email, please include a link to this forum thread.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              OK. I will do.

              Comment


                #8
                Hello NT Community,

                I should have paid more attention while testing, the issue indeed was the Default template.

                When not calling a template with Draw.Text this will use the Default template for Text objects if there is one existing.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                605 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                351 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                560 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                561 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X