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

      @roar

      So think that exclude the new position is a must in this one , but i have loaded 3 different eas on 3 different brokers right now to see how they act , the other test with the closing were almost only drawdown and the profit closed at 2-5 $almost every time πŸ™‚

      So i set up one with the 30 min closing , one with a larger pip value before it starts , and one using the equity instead of profit just to see πŸ™‚

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

        All right πŸ˜„
        There is certainly a way to make the ea as you said, excluding the losses from new positions. But I'm afraid it won't be very simple or elegant solution.

        You would need a variable for the modified profit.
        Then find out how much loss a new trade causes, this could be done with some more variables, one variable should show the profit a few candles ago, so when a trade happens, the loss could be calculated. The loss would then be subtracted from the "modified profit" variable.
        Then there should be another variable that keeps track of the losses caused by opening trades, a "loss bank" variable. That "loss bank" could then be slowly drained to the "modified profit", so the losses would be taken into account after some time, and "modified profit" would get closer to the real profit.

        Anyway, thats how I would do it, but I'm not sure if its worth the trouble πŸ˜„

        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
          That sounded alot πŸ˜‡

          Can't I be made with flags ? Like if a trade is created set the value to false and that it checks if the flag are true before it takes action .

          Or something if trade created don't do anything and if it's not true it goes through a turn on block that turns on the section of our profit close, and if it closes it closes the profit section to 😊

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

            @roar

            something like this

            https://fxdreema.com/shared/Pb22gGFvc

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

              Hmm, yeah, could work πŸ˜„

              If you just want to delay the ea after something happens, this is what I usually do:

              • create variable barcount
              • on each bar, modify variable barcount to barcount +1 , so the variable just increases every bar
                then, if you want to wait 3 bars after opening a trade:
              • reset the barcount at buy or sell,
              • put a condition: barcount > 3

              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

                That is really helpful and will keep that in mind ! πŸ™‚

                The example i sent to you was on the eqity part because that was the last ea i changed before i added everything on my 3 brokers and it seems to do something in what i want πŸ™‚ Sorry for the amount of entries i have the strategy to powerd by no trade nearby haha πŸ˜‰ but anyway πŸ™‚
                0_1500578075141_test 2.jpg

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

                  Hehe, 19000 trades - the spread costs could be pain in the ass in live trading 😬

                  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

                    19 000 trades in 1 year on 1 chart haha , think how valued you would be at your broker haha .. they will earn as much money as you do constantly πŸ˜‰

                    But the thing is that it charges profit spikes, and that i wanted to see πŸ™‚

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

                      Yeah, the core principle seems to be working, now its just about improving the ea as whole πŸ‘

                      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
                        Hello again ! 😊

                        I have a new question as well,

                        I have also tried to do one more thing , if the market reverses x pips close all the positions of that type.
                        So if in buy , it my strategy will buy along the candle but if it goes down like 10 pips I want it to close all buy trades from that ea.
                        So no total profit this time 😊

                        I have tried for each buy and sell, - 10 pips from open price then close but it does not seem to do it 😊

                        Then in my mind it can be fitted with a pip value that the chart has to reach before it takes action .

                        Hope you can help!

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

                          Hi πŸ˜„
                          Check my build:
                          https://fxdreema.com/shared/Ij9U5P7gc

                          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

                            You have to set the reverse as price fraction, though. Can be fixed πŸ˜„

                            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

                              Thank you so much ! will try it out and see how it behaves ! πŸ™‚

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

                                @roar

                                Tried it in backtester , it seems like it closes the orders instantly , so i tried to change the value of ReverseFraction to 10 instead , and then it seems like it does the work right πŸ™‚

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

                                  Oh, okay, thats strage πŸ˜„
                                  The formula block is now putting "10" to a price, for example 1.16590 + 10 = 11.16590
                                  Reeally strange

                                  I didn't test it myself

                                  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 timmyhanke

                                    @roar

                                    hmm and that is too much , but i dont know why it showed a more normal result on backtesting πŸ˜‰
                                    But i tried something , using lines .

                                    https://fxdreema.com/shared/5WaVD65ze

                                    Its from block 20 to 37 and 80 to 90 .

                                    It makes two lines , that move along price when its pushed by price πŸ™‚

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

                                      Thats quite insightful solutionπŸ‘
                                      And should even 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
                                      • roar
                                        roar last edited by roar

                                        I got my example working too, had to reset the high/low variable (to 0) at closing block.

                                        Btw, this principle is not far from just using Trailing stop πŸ˜„

                                        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

                                          I will try the reset that you wrote and see what it does πŸ™‚

                                          Haha i noticed that too , but it might work better , less orders adjustments through the broker πŸ™‚

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

                                            @roar

                                            can you upload the one that was working ? mine still does the same thing 😞

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

                                            Online Users

                                            M
                                            P
                                            S
                                            A
                                            E
                                            M

                                            28
                                            Online

                                            146.6k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors