fxDreema

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

    Only open new trade if last trade is closed x minutes before

    Questions & Answers
    3
    4
    1364
    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.
    • E
      EAbaer last edited by

      Hello!

      I have an EA like this:

      Indicator XY = Y --> No trade --> Buy now

      I would like to only open a trade if the last trade was closed 10 or more minutes ago.

      How can i do this?

      Thank you very much.

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

        This is easy using a variable.

        For instance, a variable called minutes

        • on every minute, modify minutes to minutes + 1
        • OnTrade -> position closed -> modify minutes to 0
        • now you can check from the variable minutes how many minutes have passed since last close

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

          Thank you.

          Is there any other possibility, for example „check last trades“?

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

            I will suggest this combination of blocks:
            0_1530213992097_44076f93-fc2b-4ee6-bb57-c5ac6dd73cc0-image.png

            The first block loads the last closed trade. Then "check age" checks the close time of that trade. And then after "check age" you do whatever you want.

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

            Online Users

            E
            A
            G
            Q
            C
            T

            20
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors