fxDreema

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

    Trade Created Block v/s Pending Order Triggered

    Questions & Answers
    4
    8
    1625
    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.
    • B
      BlueMoon last edited by

      I would like to do bunch of actions when my Pending Order is triggered. I thought I could use the "Trade Created" block in the "Trade" event. But this will not work for me since I create trade on other conditions as well. I want me actions to happen only when the trade is created due to my Pending Order being executed but not when Trade is created from other blocks.

      Is there a way to filter based on on my requirement? I mean I want to execute stuff when my Pending Order creates a new Trade but not do those actions on other Trade creation events.

      T 1 Reply Last reply Reply Quote 0
      • T
        trader.philipps @BlueMoon last edited by

        @bluemoon Well, I don't have a simple solution. You might need to count the open trades and orders per tick. Then, when a trade is created, you check again if the number of open orders changed (1 less). If that is the case, you might assume that one of your open orders were executed.
        However, if you have other order create, delete or expiry actions, you might need to update the count what makes it not 100% proof.
        There might be also a way by introducing groups, especially if an open order has a relation to the action that should take place, when an order gets triggered.

        I like to share my knowledge, but expect the others to contribute as well.

        B 1 Reply Last reply Reply Quote 0
        • B
          BlueMoon @trader.philipps last edited by

          @trader-philipps Thank you very much for your reply. Honestly I do not like any of the suggestions you have made. It will just over complicate things. I really like to keep things simple. I will just have to consider making design changes so I just don't have to deal with this while still achieving what I need to do.

          I was just hoping that the "Trade" event had a special block called "Pending Order Triggered" and this block would get activated every time a new Trade is created due to Pending Order getting executed.

          I really appreciate you taking the time to reply on a Sunday afternoon..

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

            You can create different groups for different trade conditions. Then you can specify what group is applied within a 'Trade created' block.

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

              I am already using "Group" for my trades in this EA for a different purpose and it is not possible to mix it with this.

              1 Reply Last reply Reply Quote 0
              • B
                BlueMoon last edited by

                I am going to try the following. Let me know your thoughts. I will update here how it goes.

                The other area of my EA where I am creating a new Trade, I will set a variable and set a value of it to "1" before I create the Trade. Once the Trade is created, it will trigger my "Trade Created" block. I will check the value of the variable first and if it is "1" then I will not execute the things I want to execute and just set the value of the variable back to "0"

                When my Pending Order gets triggered it will also trigger my "Trade Created" block. This will again check the value of the variable and it will find thee value to be "0" so it will continue to execute my code.

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

                  Sounds good, but maybe a look on your project would be more efficient. Could you please share 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.

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

                    @l-andorrà

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

                    Online Users

                    S
                    M
                    2
                    M
                    M
                    N
                    B
                    A

                    16
                    Online

                    146.6k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors