Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Background Opacity

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

    Background Opacity

    How do I adjust the OPACITY of the Background so that RTH is different from ETH?

    if (ToTime(Time[0]) < ToTime(8, 25, 0))
    {
    BackColor = Color.DarkBlue;

    }

    #2
    Hello,

    There is no NinjaTrader function to do this however you can use this unsupported method to set the color and opacity.

    To set opacity you need to use FromArgb() to set the color.

    Creates a Color structure from the four 8-bit ARGB components (alpha, red, green, and blue) values.


    BarColor = Color.FromArgb(100, 255, 0, 0);

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Does this solution only work for bar color? I don't see any results on my chart with

      BackColor = Color.FromArgb(100, 255, 0, 0);

      Comment


        #4
        mainstream, it seems to work well here in quick test on my end - are you sure the condition to color the background triggers as it's expected to?

        Comment


          #5
          Oops... had an = instead of >.... works great thanks again!


          For other to reference:

          Last edited by mainstream; 04-20-2011, 07:37 AM.

          Comment


            #6
            BackColor = Color.FromArgb(100, Color.DarkBlue);

            This may be easier than using color numbers in most cases.

            Dan
            Last edited by eDanny; 04-20-2011, 07:54 AM.
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            574 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            332 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            553 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X