Hello fxDreema.
Is there a more practical way of not opening operations on the last day of each month?
Hello fxDreema.
Is there a more practical way of not opening operations on the last day of each month?
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.
How do I do this?
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).
Maybe the answer is here: https://www.mql5.com/en/articles/599#more_functions
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
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.
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.
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!
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 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/marketinfoconstantsHow 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.
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
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?
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 ...
I added these options in Condition - Market properties - Symbol Trade Time. I have no idea whether it works or not
@fxDreema Oba! I'll be taking the test as soon as possible!
At first I thought I'd try it this way:
What do you think?
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...)
@fxDreema So, cite a correct way to use it
Again, I don't even know what these futures are. I don't know how to work with them.