fxDreema

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

    Description or constant.

    Questions & Answers
    3
    3
    455
    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.
    • O
      Ontrade last edited by

      I can create the constants correctly for my EA, but some items I don't understand how to create constants so that users can put colors like for example in a line.
      0_1600454502095_constant.PNG

      But in EA it is displayed like this:
      0_1600454680037_colorconstant.PNG

      I would like to give it a name, for example, "Select the color of the thread".

      How can I change this?

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

        You can insert constants to drop-down menus just like plain fields, by right-clicking:
        0_1600455401295_3494ce39-259e-441f-ad18-497e78637169-image.png
        However, the drop-downs are usually some specific data type, so you have to do some googling
        https://www.google.com/search?q=mql4+color+datatype&oq=mql4+color+datatype&aqs=chrome..69i57j33l3.9319j0j7&sourceid=chrome&ie=UTF-8
        ->
        https://docs.mql4.com/basis/types/integer/color
        ->
        https://docs.mql4.com/constants/objectconstants/webcolors
        ->
        The datatype is integer, and the colors have their own codes, clrRed for example.
        0_1600455542786_7a6d2b4c-c43b-4a17-aafe-1478156b28ea-image.png

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        1 Reply Last reply Reply Quote 0
        • O
          oliverhinrichs last edited by

          The way you have made it will only give you the possebility to change the color of your specific object an this option would be added automatic In your settings without the possibility to move this setting in the order or to assign it to other objects.
          If you want to manage your settings by order or want to adress your setting to multiple Objekts you need to define your own constant but here is also a problem. You cann only define a datatype int to use color. If you define as exable ClrRed it will be interpreted als a Number 255. In your Settings you will only see this number und you can only change this number with an other number to define an other color.

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

          Online Users

          A
          N
          S
          E
          A
          M
          T
          M
          A

          25
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors