fxDreema

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

    How to make that Close Condition !

    Questions & Answers
    5
    15
    3350
    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.
    • W
      wolamen last edited by

      " if i have 10 running orders "
      i want to make a condition :
      if the( worst one = all win orders) , close them .. and recheck and compare the worst one again

      so i want to detect worst lose order and put it into variable A
      and detect all win orders and put them into variable B
      and compare them

      note.. i expect result like :
      order1 = -30$
      order2 = -25$
      order3 = -20$
      order4 = -15$
      order5 = -10$
      order6 = -5$
      order7 = 0$
      order8 = +5$
      order9 = +10$
      order10 = +15$

      so the condition should close ( "order1"&"order8 & order9 & order10" ) because the sum of them are Zero

      any one can help ?

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

        Will all orders be running on the same chart or different ones?

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

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

          @l-andorrà same chart

          1 Reply Last reply Reply Quote 0
          • A
            alexdepa last edited by

            I have exactly the same problem. @FXDREEMA please help us to find a solution!

            Thanks!

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

              But which profitable trades should be closed? What if the sum of orders' profits is not zero? What if your worst loss is -50 pips and all 6 profitable trades sum +12 pips?

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

                • Put all trades into an array
                • Sort the array
                • Pick the biggest loser
                • Start summing up the biggest winners on the array, using a loop
                • When ProfitSum > Loss
                  -> "Close most profitable trade" i times. You get i from the previous loop
                  -> "Close least profitable trade"

                Here's the project, I'm sure there is still some bugs left, but close enough lol:
                https://fxdreema.com/shared/Em63v0Sac
                0_1560683328324_b110e89b-1230-47cf-acb5-f83903b428f9-image.png

                Need small help? Tag me in your post
                Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                A W 3 Replies Last reply Reply Quote 0
                • A
                  alexdepa @roar last edited by

                  @roar woow! thanks!

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

                    And that's why being a true mql programmer is always better! 🙂

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

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

                      @l-andorrà I wish I was a real programmer lol. I don't even know the basics of mql.
                      I just copy from mql4 articles, try and fail and try again until I get my result.
                      Thats the beauty of this program, you can teach yourself

                      Need small help? Tag me in your post
                      Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                      1 Reply Last reply Reply Quote 1
                      • A
                        alexdepa @roar last edited by

                        @roar I tried to add another array to separate buys from sells but it doesn't seem to work. Could you take a look at shared project https://fxdreema.com/shared/Mq1YS72ge and tell me what I'm doing wrong?

                        Thank you!

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          alexdepa @alexdepa last edited by

                          @alexdepa said in How to make that Close Condition !:

                          @roar I tried to add another array to separate buys from sells but it doesn't seem to work. Could you take a look at shared project https://fxdreema.com/shared/Mq1YS72ge and tell me what I'm doing wrong?

                          Thank you!

                          @roar I found the errors I made in the second array. Thank you anyway.

                          roar 1 Reply Last reply Reply Quote 0
                          • roar
                            roar @alexdepa last edited by

                            @alexdepa I looked into it, the "once per bar" must reset the ActivateSystem variable - I think that is missing from the sell side.

                            Nice work applying my design, I really appreciate your diligence!

                            Need small help? Tag me in your post
                            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                            A 1 Reply Last reply Reply Quote 0
                            • A
                              alexdepa @roar last edited by

                              @roar Thank you...I'm trying to program this idea https://www.youtube.com/watch?v=S8E3xtR2omA&t=187s because I think it's really interesting but it's not easy at all...

                              roar 1 Reply Last reply Reply Quote 0
                              • roar
                                roar @alexdepa last edited by roar

                                @alexdepa Ok, good luck!
                                Personally I have zero interest in systems like this - the market doesn't care about your position management scheme, thus it will not generate a profit, only generates an illusion of profit.

                                My advice: focus more on the chart, less on complicated position structures

                                Need small help? Tag me in your post
                                Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                                1 Reply Last reply Reply Quote 0
                                • W
                                  wawaneumi @roar last edited by

                                  @roar can you share your ex4? i can not download your ea .. thanks my email : wawaneumi@gmail.com

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

                                  Online Users

                                  F
                                  M
                                  L
                                  F
                                  F
                                  M
                                  E
                                  K
                                  M
                                  T
                                  A
                                  P

                                  21
                                  Online

                                  146.6k
                                  Users

                                  22.4k
                                  Topics

                                  122.6k
                                  Posts

                                  Powered by NodeBB Forums | Contributors