Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1134
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello!
Help me out here. I have a question about the trading signal module "Time filter".
The thing is, I have generated an EA using this module and set it to allow only one hour of trading per day. It mainly trades that way, but there are days when my Expert Advisor opens positions at whatever hour it wants. I have tried the "Time filter" trading signal module in various combinations with other trading signal modules (e.g., Stochastic, WPR, etc.) but the same thing happens. Moreover, if you set 2 consecutive hours of work allowed, there are no problems, it works fine.
What can it be related to? Maybe there is an error in the code of a trading signal module "Time filter"? Since I'm not an expert in programming, I'm asking you to help me figure it out or give me a hint, maybe I am doing something wrong.
Sincerely, Vladimir.
Here is a simple example on the picture. On one day, it opens at 7 o'clock; on another day, it opens at 5 o'clock; on the third day, it opens at 7 o'clock again.
Can you attach an mq5 Expert Advisor to this post and specify the tester parameters (two screenshots: Settings and Parameters tabs)?
Hello, Could you please tell me. How do I correctly spell the condition: *if there is a new hour*?
Do you mean the time (e.g. the clock showed 15-00) or do you mean a new bar was born on the H1 timeframe?
Forum on Trading, Automated Trading Systems and Strategy Tests
FAQ from Beginners MQL5 MT5 MetaTrader 5
Vladimir Karputov, 2019.10.14 12:04
Can you attach an mq5 Expert Advisor to a message and specify the tester's parameters (two screenshots: Settings and Parameters tabs)?
Not to be unfounded, for example, right now I generated in MQL5 Wizard the first available module of AMA trading signals and a time filter.
Screenshot of "Settings"
Screenshot of "Settings".
Screenshot ofthe incorrect of the time filter (positions are opened on different days at 7, 12 and 7 o'clock)
So as not to be unfounded, for example, right now I generated in MQL5 Wizard the first available module of AMA trading signals and a time filter.
Screenshot of "Settings"
Screenshot of "Settings".
Screenshot of the incorrect operation of the time filter (opening positions on different days at 7, 12 and 7 o'clock)
1. Picture with a chart - when taking a screenshot, do it with "Crosshair" tool - it is unclear which year it is.
2. When working with the pending orders - remember that the pending order can trigger at a completely different time (hour and minutes) relative to the time of setting.
3. When using signal modules, reset the parameters to default values and check the work on the market - without any pending orders (if point 2 is not clear).
Forum on Trading, Automated Trading Systems and Strategy Tests
FAQ from Beginners MQL5 MT5 MetaTrader 5
Vladimir Karputov, 2019.10.14 13:28
1. Chart picture - when making a screnshot do it together with "Crosshair" tool - otherwise it is not clear which year.
2. When working with pending orders - remember that a pending order can trigger at a completely different time (hour and minutes) in relation to the time of placing.
3. When using signal modules, reset the parameters to default values and check the work on the market - without the pending orders (this is if point 2 is not clear).
1. About the crosshair - understandable. In the screenshot the year is 2019 and the month is October.
2. I do not quite understand about the pending order. How do you know that the EA has a pending order and does not open a position at the beginning of the hour? Can you be more specific?
3. The Expert Advisor works fine with default values of signal modules. Can we modify the parameter values?
Sincerely, Vladimir.
***
1. Regarding the crosshairs, it is clear. In the screenshot, the year is 2019 and the month is October.
***
Thanks for the clarification.
2. I do not quite understand about the pending order. How did you determine that the EA has set a pending order and not open a position immediately at the start of the hour? Can you be more specific?
***
In the visual tester, just look at the "History" tab
3. With the default values of the signal modules, the Expert Advisor works fine. Is it not possible to change the values of the parameters?
***
Of course you can, but only if you understand what you are doing and if you understand what parameter is responsible for what.
Do you mean the time (e.g. the clock showed 15-00) or do you mean a new bar was born on the H1 timeframe?
I mean, the clock showed 15-00.
And with what degree of certainty do you want the result?
Just an example: You want to see the time on the clock as 3pm. And you wait for it. But at that time there was no tick or there was no connection to the server. And then you got the ticks, but the time is 15 hours 00 minutes and 36 seconds. What will you do?
And with what degree of certainty do you want the result?
Just an example: You want to see the time on the clock as 3pm. And you wait for it. But at that time there was no tick or there was no connection to the server. And then you got the ticks, but the time is 15 hours 00 minutes and 36 seconds. What will you do?