fxDreema

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

    Issue with a counter CCI last 5 candles below level

    Questions & Answers
    2
    7
    1113
    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.
    • J
      jasys28 last edited by

      Hi Guys,
      I am new here, i am creating a bot that needs to have two counters (5 candles before) and not sure how can i achieve this? I have managed to get first one done but the second once got stuck.

      What i am trying to do:

      1. Price was above 3 MAs (for 5 candles)
      2. Price inside the MA Wave
      3. CCI below +100 (5 candles) = this is where i am stuck now...
      4. CCI above +100

      https://fxdreema.com/shared/10hgQ918c

      i have tried creating 5 different blocks but it did not worked and created a counter but then realised that the counter will not work because of my previous counter because i am on once per bar.

      I want it once per bar because of optimization - as this is the fastest way "I think" 🙂

      Please let me know if there is a way how to go around this as i have been stuck on this

      Thank you

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

        Hi!
        The method with 5 different blocks should work just fine, although a looped solution would be my choice as it would allow to select any number of candles.
        How can you know it doesnt work? Try chopping your strategy to different pieces and test each one alone. The draw line -block is great for troubleshooting with visual backtesting.

        Why the green counter blocks? Have you tried without them?

        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
          jasys28 last edited by

          Thank you - i will look into loop as i wanted to have an option to select how many clandles to pass.
          I have been doing this section by section and at this point it does not have trades.
          I will look into draw line block too - need to see how it works
          let me know if you see anything else that i am missing here...
          thanks

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

            This is how I'd loop it. There is a dedicated loop block in the builder, too, but it is not necessary. You have to be careful though, if the loop never ends you will get a stack overflow error.
            0_1548620215476_ac0eb499-ea2a-484d-93d8-910f18556a6f-image.png
            https://fxdreema.com/shared/h2FzCXa3b

            Now that I think of it, this would probably most easily be done with the "indicator moves within limits" block, lol

            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
              jasys28 last edited by

              let me try and will update you

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

                Hi i tried but for some reason i cannot make any trades and now cannot even optimize the bot - let me know if i am not getting something...

                https://fxdreema.com/shared/cNFq9ktPd

                thank you

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

                  Hi, i have managed to make it work with this - at least it makes trades - now need to test it and see if it does what i want 🙂 thanks you

                  https://fxdreema.com/shared/7jD3P8Dpc

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

                  Online Users

                  R
                  F
                  S
                  D
                  V
                  O

                  14
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors