fxDreema

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

    MA cross over instances

    Questions & Answers
    2
    9
    95
    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.
    • E
      elmo007 last edited by

      Hi coders.

      I am using a simple MA cross-over strategy, but I want to check how many times the cross over occurred in the past , if the instances were more then twice. I take action.
      See the picture below
      eb9cd0ba-e5b8-440a-a836-1bbcd2f9d751-image.png

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

        I assume this is the crash index, can't trade in the UK, but this was exactly my plan to use, which was just to open on the cross and then close long before the drop. If you set up every time a cross happens to add 1 into a variable, reset it to 0 when needed, and you will get what you need.

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

        E 2 Replies Last reply Reply Quote 0
        • E
          elmo007 @jstap last edited by

          @jstap Thank you bro, Ill try that now I'll get back when i get stuck with variables

          1 Reply Last reply Reply Quote 0
          • E
            elmo007 @jstap last edited by

            @jstap can you please show an example to save the cross in a variable

            1 Reply Last reply Reply Quote 0
            • E
              elmo007 last edited by

              I have this block that checks the cross-over, how to add a variable that counts the number of times the cross-over has occurred

              image.png

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

                Like this, the numbers will count from left to right: https://fxdreema.com/shared/7yaezRs5d

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

                1 Reply Last reply Reply Quote 0
                • E
                  elmo007 last edited by

                  Thankyou so much

                  1 Reply Last reply Reply Quote 0
                  • E
                    elmo007 last edited by

                    I see it counts the total crosses from the left and adds on the recent crosses. I guess I'll have to reset the count to count when the price is below 50 MA, then reset when price goes above 50 MA then recounts again when the cross happens below 50 MA

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

                      Yes, the principle is the same, set up a separate tree, and when a X< happens reset the existing variable (modify variables) to 0.

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

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

                      Online Users

                      D
                      E
                      H
                      E

                      9
                      Online

                      147.0k
                      Users

                      22.4k
                      Topics

                      122.6k
                      Posts

                      Powered by NodeBB Forums | Contributors