fxDreema

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

    How to hourly enter?...

    Questions & Answers
    3
    8
    2742
    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.
    • A
      alessandromagno last edited by

      Hi guys i'm very newbie here. I like a lot fxdreema but i have to learn.
      I'm trying to build a very simple EA which opens BUY orders at the beginning of new candle on H1 at 4:00, 5:00, 15:00, 17:00, 20:00 GMT; and SELL at 0:00, 1:00, 3:00, 7:00, 21:00, 23:00 GMT. No TP, no SL, just exit at the end of the candle.

      Is it right if i use 2 hour filter function for "buy now" (because each allows only 4 periods when i need 5), and 2 for "sell now"?

      0_1516140577020_Screenshot-2018-1-16 unnamed.png

      Thanks

      D 1 Reply Last reply Reply Quote 0
      • D
        Dieter @alessandromagno last edited by Dieter

        @alessandromagno I do it on this way: I like to controle the server time for my timezone becaus of my broker has the same one! There are a lot of possibilities.....
        0_1516199371184_734dae64-eca9-4826-ba66-e7e3031f9fe1-grafik.png

        A 1 Reply Last reply Reply Quote 0
        • A
          alessandromagno @Dieter last edited by

          @dieter

          Thanks man. Now for the closing trade at the end of the candle what should i do?

          D 1 Reply Last reply Reply Quote 0
          • D
            Dieter @alessandromagno last edited by Dieter

            @alessandromagno ...try these for the Buy-side and check candle ID; you can delete the block 'For each Trade'; TIPP: NEVER EVER without STOP!!!!!!!!
            good luck!

            0_1516206673447_6559ad30-7afb-4bf6-bb8b-390ee67e5bca-grafik.png

            A 1 Reply Last reply Reply Quote 0
            • A
              alessandromagno @Dieter last edited by

              @dieter
              Man with that exit method it opens and close the trades at the same time, not at the end of candle...

              meanwhile i'm trying but with poor results. Here you can see what i'm building, but it only sometimes enters a trade at the beginnings, and most of the times it closes after many candles

              https://fxdreema.com/shared/GOj9xqond

              i'm struggling to find what is going wrong. You can see many start not at the beginning and many close after some candles...
              0_1516364637039_Senza titolo1.jpeg

              D 1 Reply Last reply Reply Quote 0
              • D
                Dieter @alessandromagno last edited by Dieter

                @alessandromagno
                Dear,
                I have attached the mql for the easiest way (Buy-Side: Sell-Side it´s up to you 🙂 ). But it's better to use the FXDREEMA help in the long run and understand what's going on in the blocks - Software-Structure for big projects - Have fun with your studying.

                1_1516442680981_candlecloseDieter.mq4 0_1516442680981_candlecloseDieter.ex4

                0_1516442386186_c5f85cd5-a34c-47a0-bd62-559986783e6a-grafik.png

                1 Reply Last reply Reply Quote 0
                • S
                  Sonric_Rich last edited by

                  If the rules are as simple as you state - here's what you are after
                  https://fxdreema.com/shared/QfzAfqTJb

                  It uses the Expiration of the order to close itself.

                  Because some of your periods are consecutive we can set the hour filter to extend for the 2 periods and by using the Once per bar then it will on perform the buy or sell once in the period.
                  As you can only set 4 period filters in the Hours Filter the Sell one has one more block to handle the extra.

                  The expirations are "1 hour from the time of the order" which may actually then be a fraction after the candle closes but should be pretty close. You could change it so that it expired 59 mins instead.

                  I just set the time stuff and conditions to GMT so you may need to vary those according to your requirements.

                  1 Reply Last reply Reply Quote 0
                  • A
                    alessandromagno last edited by

                    thank you guys for the help. I'll give a try on both to see which performs better!

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

                    Online Users

                    L
                    K
                    H
                    N

                    13
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors