fxDreema

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

    Logic (true-false) block not behaving as I expected

    Questions & Answers
    2
    5
    22
    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.
    • M
      machTucker last edited by

      Hi everyone,

      https://fxdreema.com/shared/P2p5QJbD

      Newbie to fxdreema here. Getting to grips with the blocks etc and trying to build and replicate some existing strategies I have coded myself.

      I was trying to implement a custom indicator and in doing so used a logic block. Very simple test....if true then use custom indicator and buy, if false sell.

      When I run it it sells all the time regardless of how the flag is set. What am I doing wrong?

      E

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

        You have nothing setting that flag, default will be false, meaning this is the only option that will create a trade.

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

        M 1 Reply Last reply Reply Quote 1
        • M
          machTucker @jstap last edited by

          @jstap Hmm, OK. I set up a constant called use_regime as an input variable. I intended for the user to be able to set either true or false before running the EA. I'm guessing I haven't done that correctly? I selected the constant in the logic block, what am I doing wrong?

          1 Reply Last reply Reply Quote 0
          • M
            machTucker last edited by

            I've managed to sort it. Used a condition block instead of a flags block. Im guessing the flags block just checks flags that are set by a set block.

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

              Yes, most either check what you have set, or check a condition that changes by it's self.

              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

              N
              O
              M
              D

              10
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors