fxDreema

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

    Close positions at end of the day

    Questions & Answers
    5
    10
    646
    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.
    • P
      pharmlatex last edited by

      Hi,

      I would like to know how to close positions at the end of the day. The EA is designed to open orders at NY time and close all positions before the rollover time (between 00:00 and 01:00). However, I can’t find a way to specify this. Could you please help me?

      Best regards,

      https://fxdreema.com/shared/SrSVjaled

      l'andorrà 1 Reply Last reply Reply Quote 0
      • B
        biztet last edited by

        Hi. Just use Once a day block, and put the closing time when to close, connect with Close trades block. That's all.

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

          @pharmlatex Your logic is correct. You just need to remove the 'if trade' block and then use hour and minute details and not using seconds as you are doing now. I mean you need to use 23:00 instead of 23:00:00. Then it will work.

          (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 last edited by

            23:00:00 will work the same I use it all the time it is in the valid examples list (although with a date):
            image.png
            I would guess it is the ATR value, but maybe not remove blocks and test until you find the block that's causing the problem.

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

              Hi,

              I appreciate all the advice. I have tried changing the "time filter" and "once a day" settings many times, but I still cannot solve the problem. The attached link contains the minimal structure of the EA. It opens positions and closes positions based on Indicators, but some positions are being closed the next day. I want to open and close positions within a day. Could you help me again?

              Thank you!

              https://fxdreema.com/shared/kBsKp3w8e

              l'andorrà 1 Reply Last reply Reply Quote 0
              • jstap
                jstap last edited by jstap

                Do these times coincide with your broker market open/close times?

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

                  @pharmlatex do you want to close when in profit, or just close all?

                  1 Reply Last reply Reply Quote 0
                  • P
                    pharmlatex last edited by

                    Hi,

                    Thank you for your reply. I try to close all positions within a day. I'm currently testing the EA using the MT4 strategy tester, and I believe the broker's GMT offset is not an issue.

                    Best regards,

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

                      @pharmlatex That should definitely close all your open trades within that time period. If it is not working is because a) other parts of the bot are conflicting it, or b) you are using incompatible time periods on your constants. Otherwise it should work.

                      (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 1
                      • S
                        sktsec last edited by

                        Did you confirm your input time variable is the string data type ?

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

                        Online Users

                        E
                        C
                        M
                        O
                        H

                        9
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors