fxDreema

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

    Check Age

    Questions & Answers
    3
    4
    2007
    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.
    • A
      anse33 last edited by anse33

      The block "check age" has the right data format in mq4. But in mq5, there seems to be a problem: When changing the EA's options via Metatrader, for example 5 minutes looks like "5.0" in MT4 and the EA is working properly. But in MT5, the format is "1970.01.01 00:00:05" and the EA does not work.

      https://fxdreema.com/shared/gOc5xZ4nc

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

        Checking age has been tricky for me too..
        In some case I have decided to simply use variables to count the age, like:
        once per bar -> modify variable barcount to barcount +1
        -> reset the variable when trade closes, or any other condition you like. Very flexible solution 🙂

        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

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

          MetaTrader options... I don't see checked checkboxes or constants in this EA...

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

            @roar Good idea, works perfect. Thank you! 🙂

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

            Online Users

            D
            V
            O
            J
            B

            14
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors