fxDreema

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

    Using Constants for Timeframe

    Questions & Answers
    3
    7
    35
    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.
    • C
      capitalfreedom last edited by

      is it possible to use constants for Timeframe selection. Right now I am receiving undeclared identifier error

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

        Yes it is but it depends where you mean.

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        1 Reply Last reply Reply Quote 0
        • S
          sktsec last edited by

          The data type is : ENUM_TIMEFRAMES

          Value 0 for current timeframe

          1 Reply Last reply Reply Quote 0
          • C
            capitalfreedom last edited by

            https://fxdreema.com/shared/3u6RFQdic The constant in question is the TStart_TF constant. @sktsec i'm not quite sure how i would enter that data type

            S 1 Reply Last reply Reply Quote 0
            • S
              sktsec @capitalfreedom last edited by

              @capitalfreedom said in Using Constants for Timeframe:

              TStart_TF

              capture_001_09082026_042758.png

              Enter ENUM_TIMEFRAMES at the leftmost entry. Then your constant name

              1 Reply Last reply Reply Quote 0
              • C
                capitalfreedom last edited by

                @sktsec Awesome thanks! Is there a breakdown to know what number is for which timeframe. like 0 being the current etc?

                S 1 Reply Last reply Reply Quote 0
                • S
                  sktsec @capitalfreedom last edited by

                  @capitalfreedom
                  e.g. PERIOD_M5 is 5-minute period.

                  Following link have all the details. As your input will handle it all provided you have selected the favorable timeframe, actually you won't need to worry about that.

                  https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes

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

                  Online Users

                  O
                  R

                  15
                  Online

                  148.2k
                  Users

                  22.4k
                  Topics

                  122.7k
                  Posts

                  Powered by NodeBB Forums | Contributors