fxDreema

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

    Modify pending order after condition met once

    Questions & Answers
    2
    33
    5660
    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.
    • D
      Darrow last edited by

      Hi, I would like to seek guidance on how to setup below instruction.

      Flow:

      1. Condition: MA crossover occurs
      2. If condition in step 1 is met, it waits until the next candle to form.
      3. If the next candle closes below previous candle, we place a buy stop order above the high this candle (which just recently close).
      4. If the next candle after this candle closes below again, it will modify the buy stop order to the above of this new candle.
      5. If this modification occurs 3 times, then the trade setup becomes invalid (It won't modify for the forth time). It will look for another trade setup.

      This is my current project (for buy only):
      https://fxdreema.com/shared/PXr8vAete
      It is incomplete because I am stuck on the mainly 2 problems:

      1. I wish to know how to modify a pending order when the next candle formed after a condition is met once.
        Besides that, I am referring to another similar post in fxdreema when making this EA. This is the post:
        http://fxdreema.com/forum/topic/7364/pending-order-adjust/8
        My situation is similar to this post but my condition only need to be met once. In my case, its the MA crossover.
      2. Is there a way to limit the number of modification? In my case, I wish to limit to maximum 3 modification only.

      I am newbie to fxdreema. I am still learning how to workaround it. Would appreciate it if someone can shed some light on my problems. Sorry, my English isn't good, please let me know and i will clarify on anything that is unclear.

      1 Reply Last reply Reply Quote 0
      • D
        Darrow last edited by

        This is the illustration of the strategy:
        0_1600065156331_C4815C57-55F8-4E9D-BC67-0BDB7DEE3A17.bmp
        0_1600065167077_070155FF-1C14-4514-BA55-DC378DE04030.bmp

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

          @darrow The first problem I see is that MA crossing will never be really confirmed until a new candle is created. That means your Buy stop and Stop Loss proces will not be available until an additional candle is closed. Is that what you want?

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

            @l-andorrà Thank you for your reply. I have updated the pic again to add in candle #2,1,0.
            The buy stop and stop loss will be placed on candle #1. Hope this explains the matter.

            0_1600146353734_Pic 3.PNG

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

              @darrow Ok. This is more clear now. So if I understand it corectly you need to modify both buy stop and SL levels every tiem a new candle is complete. Right?

              About limiting how many changes are accepted, you will have to create a counter variable and add plus 1 to it every time a modification is done. I guess you are not using variables often. Rught? 🙂

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

                @l-andorrà Yes, I want it to modify buy stop and SL if candle's high closes below previous candle's high.

                You are right. I am still familiarizing with the logic and how to use Fxdreema. I have found bits and pieces info from other Fxdreema forum posts but couldn't find one related to my topic.
                As a start, to limit the number of changes, do I start building the block in the "on Trade" event, instead of "on Tick"?

                0_1600259658571_Pic 4.PNG

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

                  @darrow No you need to update all that info. This is why you need to do it on the 'on tick tab' with a variabla and a constant. Try this:

                  https://fxdreema.com/shared/48gek73vb

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

                    @l-andorrà Thank you for showing me the way. I can understand how your example works. Just delete those orders that aren't triggered at every start of bar and start a new order after that.

                    This is my updated project:
                    https://fxdreema.com/shared/RPbeu7iec

                    During the testing, I noticed that it didn't modify the order when the candle closed lower than previous candle. I believe the reason is due to MA crossing being dynamic.

                    When the order didn't get triggered and deleted at the start of new candle, the condition for MA crossing at candle ID #2 is not valid anymore. This time, the MA crossing has shifted backward to be candle ID #3.

                    How do I fixate on the MA crossing while the deleting/opening (modifying) new order for at most 3 times? I have found other post in the Fxdreema forum, in this kind of situation, do we use flags?

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

                      @darrow I don't see why it shouldn't work in that situation. Do you have any visual example to share, please?

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

                        @l-andorrà Below is the updated project. I only changed the buy pending order offset to zero for easier visualization.
                        https://fxdreema.com/shared/TyrVeu5ub

                        Example:
                        0_1600425807734_Pic 5.PNG
                        The EA is placing the buy stop order and SL correctly after it detects the MA crossing between candle #2 and 3 as well as a followup pullback candle #1.

                        After 1 candle bar later:
                        0_1600426454964_Pic 6.PNG
                        After 1 candle bar later, the buy stop order did not get triggered and was then removed. The EA should place a new buy stop and SL to the new candle #1. However, the EA did not place any order.

                        I believe this is because the MA crossing condition is not met. After 1 bar later, the MA crossing now occurred between candle #3 & 4 while the EA is tasked to check if there is MA crossing occurring between candle #2 & 3.

                        More info:
                        Currency pair: EURUSD
                        Timeframe: 15 min
                        Time occur: 2020/01/16, between 9 - 9.15AM
                        Below shows that there is no new order after the deletion.
                        0_1600426987918_Pic 7.PNG

                        I hope this helps explaining my obstacle 😃

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

                          @darrow Ok. I see. In that case what you need is to specify that MA5 is above MA 20, and not that crosses above. That way a new pending order will be created as you want.

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

                            @l-andorrà However, what I wanted is MA 5 crossing above MA 20, not MA 5 being above MA 20. This is the condition. I want this condition be fixed as I will be using it as reference to modify the buy pending order later on. I hope this clarify one of my conditions.

                            Perhaps this can be done is:

                            1. Check if any MA crossing occurred
                            2. If yes, raise flag
                            3. Check if flag is raised
                            4. If yes, check for pullback candle
                            5. If yes, place buy pending order
                            6. If buy pending order triggered, reset flag
                            7. If buy pending order not triggered, delete pending order
                            8. Repeat Step 4 to Step 8, repetition to be capped at maximum 3 times

                            I haven't explored the flags feature. Do you think it can be done this way? Or maybe there is an easy way? =P

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

                              @darrow You don't need any flag. 🙂 Yes, the crossing is the initial point for your EA to consider if ALL OTHER conditions are true. So you just need to know if both MA are in the correct position. If you do that you can be sure that there was a crossing sometime before. And that is all you need. Look at it this way:

                              1. Was there a crossing in the past? Yes.
                              2. Are both MA in the correct position? Yes
                              3. Are high/low levels of candle ID 1 in the correct position compared to candle ID 0? Yes
                              4. Launch pending order.

                              Easy, isn't it? 😉

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

                                @l-andorrà I wish to clarify and align again. I want the pullback candle to occur right after the cross, not somewhere after the cross happened.

                                For example, cross occurred at candle ID #2, if pullback candle occurred at candle ID #1 then place pending order. If they are not connected, then it’s not a valid setup.

                                Are we on the same page? 😃

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

                                  @darrow Yes, we are. Then your EA is correct. The problem is when it considers the crossing happened. You and me see the crossing 'between' two candles, but an EA just 'sees' once it is complete. In your example, this means it was confirmed once candle 3 was complete, but due to the 'Once per par' block, that is not detected until the opening of candle 2.

                                  If you don't want that, you can remove that block but then you can get dozens of trades on the same bar.

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

                                    @l-andorrà Thank you for getting back. I would not want to have many trades on the same bar either. Is there another way around? or perhaps that is out of the capability of this builder.

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

                                      @darrow You can always limit the masumim number open open trade by using a 'Check trades count' block on top of your block tree.

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

                                        @l-andorrà Sorry to get back to you late. I have tried the 'check trade count' method. What happened is that the EA opens and deletes the orders within candle #1 timeframe until the beginning of candle ID#0. It supposed to keep on opening and deleting in candle #0 timeframe.

                                        Candle #1 timeframe: 9:00 - 9:15
                                        Candle #0: 9:15 - 9:30

                                        I am reusing this picture to indicate which candle is candle ID #1 and #0
                                        0_1601025349803_Pic 6.PNG

                                        Actual screenshot:
                                        0_1601025602993_Pic 8.PNG

                                        The result:
                                        The result shows that the ‘opening & deleting' process ended at the beginning of candle #0
                                        0_1601025653103_Pic 9.PNG

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

                                          @darrow Can you please share your project?

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

                                            @l-andorrà This is my project:
                                            https://fxdreema.com/shared/t5kgu1DId

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

                                            Online Users

                                            E
                                            H

                                            10
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors