fxDreema

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

    Do not open position on the last day of the month.

    Questions & Answers
    3
    19
    4442
    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.
    • tcanuto
      tcanuto last edited by

      Hello fxDreema.

      Is there a more practical way of not opening operations on the last day of each month?

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

        There are many time filters, but the last day of the month... maybe if you ask somewhere if tomorrow's date is 1st, but you will not find such things in the blocks. Some function can be written to tell you that, something that contains TimeCurrent() and other time function.

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

          How do I do this?

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

            Well, I don't know the exact calculations. If I have to do this, I would start experimenting. I'm very slow to do that, especially with time functions where everything is based on 60 and 12, but this is what I think it will do the job. You want to know it tomorrow's day is 1, otherwise I don't know how to tell if today is the last day of the month (although there must be a way to do that).

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

              Maybe the answer is here: https://www.mql5.com/en/articles/599#more_functions

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

                Maybe. The thing is that these functions does not exist in fxDreema, I never added such function and I never needed them before. But you can try to add them in Studio

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

                  Unfortunately, I still do not have the qualification for this. I hope someone here from the Forum can help do this for all us fxDreema users.

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

                    You are here for a looong time, I even know your name. Why don't you take some time to learn programming basics, it's not that hard to understand variables, if, for and functions. This can only help you in future 🙂

                    Otherwise if you have function like this, you basically hit that "New" button near "Custom functions" in the studio and throw that code in there. Then you should be able to use this function in the blocks.

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

                      It's true. I also do not say your name in public, but we have already exchanged private messages. You know me very well because of the difficulty of understanding what I write translated from google translator! Lol I also thank you for adding Ryan Jones Risk Management, which I find very interesting, and which I have used manually along with basic risk management.
                      Yes ... I think a lot about taking a mql5 course and I hope to do it as soon as possible.
                      Maybe I will not help you too, right?

                      Thank you!

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

                        Hello fxDreema.

                        Another way that I believe to be possible is:

                        I would like to filter the expiration day of the future dollar contract, for example, and in mql5 it is identified as SYMBOL_EXPIRATION_TIME
                        Description: Date of the symbol trade end (usually used for futures)
                        Type: datetime
                        https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants

                        How to use it?

                        I believe you will need the Custom MQL5 code block

                        tcanuto 1 Reply Last reply Reply Quote 0
                        • tcanuto
                          tcanuto @tcanuto last edited by tcanuto

                          @tcanuto said in Do not open position on the last day of the month.:

                          Hello fxDreema.

                          Another way that I believe to be possible is:

                          I would like to filter the expiration day of the future dollar contract, for example, and in mql5 it is identified as SYMBOL_EXPIRATION_TIME
                          Description: Date of the symbol trade end (usually used for futures)
                          Type: datetime
                          https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants

                          How to use it?

                          I believe you will need the Custom MQL5 code block

                          Look at this ... maybe it's something interesting to include in Time Filters blocks, for example.

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

                            I have no idea what this is. And by the way I have no idea what futures are 😄 I know it's stupid, but I'm not a serious trader and when I trade, I do it on currencies. So I don't know why these futures need such expiration time and what is this time anyway 🙂

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

                              Yes. They expire and have daily adjustments in prices, because the market has opening and closing times daily.

                              How do I do this here on fxDreema?

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

                                you can create it using custom code or custom block - this I advice you only for trustly strategies, you can invest here a lot of time because it is hand-typing code ...
                                custom code you can create directly in Custom code block ...
                                or custom block you can create in studio where you can also create own functions, but it is more complicated ...

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

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

                                  I added these options in Condition - Market properties - Symbol Trade Time. I have no idea whether it works or not 🙂

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

                                    @fxDreema Oba! I'll be taking the test as soon as possible!

                                    At first I thought I'd try it this way:
                                    0_1485527070638_Captura de tela de 2017-01-27 11:23:28.png

                                    What do you think?

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

                                      I think that ticks count and the time are totally different things. Expiration time is "datetime", meaning the number of seconds since 1-January-1970.
                                      Ticks from start... this is something that I implemented and it is what it says - the amount of ticks since the EA was added to the chart (1, 2, 3, 4, .... 789, 790...)

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

                                        @fxDreema So, cite a correct way to use it

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

                                          Again, I don't even know what these futures are. I don't know how to work with them.

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

                                          Online Users

                                          A
                                          E
                                          K
                                          J
                                          J
                                          G

                                          20
                                          Online

                                          146.7k
                                          Users

                                          22.4k
                                          Topics

                                          122.6k
                                          Posts

                                          Powered by NodeBB Forums | Contributors