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 WeyldFalcon, 12-10-2020, 06:48 PM
            14 responses
            1,426 views
            0 likes
            Last Post Handclap0241  
            Started by Barry Milan, Today, 10:35 PM
            0 responses
            2 views
            0 likes
            Last Post Barry Milan  
            Started by DJ888, Yesterday, 06:09 PM
            2 responses
            9 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            40 views
            0 likes
            Last Post jeronymite  
            Started by bill2023, Today, 08:51 AM
            2 responses
            16 views
            0 likes
            Last Post bill2023  
            Working...
            X