fxDreema

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

    Condition based on user-input in the EA

    Questions & Answers
    2
    4
    109
    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.
    • D
      dte last edited by

      I want to have user-input fieds in the EA-settings like "take only long trades yes/no?" and the value of this parameter should be used as a condition in the strategy. If the parameter is "no" or false, then also the shorttrades-part of the strategy should be executed.
      I think this should be simple, but I can't figure out how to do this. Any help will be appreciated.

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

        create bool constants, then use these for true/false in a 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! 😊

        1 Reply Last reply Reply Quote 0
        • D
          dte last edited by

          @jstap , that surely makes sense, but my real issue is that I cannot find out how to setup a condition block so that it compares a constant or a variable with the value it should test for.

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

            Create the constant
            type=bool
            name=what you want
            value=true/false
            right click and add to your condition block

            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 1
            • 1 / 1
            • First post
              Last post

            Online Users

            W
            O
            D

            12
            Online

            146.9k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors