fxDreema

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

    How to skip certain number of candles?

    Questions & Answers
    2
    12
    1737
    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.
    • R
      rafaels919 last edited by

      Hi,
      How can I skip certain number of candles?

      "Skip Ticks" let's you skip time under certain conditions, but it doesn't work in the strategy tester when the markets are open for some reason.
      https://fxdreema.com/shared/DvlJ4bBZb
      (^using the "check consecutive losses" as a condition to skip 12 hours)

      As an alternative to time, I want to skip number of candles when certain conditions are met, similar to the example above.

      Anyone know a solution to this?

      Thanks.

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

        @rafaels919 Hi!

        Working with hours and minutes is always a pain, better avoid them altogether.

        • Create a variable skipcandles that increases +1 on every new candle (no conditions for it). Initial value for the variable should be big, like 100
        • When you need to "skip", just reset that variable back to 0.
        • Now you can check: skipcandles must be above 12 (for example) before new actions

        https://fxdreema.com/shared/mQ7gUp3me

        0_1575473361277_fb4a4e5c-34a2-4d90-9fa4-cd70cfd5d3e9-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 1
        • R
          rafaels919 last edited by

          Hi Roar,
          Why is there a "buy now" block connected? I don't think I understand that configuration.
          Should I place "Condition:skip period over" block above "No Trade" block? Would be great if you could repeat that here :
          https://fxdreema.com/shared/lO7c5qKW

          Thanks.

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

            @rafaels919 here:
            https://fxdreema.com/shared/gRjVji7md

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

              @roar It doesn't run on strategy tester for some reason...

              1 Reply Last reply Reply Quote 0
              • R
                rafaels919 last edited by

                @roar Nevermind. It runs now. Thanks!

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

                  @rafaels919 Wait, I noticed a problem in my logic... If there are 3 consec losses, the variable will reset on every new tick. Let me fix that

                  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 @rafaels919 last edited by

                    @rafaels919 I moved the "check consecutive losses" to a different tab, this should avoid the loop
                    https://fxdreema.com/shared/94PPvVwH

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

                      Awesome. It wasn't trading after 3 losses, but now It works well with the "check consecutive losses" in the different tab. Appreciate it. @roar

                      1 Reply Last reply Reply Quote 0
                      • R
                        rafaels919 last edited by

                        Wait, it doesn't skip actually. Do I have to edit something in your setup for it to skip? @roar

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

                          @rafaels919 Here's my test. Skipping 12 candles after 3 losses:
                          0_1575480330760_63f3f281-46b3-43f1-bfe3-dd0bd3647ef3-image.png

                          Skipping 120 candles after 3 losses:
                          0_1575480390744_b89643ca-d199-4f40-bd39-4f7633886fdd-image.png

                          It seems to be working, at least in some way. How many candles you wish to skip? You can just modify the number in block #5

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

                            Yeah, that's the only block that I edit.
                            I'm trying to skip 120 candles, but that configuration didn't work.

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

                            Online Users

                            E
                            T
                            M
                            X
                            A
                            A
                            E
                            D
                            S
                            A
                            S
                            E
                            E
                            J
                            G

                            23
                            Online

                            146.8k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors