Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BackColor - Cannot resolve symbol 'BackColor'

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

    BackColor - Cannot resolve symbol 'BackColor'

    NT Forum,

    As per the title, I am receiving the programming error: cannot resolve symbol 'BackColor'

    While in NT7, the code was:
    Code:
    BackColor = Color.FromArgb(50, Color.DarkGray);
    From the NT8 helpguide : Entering Calculation Logic, something as simple as "BackColor = Color.PaleGreen" fails to work.

    Any guidance would be appreciated.

    Regards
    Shannon

    #2
    Originally posted by Shansen View Post
    NT Forum,

    As per the title, I am receiving the programming error: cannot resolve symbol 'BackColor'

    While in NT7, the code was:
    Code:
    BackColor = Color.FromArgb(50, Color.DarkGray);
    From the NT8 helpguide : Entering Calculation Logic, something as simple as "BackColor = Color.PaleGreen" fails to work.

    Any guidance would be appreciated.

    Regards
    Shannon
    This works.

    BackBrush = Brushes.PaleGreen;
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    Comment


      #3
      Hello Shansen,

      Thank you for report this.

      Please use BackBrush (BackBrushes, BackBrushesAll).

      http://ninjatrader.com/support/helpG.../backbrush.htm

      I have alerted the project manager to update the language in the help guide to reflect this.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        RJay & NinjaTrader_ChelseaB,

        Thanks for your responses.
        I went with :
        1. Introduce variable
        Code:
        private Brush opaqueDarkGrey;
        2. Configure variable
        Code:
        ...if (State == State.Configure)
        {
          opaqueDarkGrey = new SolidColorBrush(Colors.DarkGray) {Opacity = 0.2};
        }
        3. Use variable
        Code:
        BackBrush = _opaqueDarkGrey;
        Thanks again
        Shannon

        Comment


          #5
          Hello Shannon,

          Be sure to use .Freeze() on your brush to prevent any threading issues.

          After the brush is defined call myBrush.Freeze() where myBrush is the name of the variable holding the brush object.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            NinjaTrader_ChelseaB,

            You are correct. At the point of configuration, the brush must be frozen.
            Code:
            ...if (State == State.Configure)
            {
              opaqueDarkGrey = new SolidColorBrush(Colors.DarkGray) {Opacity = 0.2};
              opaqueDarkGrey.Freeze();
            }
            Thanks again
            Shannon

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cre8able, Today, 01:16 PM
            2 responses
            9 views
            0 likes
            Last Post cre8able  
            Started by chbruno, 04-24-2024, 04:10 PM
            3 responses
            48 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by samish18, Today, 01:01 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by WHICKED, Today, 12:56 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by WHICKED, Today, 12:45 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X