Questions from Beginners MQL5 MT5 MetaTrader 5 - page 130
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
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...