Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Button color state

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

    #16
    Doing that still doesn't work, because my problem is that with F5 it should keep the value at that moment and not set it to the standard value of the variable. If there were any status that would preserve the last value and would always remain even if you reloaded?

    Comment


      #17
      Hello anmir55,

      The button itself does not have it's properties reservced.

      You are preserving the values of DisplayCompletedLines and ColorFondoOff correctly.

      However, you are not using these variables when the button is generated in AddButtonToToolbar().
      Are you are not changing the brush that assigned to ColorFondoOff. It's preserved when hitting F5 but the value was never changed.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        Hello ChelseaB

        Any ideas to fix it?

        Comment


          #19
          Hello anmir55,

          In AddButtonToToolbar(), when creating the button, check DisplayCompletedLines is false and set the _button.Background to black.

          If you want ColorFondoOff to hold a different brush value, then assign ColorFondoOff a different brush value.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            Hello anmir55,

            In AddButtonToToolbar(), when creating the button, check DisplayCompletedLines is false and set the _button.Background to black.
            You are doing this check in OnButtonBuyClick(), but you are not doing this in AddButtonToToolbar().

            If you want ColorFondoOff to hold a different brush value, then assign ColorFondoOff a different brush value.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #21
              Thank you for your help

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by AaronKoRn, Today, 09:49 PM
              0 responses
              2 views
              0 likes
              Last Post AaronKoRn  
              Started by carnitron, Today, 08:42 PM
              0 responses
              7 views
              0 likes
              Last Post carnitron  
              Started by strategist007, Today, 07:51 PM
              0 responses
              8 views
              0 likes
              Last Post strategist007  
              Started by StockTrader88, 03-06-2021, 08:58 AM
              44 responses
              3,975 views
              3 likes
              Last Post jhudas88  
              Started by rbeckmann05, Today, 06:48 PM
              0 responses
              9 views
              0 likes
              Last Post rbeckmann05  
              Working...
              X