fxDreema

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

    Total profit reduces by x % then close everything.

    Questions & Answers
    5
    80
    31386
    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.
    • roar
      roar last edited by

      Oh, sorry didn't know that 😄
      Yes, youre right

      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

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

        @roar

        One thing that i noticed , that it dosnt close anything at all 😉

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

          Mine works now, it closes trades when equity drops 10%...
          0_1500476938147_upload-015e1610-2eb0-44cc-9b6b-68517d5af53d

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

            I modified it to work with profit, which, I think, you wanted in the first place
            here: https://fxdreema.com/shared/c2mQcANde

            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

            timmyhanke M 3 Replies Last reply Reply Quote 1
            • timmyhanke
              timmyhanke @roar last edited by

              @roar

              i dont know why mine dosnt do anything at all .

              https://fxdreema.com/shared/1w9F4NFxc
              0_1500477779393_test 1.jpg

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

                @roar

                it works , changed the numbers of it and the stoploss is a must so my strategy can go on if it dosnt get in profit !

                Thank you so much ! 🙂

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

                  It should work technically, but the logic is now so that there must be profit in order to make anything happen - otherwise the ea just waits and hopes the profit to show up 😄
                  Try with an SL

                  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

                  timmyhanke 1 Reply Last reply Reply Quote 0
                  • roar
                    roar last edited by

                    I downloaded your .ex4 and added 111 pips SL, heres what I got:
                    0_1500478180696_upload-5e1c9179-ece9-44a4-a922-7dc03e7f2b7b

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

                      @roar

                      thank you so much for your help ! ive been testing so much and now finally thanks to you it works !

                      You have a heart of gold ! 🙂

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

                        ^This is exactly why I like to help 😄

                        If you need further help, I'm usually bored enough to assist 😄

                        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

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

                          @roar

                          I will keep that in mind ! 🙂
                          Now i have a couple of billion ea's to try this on ....

                          If you want this only to start working if the current profit is > lets say 10 pips , so that it dosnt close anything too soon i assume that you add a block over everything with profit > 10 pips ? 🙂

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

                            Yeah, that would work 😄

                            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

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

                              @roar

                              oooh i just forgot , i was thinking of something else to , if the current profit is above the last x loosing positions value then close everything , since i got help with a big problem for me i have to ask you yet again 🙂

                              Then you would have so the positions is closing if the price drops and if the profit is above x previous loosing trades value 🙂

                              That should make any ea to improve alot 🙂

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

                                @timmyhanke
                                So the question is, how to get the loss values from history positions.

                                I would store the current profit, to some variable currentprofit

                                Because you compare many trades to one trade, you need to multiply the currentprofit with the number of last trades before continuing - just use a formula. In the formula I would also multiply it with *-1, so it can be compared to a loss.

                                Then use the "check profit (average)" block, set to look at x number (number_of_positions) of history positions, and compare the average last profit to the currentprofit

                                https://fxdreema.com/shared/D382vaNlc

                                This is just a fast mockup, how I would do it, perhaps there is a better way. To be honest, I haven't used anything like this, because I try to avoid making decisions based on profits and losses, and rather focus on actual price data.

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

                                  I just realized the above is partial bullshit. Multiplying the profits doesnt work because we check it against average value. But its a start, at least

                                  Dividing the currentprofit should work

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

                                    its a hard question i know 🙂

                                    It may be something interesting in condition - trade statistics were there are options to use consecutive losses , gross loss and maximum drawdown , couldnt that be the answear that we are looking for to compair the last trades to the current price ?

                                    Or in fact maybe the eqity is that answear , if the profit is above equity of x trades or since the ea started it should be at zero point again 🙂

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

                                      I think the trade statistics always looks at the whole history, so you wouldn't be able to focus on some x number of history positions

                                      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

                                      timmyhanke 2 Replies Last reply Reply Quote 0
                                      • timmyhanke
                                        timmyhanke @roar last edited by

                                        @roar said in Total profit reduces by x % then close everything.:

                                        I think the trade statistics always looks at the whole history, so you wouldn't be able to focus on some x number of history positions

                                        i see , you are an interesting person to ask questions to 🙂 if you have any brainstorms coming in to what could be the answear just try it and see if it works 🙂 almost all of the bright ideas comes alot after you have thought everything trough 🙂

                                        So no stress about it my friend ! 🙂

                                        1 Reply Last reply Reply Quote 1
                                        • timmyhanke
                                          timmyhanke @roar last edited by

                                          @roar

                                          Rorar , i found a problem with the closing part , not the thing that you made , it works , but i am a fan of opening multiple orders in the candle movement direction , so every order opened is a reducement of the total profit , meaning that the -10 % of the profit happends alot .

                                          Fooled around with different settings to see if i could find something that dosnt close the totalprofit if the orders are new and added to the close block , that it only closes orders that are more than 30 minutes old .
                                          But by that i feel that i could miss out on opportunities .

                                          Is there a way to reset the total profit every time a order is created so that they dosnt count instantly ?

                                          Tried by attaching modify variables to the closing and opening of the main strategy then tried on trade and added trades is created and attached that to modify variables , even tried to change the variable on the closing and opening on the main starategy too buy nothing worked 😞

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

                                            So you want to exclude the new positions from the profit calculation?
                                            I would go with the 30-min condition, why not? 😄
                                            Or set the ratio lower, 0.8 for example?

                                            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

                                            timmyhanke 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post

                                            Online Users

                                            F
                                            M
                                            E
                                            K
                                            M
                                            T
                                            A
                                            P
                                            V
                                            R

                                            27
                                            Online

                                            146.6k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors