fxDreema

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

    Crossed in the past X candles

    Questions & Answers
    2
    2
    145
    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.
    • X
      xlestergg last edited by

      For me to enter a trade, I need two of my indicators to cross at the same time, lets say previously closed candle, ID 1.

      This is kind of strict, so I would want to allow some breathing room for like if Indi 1 crossed a candle earlier compared to Indi 2.

      0_1630925990775_5d821038-73e3-4f1f-a35f-b022b08e98d8-image.png

      This is quite possible to do with some candle ID 1 or 2 blocks.

      But what if I want other ranges such as 2 or 3 or more candles? It is not feasible to arrange the logic by block.

      What I want to achieve is.. if indi 1 crossed in the past X candles, lets say 4 candles.. and my second indi crossed in the previous candle, I would enter the trade.

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

        @xlestergg Try this LOOP, you can set it up to work with as many crosses as you like, just have 1 loop for each condition. It will count candles when true, and reset to 0 when false.

        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

        M
        5
        M
        M
        T
        C

        13
        Online

        146.8k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors