fxDreema

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

    Trend Drawdown in a given period

    Questions & Answers
    3
    5
    1703
    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.
    • J
      juxta14 last edited by

      I am trying to show Trend draw down on a chart.
      First I look at the chart and determine the trend direction.
      Note, am only looking at the last 200 bars on the right side of the chart.
      If price of candle ID 1 is greater than price of candle ID 200 then trend is up, if candle 1 is less than 200 then trend is down.
      Now looking at the chat below the trend is up and there is a bit of drawdown indicated by the blue line.
      (0_1514874947791_CHFJPYM15.png image url)
      That Trend draw down identified by the blue line is what I want the EA to draw for me.
      Here is what I have coded so far but itโ€™s not working as intended.
      https://fxdreema.com/shared/NwuBizIsc
      My question is how to manipulate the blocks to show the biggest draw down or pull back in a trend.
      Thanks for the help.

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

        You need to give more information, what it is exactly you are trying to do.

        Is the blue line = close of candle id 200 to lowest/highest point of last 200?

        Why are you comparing id 1 and id 200? Wouldn't using MA rising/falling a more confident way? ๐Ÿ˜„

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        1 Reply Last reply Reply Quote 0
        • J
          juxta14 last edited by

          What am trying to do is simple.

          I look at the last 200 bars on a chart on any time frame.

          Within those 200 bars I look for the direction of the trend, which is sometimes obvious and on a choppy chart not so obvious.

          In other to determine the trend I have decided to look at close price of bar 1 and bar 200. If bar 1 > bar 200; uptrend. If bar 1 < bar 200; downtrend.

          So the blue line is supposed to be the biggest retracement within the last 200 bars which is the highest high to the next lowest low before the chart continues in the upward trend.

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

            When it comes to looking at the past candles and make some calculations, and then print something on the chart, this is clearly a job for some custom indicator. Unfortunately I can't offer indicators builder. In theory it can be done in the EA as well, but it will be not optimized at least. The code in the custom indicators is structured a little bit differently, so new calculations are made only when needed. It's much harder to do something like this in an EA.

            1 Reply Last reply Reply Quote 0
            • J
              juxta14 last edited by

              Fair enough, I understand. Thanks for the response.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              Online Users

              K
              S
              M

              13
              Online

              146.8k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors