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 argusthome, Yesterday, 10:06 AM
            0 responses
            17 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            16 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            14 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            9 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            38 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X