fxDreema

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

    Resetting Consecutive Losses Block

    General Discussions
    4
    15
    795
    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
      pressium last edited by

      I am trying to build an EA that monitors consecutive losses (e.g., 3 losses in a row) and automatically closes all open and pending orders when this condition is met. However, I am encountering an issue: when I attach the EA to a chart, it immediately closes all newly placed orders, as it mistakenly considers prior losses in the order history.

      I want the EA to start counting consecutive losses from the moment it is attached to the chart, without taking into account previous trades. Once the condition is met and EA executes the closing procedure, the loss count should be reset to zero again.

      Here is the ea link: https://fxdreema.com/shared/dNfp0dRle

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

        You will need variables to do that. Are you familiar with variables?

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

          Like this: https://fxdreema.com/shared/pnTRM5TZb

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

            did I make it right?

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

              You will need to use the 'on trade' tab instead. Like this:

              https://fxdreema.com/shared/E3s30T1xc

              Then you will have to reset the variable somewhere else in your structure in order to count from 0 again.

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

              P 1 Reply Last reply Reply Quote 0
              • K
                kvng.kr last edited by

                The problem sounds like you're pulling trade history data without filtering it by the time the EA was attached. You need to add a variable that stores the EA's activation time. Then, only count losses that occurred after that time.

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

                  @l-andorrà In that case, do I need to use the "Check Consecutive Lossess" block on Tick tab?

                  l'andorrà 1 Reply Last reply Reply Quote 0
                  • P
                    pressium @kvng.kr last edited by

                    @kvng-kr I don't want to add more variables to it. I simply want the EA to reset back to zero after 3 or more consecutive losses, regardless of whether those losses come from historical trades or current running trades. That's all.

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

                      @pressium No, it is not necessary.

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

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

                        @l-andorrà So far I did this: https://fxdreema.com/shared/hLpkXEI8b

                        please check it and write me whether i did it right or wrong.

                        Again the goal is to count consecutive losses (for example: 3 losses), and then close open trades, delete pending orders and reset the counter back to zero.

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

                          did I make it right?

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

                            This structure will count correctly the number of consecutive losses, but will not stop new trades to be open. You need to use the 'turn on' and turn off' blocks as 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.

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

                              @l-andorrà I want the ea to count number of consecutive losses from the time it was attached to the chart and when it gets 3 or more losses according to input info, it will close all the running and pending orders and reset the loss count back to zero.

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

                                Then you need this structure instead:
                                https://fxdreema.com/shared/2LdYd0PI
                                However, that will not stop opening new trades. You will still need to apply those 'turn ON/OFF' blocks 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 1
                                • M
                                  Meissgenry last edited by

                                  To fix this, add a variable to record the timestamp or trade count when the EA is attached. Only evaluate trades after this point to ignore prior losses. Reset the counter after closing all orders to start fresh.

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

                                  Online Users

                                  V
                                  O
                                  J
                                  B

                                  11
                                  Online

                                  146.7k
                                  Users

                                  22.4k
                                  Topics

                                  122.6k
                                  Posts

                                  Powered by NodeBB Forums | Contributors