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 algospoke, Yesterday, 06:40 PM
              2 responses
              19 views
              0 likes
              Last Post algospoke  
              Started by ghoul, Today, 06:02 PM
              3 responses
              14 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              45 views
              0 likes
              Last Post jeronymite  
              Started by Barry Milan, Yesterday, 10:35 PM
              7 responses
              21 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AttiM, 02-14-2024, 05:20 PM
              10 responses
              181 views
              0 likes
              Last Post jeronymite  
              Working...
              X