fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    change the color of a block using

    Questions & Answers
    3
    6
    1880
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      FenixTrading @uchiha last edited by

      @uchiha can you share the solution with custom block?
      Thanks

      1 Reply Last reply Reply Quote 0
      • U
        uchiha last edited by

        Hello

        I have a "color" variable, I want to change the color of my rectangle box based on certain conditions, I noticed there's no options in the "value" part of the conditions block.

        Is there a work around or some custom code I can use.

        Things I have tried

        1. using the Value === Text Option
        2. using the Value === Text (code input) Option

        Both by directly typing the color I want Example: Blue

        1 Reply Last reply Reply Quote 0
        • U
          uchiha last edited by

          Nevermind a simple custom code block and google did the trick đŸ˜„

          F 1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            "color" is an integer data type, the values are integer (whole) numbers. Here all colors are listed: https://docs.mql4.com/constants/objectc ... /webcolors Yes, they appear as text values, but these are all names of predefined constants in MQL4

            1 Reply Last reply Reply Quote 0
            • U
              uchiha last edited by

              Does this mean we can use these types

              0xFFFFFF // White
              16777215 // White
              0x008000 // Green
              32768 // Green

              in the [Value ===> Numerical] field?

              1 Reply Last reply Reply Quote 0
              • fxDreema
                fxDreema last edited by

                I never tried that, but if they wrote those rules here, it's probably possible https://docs.mql4.com/basis/types/integer/color

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post

                Online Users

                I
                G
                M
                M
                J
                T
                S
                T
                M
                O
                R
                E
                P
                B
                G
                J

                27
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors