
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
What happens if multiple EAs use the cache at the same time?
Calendar cache-file is normally read just once at MQL-program startup and then the cache is served from memory, but if you want be 100% sure there will be no conflicts, you can modify source code in CalendarCache.mqh a bit, where the file opens:
To access the cache from multiple tester agents you can place it in the common folder, but this is applicable only for local PC optimizations.
You don't need my indicator for your EA backtesting, I only asked about it because it's known to work on ordinary brokers (see below), and you could make a subtle modification to the source code which inteferes. Indicators can be tested standalone in the tester in visual mode.
Quality of 3-rd party ticks, as well as quotes segmentation (alignment by day/week boundary) can be tricky and non-standard in history of some brokers - then the empirical method used for autodetection of timezone will fail.
Do i need to run in online mode always when using live and do i need one cache per EA?
Online you don't need a cache - read calendar directly (the lib can do it transparently just to keep the source code unified).
A single cache per PC is enough, or you can prefer to have separate caches for each terminal instance.
Create new cache just before you are going to do tests/optimizations up to current date.
Online you don't need a cache - read calendar directly (the lib can do it transparently just to keep the source code unified).
A single cache per PC is enough, or you can prefer to have separate caches for each terminal instance.
Create new cache just before you are going to do tests/optimizations up to current date.
OK thx!
Online you don't need a cache - read calendar directly (the lib can do it transparently just to keep the source code unified).
A single cache per PC is enough, or you can prefer to have separate caches for each terminal instance.
Create new cache just before you are going to do tests/optimizations up to current date.
I'm currently always create a new cache in case an EA starts not in tester. But this seems to result in the following errors:
I'm currently always create a new cache in case an EA starts not in tester. But this seems to result in the following errors:
Can you send a short source code to reproduce the problem?
The error "Can't read quotes for" comes from TimeServerDST.mqh and means that you, most likely, call it with somewhat incorrect parameters, for example which asks for future quotes. Also make sure the terminal is connected and the work symbol is synchronized when you call the lib.
In the CalendarCache.mqh try to edit the line 159:
Can you send a short source code to reproduce the problem?
The error "Can't read quotes for" comes from TimeServerDST.mqh and means that you, most likely, call it with somewhat incorrect parameters, for example which asks for future quotes. Also make sure the terminal is connected and the work symbol is synchronized when you call the lib.
In the CalendarCache.mqh try to edit the line 159:
yes sure no problem. The no quotes error happens also for very old dates and it happens between FixCachedTimesBySymbolHistory and Newsfilter: using online mode - i've a feeling that there are too many requests tot the online calendar to broker.
Code is this:
yes sure no problem. The no quotes error happens also for very old dates and it happens between FixCachedTimesBySymbolHistory and Newsfilter: using online mode - i've a feeling that there are too many requests tot the online calendar to broker.
Code is this:
Without a context (how the fragment is called), settings, and logs, it's hard to deduce what can be wrong, apart from the fact that CopyTime function can really fail - it does not mean that the lib violates something. According to your current report, this completely legitimate line fails:
I meant that you could provide a complete test EA to reproduce the problem.
Alternatively, since you have the source codes, you can set the breakpoint at the line in TimeServerDST.mqh, where the message is printed out, and then run your program under debugger. When/if the problem appears, your code will fall into debugger, and you can check what's wrong.
Probably, there is something special in your environment (work instrument, temporary connection loss, etc.).