if (MQLInfoInteger(MQL_TESTER)) // If working in Tester
{
Res = Calendar.Load(CALENDAR_FILENAME);
Print ("SIZE = ", Calendar.Set(NULL,CALENDAR_IMPORTANCE_NONE, 0, 0));
...
Hello. Is it possible to shift the calendar to a certain time?
The calendar is downloaded in one terminal (with one timezone), but will be used (MT4) in a terminal with a different timezone. It turns out that it is necessary to correct the time in the calendar somehow.
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.
Forum on trading, automated trading systems and testing trading strategies
Libraries: Calendar
TradingProFX, 2024.10.30 13:12
Why do I get 0 in the tester?
Zero To-parameter.
Set() method for MT5 only. How to initialise and download news for MT4?
How is it done for MT5 tester.
Calendar.Load(CALENDAR_FILENAME); Calendar.FilterByCurrency(Symbol());After Load I get: CALENDAR{ Events:[197684] }
And after FilterByCurrency: CALENDAR{ Events:[] }
Symbol() = EURUSD
I don't understand anything. Attach compiled mq4/5.
I don't understand anything. Attach compiled mq4/5.
FilterByCurrency does not work. An empty array is received after calling FilterByCurrency().
The code is simple
After Calendar.Load in the debugger I see CALENDAR{ Events:[197684] }
And after Calendar.FilterByCurrency(Symbol()): CALENDAR{ Events:[] }
2025.04.02 21:59:59.444 EURUSD,H1: size: 0
2025.04.02 21:59:56.772 EURUSD,H1: size: 197684
An empty array is obtained after calling FilterByCurrency().
This is a filter by currency, not by symbol.
Open Calendar.mqh in ME and press ALT+M.
This is a filter by currency, not by character.
got it
Hello. Is it possible to shift the calendar to a certain time?
The calendar is downloaded in one terminal (with one timezone), but will be used (MT4) in a terminal with a different timezone. It turns out that it is necessary to correct the time in the calendar somehow.