fxDreema

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

    Close Positions

    Questions & Answers
    2
    23
    4140
    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.
    • R
      ramimoujaes last edited by

      Greetings,

      Just a quick questions, assumingly a position is opened, how do we close the position when the candle closes. I am not sure how to explain it. But in simple terms, you are opening and closing the position on the same candle. However, the difference is that your are closing the position when the candle closes.

      Shared Project: https://fxdreema.com/shared/eMildxlRb

      Your response is much appreciated

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

        @ramimoujaes That is not possible. MT4 doen not know when the candle is closed until a new candle is open. We human traderr see a closed candle, but MT4 just organizes quotes visually. The only way for an EA to know when a candle is closed is be waiting for the first tick of the next candle.

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

          Greetings @l-andorrà ,

          I see. Well, how about the following:

          Let's assume, the EA opened a position, and I want the EA to close on the next candle's opening price. How do we do that?

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

            @ramimoujaes It depends. Do you want it to be closed the exact candles AFTER it was open or later?

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

              Greetings,

              I am not sure I understand. Why don't you show me both ways.

              My logic is that if it opened a position on the first candle, then close the position on the second candle opening price.

              0_1600429060923_f4b1a780-6931-4182-bc8d-fc17aabe1d50-image.png

              If you notice from the picture above, it opened a selling position on a candle based on the condition, and it took a while for it to close. I do not want that. I want when any position is opened, if it did not take profit, then I want it to close on the next candle's opening price.

              Your response is much appreciated

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

                @ramimoujaes So essentially you need the EA to make some profit at the exact candle the trade opened at. Right? If I understand it correctly, if the trade is in profit, do nothing but if in loss close the trade at the open of the next candle. Correct?

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

                  Greetings @l-andorrà,

                  Well essentially, the ea has a take profit, but if it did not take profit, then just close at the next candle's opening price.

                  I'm going to assume, yes you are correct.

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

                    @ramimoujaes This means you give the EA just on candle to determine if the trade should be closed or open. Right? Are you sure is that the criteria you need to implement?

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

                      Greetings @l-andorrà,

                      Yes I am sure

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

                        @ramimoujaes You will need to create a variable to count bars. Try this:

                        https://fxdreema.com/shared/D8r5CBobd

                        (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.

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

                          Greetings @l-andorrà,

                          FYI, I use mt5 🙂

                          1 Reply Last reply Reply Quote 0
                          • R
                            ramimoujaes last edited by ramimoujaes

                            Kindly explain more, where can I find this on mt5, and how and where do I place it in my project?

                            The shared project is below:

                            https://fxdreema.com/shared/Lv7W7Crzd

                            Where would I place your answers in my project.

                            • A screenshot would be very helpful
                            l'andorrà 1 Reply Last reply Reply Quote 0
                            • R
                              ramimoujaes last edited by

                              Greetings,

                              Please understand that I am not expert. So, you might want to baby-step me through the procedure.

                              I shared my project so that you can see where I am at, and in order for you to visually assist me.

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

                                @ramimoujaes You can use the equivalen blocks for MT5 :). My explanation:

                                a) Blocks 1 and 6 are those supposed to open buys. You need to add a 'Modify Variables' block at the bottom of it to count the number of candles after the one opening the trade.

                                b) All blocks headed by block ID 2 are those counting eavery new candle after the first one. The variable adds +1 every time a new bar is open. Then it is compared to check if there is profit and if so, closeing immediately the trade. If not, a new candle is counted.

                                c) Both blocks on the 'on trade' tab are used to reinitialize the variable every time the trade is closed.

                                d) You need to replicated this same structure for the sells.

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

                                  Greetings @l-andorrà,

                                  Thank you for your response. I would like you to have a look and help me fix the following errors.

                                  0_1600534690534_884f8d39-d22f-4dd6-a218-70a884cdc5db-image.png

                                  I kindly request from you to help fix these errors, but please tell me the solution in details.

                                  Also, if you can have a look at the entire project, and have a look if I did anything wrong that would be great.

                                  Shared Project: https://fxdreema.com/shared/IIJb4XA0d

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

                                    @ramimoujaes Those errors are not my fault. You need to create 2 variables. You can call them 'counter_buys' and 'counter_sells', for example. Here you will learn how to create them:

                                    https://fxdreema.com/instructions/builder/constants-and-variables

                                    Then you insert 'counter_buys' in block 7 (in the same place where you typed that name) and 'counter_sells' in block 8. Same with blocks 17 and 18 on the 'on trade' tab.

                                    Finally you duplicate the tree structure headed by block 9. That structure is for buys only. Now you need to duplicate it for sells. Obviously you need to modify the content of blocks 10, 11 and 12 for sells. Try it and let me know.

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

                                      Greetings @l-andorrà ,

                                      I read it. And I still do not understand. When you open variable. What do you type in the " type", "name", "value", "description" section. I read the link you provided previously and I am still lost.

                                      As mentioned previously, if you can literally tell me, word for word, step by step what to type in, that would be great.

                                      As mentioned previously, I am not a programmer, and I still have no idea what to type in.

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

                                        @ramimoujaes Both variables should be of a 'double' type. Then you type the name you want (I suggested those but you can choose any one) in the 'Name' box. And finally you type number zero in the 'value' box. You can the position them as explained in the Intructions page I suggested.

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

                                          Greetings @l-andorrà,

                                          Once again, thank you for your cooperation.

                                          Kindly notice the errors found in the image below:

                                          0_1600618317347_866c96c6-84ca-4d0f-af3a-416fdfbc5835-image.png

                                          Below you can find the shared project:

                                          https://fxdreema.com/shared/DtccIOdjc

                                          As you can see, I pretty much did everything you asked for, unless I am mistaken (which I am positive, I did a mistake).

                                          Can you please tell me:

                                          *How to fix the errors?

                                          *Are the block ID's correct?

                                          *If you could please check if I did everything right, and not miss something or type in something by mistake.

                                          Thank you so much for your kindly response

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            ramimoujaes last edited by

                                            Greetings @l-andorrà ,

                                            Apologies for the previous post. I figured it out.

                                            Kindly have a look at the image below:

                                            0_1600619271978_e26c9318-5029-4a1d-9394-ead3cb65563a-image.png

                                            It is suppose to close the position immediately on the next candle opening. But it did not do that.

                                            Below, you can find my shared project:

                                            https://fxdreema.com/shared/j7AF17Qxc

                                            Your kindly earliest response is much appreciated.

                                            l'andorrà 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            Online Users

                                            X
                                            J
                                            A
                                            N
                                            S
                                            E
                                            A

                                            18
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors