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

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.

    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?
        BertrandNinjaTrader Customer Service

        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 lightsun47, Today, 03:51 PM
            0 responses
            5 views
            0 likes
            Last Post lightsun47  
            Started by 00nevest, Today, 02:27 PM
            1 response
            8 views
            0 likes
            Last Post 00nevest  
            Started by futtrader, 04-21-2024, 01:50 AM
            4 responses
            44 views
            0 likes
            Last Post futtrader  
            Started by Option Whisperer, Today, 09:55 AM
            1 response
            13 views
            0 likes
            Last Post bltdavid  
            Started by port119, Today, 02:43 PM
            0 responses
            9 views
            0 likes
            Last Post port119
            by port119
             
            Working...
            X