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 helpwanted, Today, 03:06 AM
            1 response
            7 views
            0 likes
            Last Post sarafuenonly123  
            Started by Brevo, Today, 01:45 AM
            0 responses
            7 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            5 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            242 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            384 views
            1 like
            Last Post Gavini
            by Gavini
             
            Working...
            X