fxDreema

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

    Block BUYS & Reinforce SELLS on ZigZag High Break

    Questions & Answers
    @l-andorrà
    2
    7
    453
    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.
    • W
      windsor-2003 last edited by windsor-2003

      Hello everyone,

      I’m working on an MQL5 Expert Advisor that uses the ZigZag indicator to detect trend turns. My current logic is:

      1. When a sell condition is met, open a SELL order.
      2. When a buy condition is met, open a BUY order.

      However, during pullbacks after a SELL entry, the ZigZag sometimes draws small counter-trend swing structures that trigger a BUY signal—so the EA opens a BUY while still holding the initial SELL.

      What I actually want is:

      1. Suppress any BUY orders as long as the original SELL position remains open.
      2. Track the price of the ZigZag pivot high at the time of the initial SELL entry (i.e. the swing high that triggered the sell).
      3. When price breaks above that pivot high, open another SELL order (to reinforce the short) instead of opening a BUY.

      Could anyone show how to implement this in MQL5? Specifically:

      • How to record and update the last ZigZag swing-high price in OnTick() (using CopyBuffer or similar)
      • How to detect and compare the current Bid price against that stored pivot high
      • How to bypass BUY logic when a SELL position is open
      • How to send an additional SELL order when the pivot high is broken

      A code snippet or tips on integrating this into the OnInit() / OnTick() structure would be hugely appreciated!

      Thank you in advance.]

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

        Are you requesting raw custom code of an fxDreema structure doing it?

        (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
        • W
          windsor-2003 last edited by

          Big Thanks for jumping in! l'andorrà 🙏

          I’m actually looking for the step-by-step fxDreema block setup rather than the raw MQL5 code. Could you show me how to piece together those blocks in fxDreema to:

          1. Store and update the ZigZag pivot high when a SELL opens
          2. Suppress any BUY blocks while the SELL is still active
          3. Trigger a new SELL block once the price breaks the stored pivot high

          A clear walkthrough of each block and its parameters would be hugely appreciated. 😊

          1 Reply Last reply Reply Quote 0
          • W
            windsor-2003 last edited by

            @l-andorrà more clear point:

            XAUUSD_2025-07-02_21-32-32.png

            The red line is Zig Zag, at that time I had ordered buy 1, but that still was not closing at H0. So my next move is when the price moves below L,0, I will open Buy 2.

            So the point is, whenever Zig Zag starts to create H and L, it will start to count as H0 and L0 and the period H and L will change every time. Then, how do I set up the block to buy when the price moves below L0?

            Big Thanks, Big Man... very need your help.

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

              This is how to begin with:

              https://fxdreema.com/shared/HKlKZCE1e

              Now you can get the values of H0, H1, L0 and L1 updated every new candle. You can now select which value you need to open a buy or a sell from there.

              (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 1
              • W
                windsor-2003 last edited by

                Big Thank Big Man

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

                  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

                  S
                  T
                  F
                  I
                  S
                  S
                  G
                  I
                  B
                  D

                  20
                  Online

                  146.6k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors