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 CarlTrading, 03-31-2026, 09:41 PM
            1 response
            152 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            89 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            133 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            127 views
            1 like
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            107 views
            0 likes
            Last Post CarlTrading  
            Working...
            X