
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
I still haven't figured out how to get adequate information from DayOfWeek. It gives the correct value on the day the robot starts and in some other cases (sometimes). It seems to me that it gives out a correct value when I open orders. If you don't open anything, it will give you the weather.
I have solved the problem this way:
But I haven't tested it yet )))) It should work.
I still haven't figured out how to get adequate information from DayOfWeek. It gives the correct value on the day the robot starts and in some other cases (sometimes). It seems to me that it gives out a correct value when I open orders. If you don't open anything, it will give you the weather.
I have solved the problem this way:
But I haven't tested it yet ))) It should work.
It's easier - use TimeDayOfWeek:
In this way you will only get the permission status of the instrument to trade. If the instrument is traded, you will get true for it any day of the week.
Alert(bool(MarketInfo(Symbol(),MODE_TRADEALLOWED));
false
Alert(bool(MarketInfo(Symbol(),MODE_TRADEALLOWED));
false
My version is as follows:
Result:
On my computer the time is GMT+2.
That's why I don't understand how you managed to get false in the first case. Perhaps, you took an instrument that is not traded in principle.
The following are the conclusions:
My version is this:
Result:
On my computer the time is GMT+2.
It is therefore not clear how you managed to get false on the first option. Perhaps, you took an instrument that is not traded in principle.
The following are the conclusions:
EURUSD fxOpen
Indeed, this broker has the result of the script above:
Started checking other brokers. Broker G**X:
Broker A***i:
Broker I***a F***x:
My first test today was on A*****l M*****s.
Thus, we get that not all brokers have correctly working IsTradeAllowed (first version) and MODE_TRADEALLOWED. And on the other hand, the second version of IsTradeAllowed works correctly everywhere. So, it is better to use it.
Indeed, this broker has the result of the script above:
Started checking other brokers. Broker G**X:
Broker A***i:
Broker I***a F***x:
My first test today was on A*****l M*****s.
Thus, we get that not all brokers have correctly working IsTradeAllowed (first version) and MODE_TRADEALLOWED. And on the other hand, the second version of IsTradeAllowed works correctly everywhere. So, it is better to use it.
And today
IsTradeAllowed(Symbol(), TimeCurrent())
it shows cowardly
By the way, why do you have Local time?
And today
IsTradeAllowed(Symbol(), TimeCurrent())
shows cowardly
By the way why do you have Local time?
It's a holiday weekend, so it's hard.
The fact is that none of the recognition functions work 100%.