fxDreema

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

    Creating EA to buy when price crosses below Bollinger Band

    Questions & Answers
    4
    6
    3371
    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
      Drchip last edited by

      Hi all,

      I want to build an EA that simply buys when price crosses a lower bollinger band. I thought this would0_1488304481374_Chip_Buy.mq4 be pretty straight forward. Here is my file.

      But when I run it ion MT4, it is missing lots of opportunities which match the condition.

      Any help, much appreciated.

      Jon

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

        can you create shared link to your strategy?

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

        1 Reply Last reply Reply Quote 0
        • Abade69
          Abade69 @Drchip last edited by

          @Drchip The "crosses above" and "crosses below" are subjected to gaps in data (in case you were testing it in backtester). You could try to run it on "ticks" rather than "control points". Also, they don't work so well if you choose Candle ID 0 (you may use greater than (>) or less than (<) instead).

          Don't forget to check if your Candle ID's matches your entry idea (for the candle cross and the bollinger band in the condition blocks).

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

            I don't know if something is wrong with the project, but I see "Digits count" on the left side of that Condition block. Digits count is a number such as 4 or 5 and it can't be compared with a price value (that comes from the bollinger bands).

            Here is more information about the crossover in Condition block: https://fxdreema.com/help/working-with/crossover

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

              Hi all,

              Many thanks for your responses here. I've had a look over the advice but unfortunately I'm still struggling a bit. See the two pictures below. When I test the program in MT4 it picks up one of the instances when price moves below the Bollinger Bands but not the other instances and I have no idea why!

              I've put a screen shot in of the code also.

              Wondering if this has anything to do with testing at H4 timeframe?

              Any help much appreciated.

              Thanks

              Chip

              0_1488639559151_Code.png

              0_1488639570923_Results.png

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

                This way of connecting blocks (under "on Tick") should produce multiple buy trades, not just one. Why do you get only 1 trade?

                You don't actually need that "Once per tick" block. Note that this block is a filter, not a driver. This block does not make the following blocks to run once per tick. Well, this is exactly what will happen if you have it under "on Tick", but for other reason. The way this block works is very similar to the way "OR" block works.

                I don't know why don't get multiple trades, but block "No trade" is most probably needed at the top.

                What do you want to happen? Because I don't really understand, something is missing for me...

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

                Online Users

                E
                J
                T
                J
                B

                16
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors