Usingthe MQL5 Wizard, I made an Expert Advisor withthe IntradayTimeFilterfunction(SignalITF.mgh).
There isan option toallow (disallow) trading time defined in hours:
"BadHoursOfDay".
In the help it says:
"Bit field, each bit of which corresponds to one hour in a day (0 bits - 0 hour, ..., 23 bits - 23 hour). If the bit value is 0, trading signals are enabled for the corresponding hour. If the bit value is 1, trading signals are not allowed during the corresponding hour. The specified number is represented as a binary number and is used as a bitmask.
Prohibited clocks have priority over allowed clocks."
Can you please tell me in plain language, without slang, how to set the allowed hours from 08h to 20h?
Вы хотите быстро проверить торговую идею, не тратя времени на программирование? Выберите в "Мастере MQL5" нужный тип торговых сигналов, подключите модули сопровождения позиций и управления капиталом - на этом вся работа закончена. Создайте свои реализации модулей или закажите их через сервис "Работа" - и комбинируйте новые модули с уже существующими.
Sergey5: "A bit field, each bit of which corresponds to an hour in a day (0 bits are 0 hours, ..., 23 bits are 23 hours). If the bit value is 0, trading signals are enabled for the corresponding hour. If the bit value is 1, trading signals are not allowed during the corresponding hour. The specified number is represented as a binary number and is used as a bitmask.
Prohibited hours have priority over permitted hours."
Can you please tell me in plain language, without any slang, how to set the allowed hours from 08 hours to 20 hours?
for starters - do you know what a bit and a byte are? (believe me, this is not slang)
sergeev: no, this is a question for me to understand what words to use to explain the meaning of the bitmask to you (trust me, this is not slang)
I would like to keep it simple - in the compiled EA in the "Parameters" section you have to set theBadHoursOfDay variable to the values that determine the trading hours.
I tried to set different numbers and the test shows that there is no trading at certain hours.
But I can't figure out how to set the required times correctly.
What numbers to enter in this field, so that the trade is only conducted from 08 to 20 hours.
If the bit value is 0, trading signals are allowed in the corresponding hour. If the bit value is 1, trading signals are prohibited in the corresponding hour.
sergeev: If the value of this bit is 0, trading signals are allowed in the corresponding hour. If the bit value is 1, trading signals are not allowed in the corresponding hour.
But there is only one line and how do I write this period in it?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Good afternoon.
Usingthe MQL5 Wizard, I made an Expert Advisor withthe IntradayTimeFilterfunction(SignalITF.mgh).
There isan option toallow (disallow) trading time defined in hours:
"BadHoursOfDay".
In the help it says:
"Bit field, each bit of which corresponds to one hour in a day (0 bits - 0 hour, ..., 23 bits - 23 hour). If the bit value is 0, trading signals are enabled for the corresponding hour. If the bit value is 1, trading signals are not allowed during the corresponding hour. The specified number is represented as a binary number and is used as a bitmask.
Prohibited clocks have priority over allowed clocks."
Can you please tell me in plain language, without slang, how to set the allowed hours from 08h to 20h?
"A bit field, each bit of which corresponds to an hour in a day (0 bits are 0 hours, ..., 23 bits are 23 hours). If the bit value is 0, trading signals are enabled for the corresponding hour. If the bit value is 1, trading signals are not allowed during the corresponding hour. The specified number is represented as a binary number and is used as a bitmask.
Prohibited hours have priority over permitted hours."
Can you please tell me in plain language, without any slang, how to set the allowed hours from 08 hours to 20 hours?
for a start - do you know what a bit and a byte are? (believe me, this is not slang)
is that a rhetorical question?)
no, this is a question for me to understand what words to use to explain the meaning of the bitmask to you (trust me, this is not slang)
I would like to keep it simple - in the compiled EA in the "Parameters" section you have to set theBadHoursOfDay variable to the values that determine the trading hours.
I tried to set different numbers and the test shows that there is no trading at certain hours.
But I can't figure out how to set the required times correctly.
Fellow experts.
Help for a newcomer.
What numbers to enter in this field, so that the trade is only conducted from 08 to 20 hours.
Fellow experts.
Help for a newcomer.
What numbers to enter in this field, so that the trade is only conducted from 08 to 20 hours.
Fellow experts.
Help for a newcomer.
What numbers to enter in this field, so that trading will only take place between 08:00 and 20:00.
Why don't you ask the author of the code? He knows exactly what to do...
If the value of this bit is 0, trading signals are allowed in the corresponding hour. If the bit value is 1, trading signals are not allowed in the corresponding hour.
Why don't you ask the author of the code? He knows exactly what's what...