fxDreema

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

    End loop once condition is met

    Questions & Answers
    2
    4
    312
    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
      nk0815 last edited by nk0815

      Hello, I use an indicator that draws an object (not available via buffer, but I can get it via colour) on swing highs and lows.

      I want to get the candle ID of the most recent object, but ONLY if it is higher (for swing high object) or lower (for swing low object) than the current candle close. The loop should run until the price-is-higher and price-is-lower conditions are met, and then write the 2 candle IDs into variables. How do I add this condition into the loop, and stop it once the first object that meets the condition is met?

      Here is what I have so far; any help is highly appreciated.

      https://fxdreema.com/shared/zpMiP3q2d

      l'andorrà 1 Reply Last reply Reply Quote 0
      • l'andorrà
        l'andorrà @nk0815 last edited by

        @nk0815 I would separate both searching loops into different block trees. Then a third independent tree would do the comparison. You current structure will not search fopr the green object unlest the maroon one is first identifed. And I guess that's not happening all the time.

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

        1 Reply Last reply Reply Quote 0
        • N
          nk0815 last edited by

          Thank you for your reply, that brought me thinking quite a bit further.

          I think I will need a custom MQL code block to start the loop. I will open a separate post for this as it is not really related to what I have written here first.

          Have a good day 🙂

          l'andorrà 1 Reply Last reply Reply Quote 0
          • l'andorrà
            l'andorrà @nk0815 last edited by

            @nk0815 You're welcome.

            (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

            (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

            (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

            Online Users

            J
            J
            G
            P

            23
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors