fxDreema

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

    Open a position based on trend/movement.

    Questions & Answers
    2
    8
    196
    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.
    • G
      Gilles last edited by

      Hello everyone,
      I would like to define a (bullish or bearish) movement and trigger only a single position within that movement.
      If the position is closed by SL or TP, no other position will be opened until the current movement is completed.
      The next position can only be possible in the opposite direction, at the beginning of the new movement.
      Below you will find my code to achieve this.
      How can I achieve this using fxDreema blocks?
      Thank you for your support.

      if condition 1 then
      uptrend=true;

      elseif condition 2 then
      uptrend=false;
      end

      if uptrend ~= old and uptrend == true
      then
      BUY
      end

      if uptrend ~= old and uptrend == false
      then
      SELL
      end

      old = uptrend;

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

        Start by defining what/how you class triend, get ea working with this, then you can move on to the rest.

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

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

          @jstap Let's consider the following example.
          How can I achieve this using fxDreema blocks?
          Please 🙂

          if EMA[close, 50 periods] > EMA[close, 200 periods]
          then
          uptrend=true;

          elseif EMA[close, 50 periods] < EMA[close, 200 periods]
          then
          uptrend=false;
          end

          if uptrend ~= old and uptrend == true
          then
          BUY
          end

          if uptrend ~= old and uptrend == false
          then
          SELL
          end

          old = uptrend;

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

            1st part is easy, condition block 50>200= orange dot, 50<200= yellow dot. To set up old you will need to record true/false when conditions are true/false, and set up logic to depict your conditions.

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

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

              @jstap Here's what I tried to do with the blocks.

              https://fxdreema.com/shared/cAuM7X4ic

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

                Although true/false=1,2 I would still stick to 1 type, set up a test showing what happens in a comment or drawing an arrow, then when this is working you can add the other condition.

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

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

                  @jstap Is it already possible to open only one position per movement with fxDreema without my knowledge?

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

                    No trade/position block only allows 1, if using this your logic needs set up so, if 1 is running, then conditions are correct, open 2 etc.

                    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

                    J
                    S
                    W
                    A
                    H
                    H

                    20
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors