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.
    • l'andorrà
      l'andorrà @Darrow last edited by

      @darrow You are requiring the MA crossing happening specifically between candle 2 and 3. As new candles are formed, the crossing condition will never be true. In your previous image you wanted that at the opening of candle ID 0 a new pending order was programmed at candle ID 1's high. At that moment, the crossing happenend betwqeen candles 3 and 4.

      Can you see now why it will never work? You need to liberate the crossing condition from the high/previous high condition in order to get future pending orders.

      (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, it seems that I am back to circle again. I noticed this problem back then and I said in below post.

        The MA crossing is dynamic. This means that, for every new bar is formed, the occurrence of crossing is shifted back. How do I make it such that the crossing is fixed as reference? I want that the condition (crossing) to be met once then take action (either open new order or modify order).

        @darrow said in Modify pending order after condition met once:

        @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 Use a boolean variable. When the crossing is confirmed, move that variable from false to true. Then you can use that as a condition block previous to your other conditions. As far as that crossing condition is true, no matter how many new candles are formed, it will still be true for all the other ones.

          Then don't forget to change it to false again when a reverse crossing happens.

          (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 the solution. I am definitely on the right track now.
            This is my current project, with boolean variable implemented:
            https://fxdreema.com/shared/uDRvr9Fzb

            When MA cross + pullback occurred, variable 'MA cross' gets modified to 1
            When there is a trade detected or more than 3 modification of pending order occurred, variable 'MA cross' gets modified back to 0

            It works now, at least it did what I wanted this time.
            Result:
            0_1601456652788_Pic 12.PNG
            0_1601456968258_Pic 13.PNG

            However, there are 2 hiccups:

            1. From the table of results, the next buy order was opened at timing 09:18. I was expecting it open the buy stop order at timing 09:15.
            2. After the trade was closed due to hitting SL at timing 09:28, the EA immediately opened another buy stop order at that same timing. I thought variable 'MA cross' would be turned 0 when there is a trade detected.
              0_1601457226859_Pic 14.PNG
            l'andorrà 1 Reply Last reply Reply Quote 0
            • l'andorrà
              l'andorrà @Darrow last edited by

              @darrow You need to reinitialize that variable to 0 again when a reverse crossing happens. And you also need to connect block 27 between blocks 21 and 28. You want both conditions to be true at the same time.

              (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 updated project:
                https://fxdreema.com/shared/oKcYdYsQc

                Is this what you mean by reverse crossing? For my case, I set the variable 'MA cross' to 2 when 20 MA crosses below 5 MA (the opposite condition for selling setup).
                Or do I have to set it to 0?

                0_1601542508357_Pic 15.PNG

                As for the connection between block 27, 21, 28, I only need one of the conditions to be true to reset the variable:

                1. When there is trade
                2. When 'change' = 'max change'

                Note both variables 'change' and 'MA cross' are reset to zero here

                For example, buy stop may have been triggered before the 'max change' is reached.
                Or buy stop is not triggered but 'max change' reached
                Please correct me if I am wrong here.

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

                  @darrow I'm a bit lost now. According to block 18, MA_cross must be 1 for a pending order to be prgrammed. Why that same variable need to be modified to 2? What I suggested is that its current reinitialization to value 0 should be modified, but this whole new structure befuddles me. What do you exactly need?

                  (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à All the while, I am using a buy setup as an example. The reason I set 'MA_cross' to 2 because I am going to use the same variable for selling signal.
                    This is the updated project:
                    https://fxdreema.com/shared/5sVJ5wWeb

                    0_1601607617783_Pic 16.PNG
                    I have added mirrored condition for sell setup.
                    So when 'MA_cross' = 1, buy signal triggered
                    When 'MA_cross' = 2, sell signal triggered
                    When 'MA_cross' = 0, waiting for waiting to MA cross to happen (either buy or sell)
                    I should have added this portion in my previous project. I apologize for the confusion.

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

                      @darrow That looks much better. If I understand it correctly, now it works. Right?

                      (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à The logic seems alright but it still did not work out the way i want it. My project:
                        https://fxdreema.com/shared/ZPsLbKjAb

                        In this example: Selling signal detected at 2020.01.16, time 03:00

                        1. Expectation: The EA to open an sell stop order based on previous low.
                          Reality: The EA opened an sell position instead.
                          0_1601690279660_Pic 17.png

                        2. Expectation: There should not be any more sell order to be created after the sell position at 03:00. According to 'If trade' logic, the variable 'MA_cross' would have been turned to 0.
                          Reality: The EA still opened a sell stop order/sell position as if 'MA_cross' is still in value 2.
                          2 sell order/sell position opened, as shown.
                          0_1601695024968_Pic 19.PNG
                          0_1601695066046_Pic 20.png

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

                          @darrow Your points

                          1. Look at the open price compared to the pending order price. They are too close, so the platform simply opened it due to spread.

                          2. I recommend you to change your MA_cross variable with two boolean variables (true/false). One for buys only and the other one for sells only. This way you will get a yes/no action for your requirements and they wil be easier to track if not working properly.

                          (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à Thanks for your recommendation. I have changed the MA_cross variable to two boolean variables, namely 'MA_cross_buy' and 'MA_cross_sell'.
                            This is the updated project:
                            https://fxdreema.com/shared/WjmtonxDb

                            For point 2, I have tested the EA and I get the same outcome.
                            0_1601816811312_Pic 21.PNG
                            I believe this is because variable 'MA_cross_sell' is not able to be reset back to 'false' after the 'if trade' condition is met.

                            The EA bought at 03:00 and closed with SL at 03:12. There is a 12 mins window for the EA to detect any trade (the 'if trade' condition) and then reset the 'MA_cross_sell' to false.
                            This is quite odd. What do you think could be causing the error here?

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

                              @darrow You need to specify that when MA-cross-buy is true, at the same time, MA-cross-sell is false. You can do that just adding the other variable inside blocks 17 and 31. Just use another slot insode them. That way you wil be sure that a buy can be done and a sell will never be done until a reversal crossing happens. Onviously you will have to opdate the positions of those variables accordingly.

                              (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
                              • 1
                              • 2
                              • 2 / 2
                              • First post
                                Last post

                              Online Users

                              E
                              H

                              12
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors