fxDreema

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

    Setting up variables/constants that have non-numeric values

    Questions & Answers
    2
    2
    473
    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.
    • T
      tonyramirez last edited by

      Some blocks have parameters that show text values e.g. the 'bull candle' node has a 'row mode' parameter that can be set to 'normal', 'candle size increase' and 'candle size decrease'. To assign these values to a variable, do you use an integer variable and assign as 0, 1, 2 etc. following the order in the drop-down menu or do you use a string variable and assign 'normal' etc?

      Thanks

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

        @tonyramirez yes, usually integers do just fine.
        You can also set datatype as some enum type, then you'll get the drop-down menu in mt4/mt5.
        For example, timeframes datatype is ENUM_TIMEFRAMES
        https://docs.mql4.com/constants/chartconstants/enum_timeframes

        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 1
        • 1 / 1
        • First post
          Last post

        Online Users

        R
        P

        7
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors