• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 digibob, Today, 10:01 PM
            0 responses
            1 view
            0 likes
            Last Post digibob
            by digibob
             
            Started by ptertich, Today, 09:59 PM
            0 responses
            1 view
            0 likes
            Last Post ptertich  
            Started by sledge, Today, 06:11 PM
            1 response
            8 views
            0 likes
            Last Post sledge
            by sledge
             
            Started by Bionian, Today, 02:46 PM
            2 responses
            9 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by rwilliam, Today, 01:54 PM
            1 response
            19 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X