fxDreema

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

    Day of month filter

    Questions & Answers
    4
    10
    1744
    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.
    • N
      nmbruno last edited by

      Hi, I am trying to think of how to program a filter that will block trades on the first friday of each month, but keep trading the rest of the fridays.
      I was thinking something like...

      if (day of month <= 7) and if(weekday == friday)
      then trading = inactive

      else
      trading = active

      I see the weekday filter, but none for the day of the month. Any advice?

      thanks

      1 Reply Last reply Reply Quote 0
      • N
        nmbruno last edited by

        Perhaps I could use hours filter in combo with the weekday filter?

        i.e. if hours from start of month <=168 && if weeday == friday)
        no trade

        else trade??

        would this work?

        I would need to make a variable for the time at the start of each month

        1 Reply Last reply Reply Quote 0
        • l'andorrà
          l'andorrà last edited by

          Is the first day of teh month the only one to be blocked? Why then are Fridays excluded?

          (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

          (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

          (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

          1 Reply Last reply Reply Quote 0
          • N
            nmbruno last edited by

            No, I want the first friday of the month to be blocked. all other days are OK

            1 Reply Last reply Reply Quote 0
            • N
              nmbruno last edited by

              Anyone have any idea?

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

                @nmbruno mql4 documentation is often helpful 😉
                https://docs.mql4.com/dateandtime/month

                Put Month() into a variable once a week (once a bar, period 1W) and when Month() is != than that variable, new month must have been started

                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

                roar 1 Reply Last reply Reply Quote 2
                • roar
                  roar @roar last edited by

                  @roar oh, now that I think of it, this may be easier done with that once per bar trick

                  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
                  • l'andorrà
                    l'andorrà last edited by

                    But what about the fridays?

                    (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                    (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                    (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

                    roar 1 Reply Last reply Reply Quote 0
                    • roar
                      roar @l'andorrà last edited by

                      @l-andorrà there's a weekday filter, as he said

                      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
                      • Julianrob
                        Julianrob last edited by Julianrob

                        Hey, I know this post is old, but I found a simple solution which I want to share - If you want to prevent trading on the non-farm payroll day, or first Friday of the month, use these two time filters together:

                        Time filter, specify day start and finish, AND weekday filter, allow Friday. So if both these conditions are true, then you can link them to exclude from trading. It should only exclude Friday which falls on day 1 to 7 of the month.

                        I'm pretty sure this is working now

                        b226d4ce-c2b5-4fe1-a832-98af535f9f45-image.png

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

                        Online Users

                        G
                        Y
                        C
                        S
                        S
                        S
                        A

                        26
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors