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 FrazMann, Today, 11:21 AM
            0 responses
            3 views
            0 likes
            Last Post FrazMann  
            Started by geddyisodin, Yesterday, 05:20 AM
            8 responses
            52 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            10 responses
            36 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by DayTradingDEMON, Today, 09:28 AM
            4 responses
            24 views
            0 likes
            Last Post DayTradingDEMON  
            Started by George21, Today, 10:07 AM
            1 response
            20 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Working...
            X