fxDreema

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

    Buying/Selling at the highest/lowest price of the last 21 days

    Questions & Answers
    3
    7
    3154
    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.
    • R
      Ringman last edited by

      Hi, I have been trying for weeks to get this EA to work and tried absolutely everything I can, with no joy. Its a simple EA, I want to buy when the current price goes higher than the previous high price of the last 21 days and to sell when the opposite happens. No take profit and a stop loss of twice the 14 day ATR. The trade will close after the buy trade crosses the lowest price of the last 10 days and the opposite for selling. I feel like I am close, however it is just the condition blocks which are not working and I don't understand why, Thank you. (the trace is so I can see the trades are taken/closed at the right points)

      https://fxdreema.com/shared/0r2jpxple

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

        few weeks vs. few minutes ...
        have a fun ...

        https://fxdreema.com/shared/MVZx7AdMb

        0_1481510456514_upload-e2ae3eff-beff-445c-bd6e-dad72750975a

        Between trading and gambling is a very small gap, be careful.

        1 Reply Last reply Reply Quote 1
        • R
          Ringman last edited by

          Hi, thank you for that, so quick! It is certainly is getting closer. There seem to lots of trades opening on each candle (day).

          0_1481577828472_System X.jpg

          I am trying to get a buy trade to open when it hits the blue line which is the highest price of the last 21 days, and only one to
          open. I want the trade to stay open until it drops and crosses the lowest price of the last 10 days which is the opposite red line. The same for the sell trades but the reverse, i.e. one sell trade to open when it hits the lowest blue line and then to close when it rises past the 10 day price high, the opposite red line.

          It is meant to be a trend/breakout system on a daily chart.

          Thank you

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

            all you described can be easily done, behind this closing can be trailing (and ofc. missing block for filtering - once per bar - daily if you will one trade per daily candle - placed before block for opening trade), look here (trailing is off, you can turn on if you will) :
            https://fxdreema.com/shared/f3F0AWBF
            it is also example how to make closing on opposite situation with period 10 for highest/lowest ...

            Between trading and gambling is a very small gap, be careful.

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

              I feel that every 5th person have the same trouble with multiple trades these days 🙂

              Always remember this - when blocks are positioned under "on Tick", this means that they run on every tick! Well, those on the top.

              Also remember this - blocks like "Buy now" create a new trade every time they run, every time! So the idea is to prevent these blocks from running on every tick. That's why we put those "No trade", "Once per bar" and similar stuff above them.

              Exactly the same is true for "Close trades" block - this one would close trades when it runs, every time. So this one also needs some extra blocks on top... sometimes.

              Here in this example the number of blocks is small, but still everything works fine: https://fxdreema.com/demo/mt4-buy-sell-buy-sell-opposite-conditions

              1 Reply Last reply Reply Quote 1
              • R
                Ringman last edited by

                Wow you are a genius! That is what I have been trying to do. With the trailing stop I have set it to what I thought was 2 x the 14 day ATR. However is seems to be a lot less than that. I adjusted it with *2 so not sure why?

                Thank you

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

                  Trailing stop blocks should run on every tick, their place is not under Buy now or Sell now - https://fxdreema.com/demo/mt4-trailing-stop

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

                  Online Users

                  F
                  A
                  V

                  9
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors