fxDreema

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

    Adjusting EMA OCO limit take profit level every new bar

    Questions & Answers
    2
    4
    111
    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
      DV4 last edited by

      Hi,

      I have a simple strategy that uses an EMA as the profit target, when the order is opened it sets it at the previous candles ema price level,

      I would like to get my EA to adjust this with every new bar to the last candles (-1) EMA value so that as it declines the preset target is adjusted down

      Reasons being that at present if the internet or platform crashes, there is no fallback to take any profit, also having preset targets allows you to specify whether bid or ask prices trigger the exit taking into account the spread in real time

      Can anyone offer some help?
      I've built some basic EA's that operate as intended, but still a relative beginner....

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

        This should do it, once per bar - pink for each - modify stops (set as original to EMA)

        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
          DV4 last edited by

          Thank you jstap... perfect!

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

            @DV4 -- 👍

            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
            M
            J
            5
            C

            14
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors