fxDreema

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

    Increase lots after x losses

    Questions & Answers
    4
    30
    5707
    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 @jzfusion last edited by

      @jzfusion Very close. I see you reset the lost when that condition is true (orange). However, if the condition is not true (yellow), the variable will keep the value and this may cause problems when the loop runs again some time in the future.
      0_1588626367770_88d2f520-c2f4-4527-b459-f5472c04dcf9-image.png

      This is why I like to reset the variable at the pass-block right before the loop, so there will be no surprises.
      0_1588626403639_e753f6d8-7c20-4994-8617-db59ada67541-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

      1 Reply Last reply Reply Quote 0
      • J
        jzfusion last edited by

        @roar

        I am getting really confused.
        Here's the modified link. It doesn't run when backtested. I'm not sure where I'm getting the logic mixed up. My understanding on how variables work in fxdreema is very challenged.
        Can you figure out why it doesn't work?
        https://fxdreema.com/shared/nkB08bjyc

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

          @jzfusion the variables are ok, its just this condition:
          0_1588709306477_7ea6d54a-def8-41ea-8513-690dc081ee5f-image.png
          When theres 0 trades in history, "lost" will always be less than "number_of_losses" and the condition will always be false.

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

            @roar

            We're in business but except the lots aren't incrementing after x losses. It runs about 7 trades and run again.

            1_1588877110338_Screenshot 2020-05-07 at 19.42.18.png 0_1588877110338_Screenshot 2020-05-07 at 19.43.19.png

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

              @jzfusion What's the project

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

                @roar
                Here:
                https://fxdreema.com/shared/4AgPAsJ4b

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

                  @jzfusion There's a bug in my earlier project, should have noticed that, sorry..
                  You need to connect both orange and yellow outputs of the condition, so the block will only modify variables and then pass in any case.
                  0_1588897637336_2f328971-dc1d-47a1-97a8-b23a4eb23287-image.png
                  Also, the comparator must be "above":
                  0_1588897666369_5da63780-f766-40e4-8cd5-f90c2337394b-image.png

                  Now it increases lots when trades hit SL. If there are more than 5 losses (number_of_losses), next lot would be 0.12 because you have set number 2 in the condition block.
                  0_1588898357391_d5f24cb4-8c84-4508-8174-c7f60ae15bbb-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

                  1 Reply Last reply Reply Quote 0
                  • J
                    jzfusion last edited by

                    @roar
                    If x(number_of_losses) is set to 5 then shouldn't we only be seeing an increase in lots after the 12th trade in your list? I don't mind the slow lot increments from 0.11 to 0.13 however I was expecting it to only begin after the 5th trade unless you set your example to 1 rather than 5? I'm seeing increments but the number_of_losses variable is not taking effect.

                    1_1589022955243_Screenshot 2020-05-09 at 12.14.41.png 0_1589022955243_Screenshot 2020-05-09 at 12.15.29.png

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

                      @jzfusion ok, I don't know what kind of lot sequence you are after here, exactly. Would something like this be close to it:

                      0.10 loss ->
                      0.10 loss ->
                      0.10 loss ->
                      0.13 loss ->
                      0.16 win ->
                      0.10
                      ?
                      If so, here's the project:
                      https://fxdreema.com/shared/Nttrk6dbb
                      0_1589037575791_29a3511d-1c2b-4dd9-bbf2-1cc2d961bb6e-image.png
                      What the variables mean:
                      multilot: how much lot increase per one history loss
                      baselot: lot size when 0 losses
                      default_trades: how many losses to wait until start increasing
                      maxlot: how high the lot amount can go

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

                        How about closing trades basses on rsi overbought and oversold ?

                        fvdscscasx

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

                        Online Users

                        E
                        R
                        S
                        A
                        B
                        N
                        M
                        A
                        T
                        V
                        M
                        A

                        24
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors