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

Transparent background color

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

    Transparent background color

    Hello, I have an indication in ninjatrader 7 that I do not know how to remove the white background color on the banner, if I change it to blue, red or any other color it makes the change but if I make it transparent it continues to appear in white. What I want is a text with black letters but as a background I want it to be the same color as the background of the graphic that I have configured, how can I do it? Not "transparent color"?

    if (banners)
    DrawTextFixed("Banner2", bannerstring, TextPosition.BottomLeft, Color.Black, font, Color.White, Color.White, 10);
    else
    RemoveDrawObject("Banner2");



    #2
    Originally posted by punkiy2111 View Post
    Hello, I have an indication in ninjatrader 7 that I do not know how to remove the white background color on the banner, if I change it to blue, red or any other color it makes the change but if I make it transparent it continues to appear in white. What I want is a text with black letters but as a background I want it to be the same color as the background of the graphic that I have configured, how can I do it? Not "transparent color"?

    if (banners)
    DrawTextFixed("Banner2", bannerstring, TextPosition.BottomLeft, Color.Black, font, Color.White, Color.White, 10);
    else
    RemoveDrawObject("Banner2");

    Try changing your opacity number of 10

    Comment


      #3
      Thankssss You have helped me enormously, have a nice day!

      Comment


        #4
        Hello punkiy2111,

        Did you try using Brushes.Transparent?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello it generates an error, could you tell me how this order would be placed? Thank you

          if (banners)
          DrawTextFixed("Banner2", bannerstring, TextPosition.BottomLeft, Color.Black, font, Color.White, Color.White, 10);
          else
          RemoveDrawObject("Banner2");

          Comment


            #6
            Hello punkiy2111,

            What is the full error message?

            There are no orders being placed with entry or exit methods or SubmitOrderUnmanaged().
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              f (banners)
              DrawTextFixed("Banner2", bannerstring, TextPosition.BottomLeft, Color.Black, font, Color.White, Color.White, 1);
              else
              RemoveDrawObject("Banner2");

              I changed Color.White, 10 for Color.White, 1 and it worked for me, is there another way to make it look transparent? Regards.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Perr0Grande, Today, 08:16 PM
              0 responses
              2 views
              0 likes
              Last Post Perr0Grande  
              Started by elderan, Today, 08:03 PM
              0 responses
              4 views
              0 likes
              Last Post elderan
              by elderan
               
              Started by algospoke, Today, 06:40 PM
              0 responses
              10 views
              0 likes
              Last Post algospoke  
              Started by maybeimnotrader, Today, 05:46 PM
              0 responses
              9 views
              0 likes
              Last Post maybeimnotrader  
              Started by quantismo, Today, 05:13 PM
              0 responses
              7 views
              0 likes
              Last Post quantismo  
              Working...
              X