fxDreema

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

    Code trading week of the month

    Questions & Answers
    2
    8
    956
    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.
    • S
      Stomper last edited by

      So I need help.

      I cannot think of the way to code the trading week of the month.

      So if month starts on the weekend, then first trading week is on Monday.

      If Month starts with any tradign day, then its counted as 1st and after weekend 2nd trading week.

      What I need is exactly 3rd week but I am having issues creating loops or any condition to find it. Please help!

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

        @stomper I would use the monthly/weekly bars as a shortcut.
        Find the time of monthly open, then count how many weekly bars come after that

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

          Got any loop examples? I am still struggling. Made so much of complex EAs but I feel like a total noob now not being able to replicate this easy stuff...

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

            @stomper this should work https://fxdreema.com/shared/i26fYyN2d

            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

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

              Would it work for mq5?

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

                @roar Forgot to tag you but check question above.

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

                  @stomper yeah, I guess

                  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

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

                    @roar It works. thanks a lot. it was simple as that but sometimes you get stuck on stuff like this...

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

                    Online Users

                    C
                    M
                    P
                    R
                    S
                    E
                    M

                    18
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors