fxDreema

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

    Dynamic Take Profit on Moving Average

    Questions & Answers
    2
    6
    211
    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
      Mr.Big last edited by

      Hi everyone,

      I have activated 1 market order and 2 pending orders using buttons, and I’d like to close all positions related to that chart based on a moving average that updates with each tick.

      I tried adding the condition and the order closure in the "on tick" section, but it doesn't work.

      Does anyone have a solution to suggest?

      Here the project: https://fxdreema.com/shared/0rsyjbKlb

      Thanks!

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

        The problem will be with == price will rarely = an MA price because of the relevant tick causing the price recognition level to skip past it at the relevant microsecond, try using a cross setting (x> or x<)

        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 0
        • M
          Mr.Big @jstap last edited by

          @jstap you mean 2 logic tree on "on tick" one for buy and one for sell like that but with > and <?

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

            Yes but a cross x> x< happens once, not constantly

            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
            • M
              Mr.Big last edited by

              ok thanks @jstap , now it works!! This is the update version https://fxdreema.com/shared/XmMIN77kc

              Now to test it on tester i put a PASS block over the 2 flow on "on tick" but the buttons doesn't work on tester...

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

                On chart won't work on tester, for this, you need to use on tick, condition block, object on chart, button pressed/depressed == 1 - buy/sell (complete action)block - redraw button off

                That would mean you can use the button drawn on init in backtest ensuring it is switched back off if used

                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

                S
                C
                F
                W

                13
                Online

                146.8k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors