fxDreema

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

    Capture Current Time In Variable

    Questions & Answers
    4
    7
    998
    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.
    • raveon
      raveon last edited by raveon

      I can easily display the current time in real-time using fxDreema built-in functions which are great.

      However trying to capture the current time, place it into a variable or constant and then use it later as a value in something like Bucket of Closed Positions or even display it is something I have been unable to do.

      I can end up with a value like 1652845765.0 but don't know what to do with that?

      Any help appreciated.

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

        @raveon That value is the seconds after 1970, you can see how to do it here: https://fxdreema.com/shared/kcFzx8a5b

        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
        • raveon
          raveon last edited by

          Thank you very much very helpful. I have copy/pasted the code block you provided and have created some of the variables as "double" types successfully. However, I still get a compilation error when trying to declare some of them.

          TimeToStr
          TimeLocal
          TimeCurrent
          TimeGMT

          I have tried them as double, string, and even tried datetime variable types with no luck. (MT5). Can you help a little furher?

          Thank you again

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

            Shouldn't it be int? Double has decimal place, int are only whole numbers, which is how time is processed afaik

            l'andorrà 1 Reply Last reply Reply Quote 0
            • l'andorrà
              l'andorrà @General Melchett last edited by

              @general-melchett Correct. It should be of an int type.

              (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

              (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

              (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

                @raveon said in Capture Current Time In Variable:
                TimeToStr = int to string
                TimeLocal = string
                TimeCurrent = string
                TimeGMT = string

                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
                • raveon
                  raveon last edited by

                  Thank you all. Very helpful. Will be giving this a shot.

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

                  Online Users

                  M
                  D
                  A
                  M

                  14
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors