fxDreema

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

    loop MA close

    Questions & Answers
    2
    5
    144
    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.
    • N
      nasserminaei last edited by

      Hi, I am working on a project that if Candle 1 close < MA20, then loops check Candles 2-21 close>MA20. if so, a buy position will be open. I don't know what's wrong that it does not open positions. probably I need to do something that I don't understand. here is the shared link. your help is appreciated.
      https://fxdreema.com/shared/X3NjLSbjc

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

        Without looking too deep into this, conditions on top of conditions rely on all being true at the same time, once per bar above conditions relies on all conditions being true at the moment of the 1st tick of the bar. All in all, this limits how things can work, test a couple of situations until you know they work, then add them all together.

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        N 1 Reply Last reply Reply Quote 0
        • N
          nasserminaei @jstap last edited by

          @jstap I have tried many combinations and the conditions are not many I suppose. I had EAs working with many more conditions and doing perfectly fine. I guess I'm doing something wrong with the 'Loop' block but I can't figure it out. that could be a lot to ask but I appreciate if you have a chance to look at it a bit more for any guidance.
          thanks

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

            Split things so the loop is separate and put the variables in a comment, then check you are getting the correct result, then you can add things back together. It looks like it's nearly there, so a couple of tests will find the problem.

            Learn fxDreema Without the Wait!

            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

            Don’t miss out

            Click here➡️ https://mybook.to/fxDreema to get your copy today!

            Enjoy! 😊

            N 1 Reply Last reply Reply Quote 0
            • N
              nasserminaei @jstap last edited by

              @jstap sure, I will do that. it's a good idea. thank you so much

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

              Online Users

              S
              T
              A
              Y
              H
              B
              K

              23
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors