fxDreema

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

    Close my trades following equity level

    Questions & Answers
    0
    9
    751
    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
      bagheria last edited by

      Hi all! I am trying to close my trades when the equity reach a level of loss.
      Example here. I want my positions close when my equity lose 20%. When my account start from 10 000 and my equity is at 8 000 I need my EA close all positions. How can I do?
      I did something but it doesn't work. Maybe I have forgot something...
      Thanks
      https://fxdreema.com/shared/BqWAvRNmc

      Morpheus_0 1 Reply Last reply Reply Quote 0
      • Morpheus_0
        Morpheus_0 @bagheria last edited by Morpheus_0

        @bagheria - You could try * -80 as the minus sign means 'less than'....*

        B 1 Reply Last reply Reply Quote 0
        • B
          bagheria @Morpheus_0 last edited by

          @morpheus_0 Thanks. Like that? I will test but seems strange.

          0_1672135962925_Capture d’écran 2022-12-27 111210.png

          Morpheus_0 1 Reply Last reply Reply Quote 0
          • Morpheus_0
            Morpheus_0 @bagheria last edited by

            @bagheria - Yes...I'm not sure myself but building EAs is just a matter of trial and error right? 🙂

            Perhaps a formula could work too but I'm sorry, I'm not that expertised*

            B 1 Reply Last reply Reply Quote 0
            • B
              bagheria @Morpheus_0 last edited by

              @morpheus_0 Thank you. It is not working at all.
              Anyone else to propose a solution.
              Just a silly question: "Need I put the condition in "On init" tab or not?"

              Morpheus_0 1 Reply Last reply Reply Quote 0
              • Morpheus_0
                Morpheus_0 @bagheria last edited by

                @bagheria - > Just a silly question: "Need I put the condition in "On init" tab or not?"

                This I know....No you do not 🙂 On Tick is fine*

                B 1 Reply Last reply Reply Quote 0
                • B
                  bagheria @Morpheus_0 last edited by

                  @morpheus_0 Ok, thanks. I have the good solution. For those who have the same question you need to do the following thing in the "On tick" tab.
                  0_1672137351085_Capture d’écran 2022-12-27 113539.png

                  The secret is Equity < Balance *0.80 (for 20% loss) and not Equity < Equity *0.80

                  Thanks for your help Morpheus!

                  Morpheus_0 1 Reply Last reply Reply Quote 0
                  • Morpheus_0
                    Morpheus_0 @bagheria last edited by

                    @bagheria - My pleasure. Glad you got it sorted and thanks for sharing your results*

                    1 Reply Last reply Reply Quote 0
                    • G
                      gacabig last edited by gacabig

                      try this

                      https://fxdreema.com/shared/nxdYZolic

                      GacA

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

                      Online Users

                      W
                      M

                      7
                      Online

                      146.8k
                      Users

                      22.4k
                      Topics

                      122.6k
                      Posts

                      Powered by NodeBB Forums | Contributors