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
Just above you wrote:
That may have been the intention, but... Doing a field experiment (build 358).
I delete all symbols from folder "C:\Program Files\MetaTrader 5\Bases\Alpari-Demo\history"
I connect to Alpari-Demo (terminal has 5 open charts: EURUSD H1, EURCHF H1, USDJPY H1, GPBUSD H1+M1).
A few minutes later I can see the picture (history is still being downloaded):
Contents of the folder C:\Program Files\MetaTrader 5\Bases\Alpari-Demo\history
...
If I understand correctly, the size of history files is in the terminal directory, which is indicated by the location of the "working" directory - C:\Program Files\MetaTrader 5\Bases\Alpari-Demo\history\EURJPY
The tester has its own folder for this data - C:\Program Files\MetaTrader 5\tester\Agent(number of agents)\bases\DC or another broker (server)\history\....
What is the problem then?
The problem is the unwillingness to read the original message carefully ;)
There are really 2 files (2009, 2010) in tester folder, but at first start of the tester for a specific symbol the whole history is downloaded (if it hasn't been downloaded or deleted before) to folder "x:\Program Files\MetaTrader 5\Bases\...", and until this information is completely downloaded, testing doesn't start.
I don't mind duplicating data from\MetaTrader 5\Bases\ into MetaTrader 5\tester\Agent(by number of agents)\bases, as I understand that this is a snapshot of tick state to ensure absolute identity of quotes during optimization enumeration. But why upload data that is absolutely unnecessary at the moment?
The problem is the unwillingness to read the original post carefully ;)
There are really 2 files (2009, 2010) in tester folder, but at first launch of the tester at a specific symbol the whole history is downloaded (if it has not been downloaded or deleted before) to "x:\Program Files\MetaTrader 5\Bases\..." folder, and until it fills this unnecessary information, testing will not start.
I don't mind duplicating data from\MetaTrader 5\Bases\ into MetaTrader 5\tester\Agent(by number of agents)\bases, as I understand that this is a snapshot of tick state to ensure absolute identity of quotes during optimization enumeration. But why upload data that is absolutely unnecessary at the moment?
The history is uploaded correctly - it means that there was a request for 2004. And when using the tester, the entire history is definitely and correctly uploaded to the maximum depth - this is an absolutely correct and conscious decision. Just look at the "incomprehensible" exclamations of MT4 users to understand - if we do not take care of the history, then users will not even be able to control the history.
Reread my reply again, please.
We don't just download and double-check all the history. If a tester is used, it will inevitably (not in this test, but in the next one) mean a complete and unconditional work with the entire history, regardless of the fact that this particular test will use a small period of history. Therefore, the terminal prepares in advance and completely rechecks the depth and correctness of the entire history of the desired symbol. Of course, only the necessary history interval is passed/synchronized to a specific test agent for a particular test.
Because traders tend not to notice the rules of correct preparation of the conditions for testing, the terminal tries to prepare and re-test the environment as much as possible. In MetaTrader 5, we have specifically removed the limitation on the volume and depth of the requested data, so that traders don't have to manually download and synchronize data.
1. strategy tester
When testing, the tester loads only a pair specified in the tester parameters. If optimization is performed for all symbols, each symbol will be loaded sequentially.
If the Expert Advisor is multi-currency, other symbols should be loaded independently.
The idea is the following
а. The tester has its own market overview, in which initially only the pair specified in the tester parameters is set.
б. If necessary, other pairs can be added to the market overview of the tester from an EA, using Select.
в. The strategy tester synchronizes the data with the terminal, which in turn synchronizes it with the trade server (where the account is opened).
This downloads the history for the entire testing period + a certain amount of information prior to the date of testing (if I'm not mistaken, 1 year).
в. If the Expert Advisor (you) is not satisfied with the depth required history should be loaded independently. For example in the initialization block, after checking the history and synchronization of the data.
a. logically
b. i.e. in the general case, it is IMPOSSIBLE to download everything the Expert Advisor needs during testing (unless you download absolutely everything).
c. i.e. before the start of the EA in the tester, the corresponding pairs are not yet available in the tester market overview (in accordance with point a.)
c(2). the depth is ok, I didn't ask for more.
Thus, it is more logical (but a little bit more complicated) to download the data according to b, c, c(2) when we access the data in the Expert Advisor.
I suggest adding #property tester_symbol to fill the table from point a (if the idea is described correctly), with the ability to set several, like #property description. But still convinced that in the absence of #property tester_symbol paging should go "as play" (except for base character), as their NEED depends solely on the algorithm of the EA itself.
2. terminal
Here the history is formed in a similar way (as far as I understand, according to the symbols indicated in the market review of the terminal, taking into account open charts). When you start working with the terminal, a necessary minimum of history is formed for the symbols you are working with (I do not remember the exact number of bars, but it has been repeatedly mentioned on the forum).
If this history depth is not convenient, the data should be loaded manually. To do this switch to the maximum month (one of the recommended options) and using the left scroll of the chart load the history to the maximum depth.
It would also be desirable to set the required number of bars on the chart in the terminal parameters.
As it turned out, in this case it is not necessary minimum, but the entire history of the symbol, with which we are working.
An observation (the build has changed by 360): if we slightly modify the conditions - do not delete the entire history folder after the initial download and leave the current year in it, the previous years will not be swapped automatically! Until the tester is run on this character.
Re-read my reply again, please.
We don't just download and retest the entire history for a reason. If a tester is used, it inevitably (not in this test, but in the next one) means a complete and unconditional work with the entire history, regardless of the fact that this particular test will use a small period of history. Therefore, the terminal prepares in advance and completely rechecks the depth and correctness of the entire history of the desired symbol. Of course, only the necessary history interval is passed/synchronized to a specific test agent for a particular test.
Because traders tend not to notice the rules of correct preparation of the conditions for testing, the terminal tries to prepare and re-test the environment as much as possible. In MetaTrader 5, we purposely removed the limitation on the volume and depth of requested data, so that traders would not have to manually download and synchronize data.
That's just for "to have"! By the next use of the tester, the history could be corrected (especially now, when it has a lot of flaws in different brokerage companies, from complete absence, to crooked data).
The user does not understand the happiness that has fallen upon him! Add in the settings the checkbox "DO NOT WANT it, I only want it when requested by user or expert/script/indicator". And "DO NOT want forced automatic MT5 updates" too.
a. logically
b. i.e. in general, it is IMPOSSIBLE to pump up everything the EA will need during testing BEFORE STARTING (unless absolutely everything is pumped).
c. i.e. before the start of the EA in the tester, the corresponding pairs are not yet available in the tester market overview (according to point a.)
c(2). the depth is ok, I didn't ask for more.
Thus, it is more logical (but a little bit more complicated) to download the data according to b, c, c(2) when we access the data in the EA.
I suggest adding #property tester_symbol to fill the table from point a (if the idea is described correctly), with the ability to set several, like #property description. But still convinced that in the absence of #property tester_symbol paging should go "as play" (except for the base character), since their REALITY depends solely on the algorithm of the EA itself.
These functions are convenient (and quite sufficient) for forming the list of symbols in the tester
Getting Market Data
Functions for obtaining information on market conditions.
The function
Action
SymbolsTotal
Returns the number of available (selected in MarketWatch or all) symbols
SymbolName
Returns the name of the specified symbol
SymbolSelect
Selects a symbol in MarketWatch or removes the symbol from the window
-Check if ArrayResize() returns "-1"?
Before, a message like "Out of memory" used to pop up and the program crashed - now it doesn't.
Build 360. Looks like an error in CTrade:
2010.10.04 18:59:00 CTrade::PositionOpen: instant buy 0.10 EURUSD at 1.36890 sl: 1.36390 tp: 1.37890 [done at 0.00000]
2010.10.05 09:43:00 CTrade::PositionModify: modify buy 0.00 EURUSD (sl: 1.36897, tp: 1.37861) [done]
Build 360. Several times in the tester there were messages "tester agent failed"
GK 0 Tester 18:26:31 EURUSD: history preliminary downloading started
CL 0 Tester 18:28:55 EURUSD: history preliminary downloading completed
GH 0 Core 2 18:28:59 agent process started
HP 0 Core 2 18:29:00 connecting to 127.0.0.1:3000
OI 2 Tester 18:29:05 tester agent got failed
LI 0 Core 2 18:29:05 connect closed
GN 0 Core 2 18:34:14 agent process started
KJ 0 Core 2 18:34:14 connecting to 127.0.0
.1:3000
RJ 0 Core 2 18:34:15 connected
OP 0 Core 2 18:34:15 authorized (agent build 360)
NH 0 Tester 18:34:15 EURUSD,M1 (Alpari-Demo): testing of experts\third.ex5 from 2010.10.04 00:00 to 2010.11
.05 00:00:00 to be started
...
HQ 0 Core 2 19:27:47 agent process started
II 0 Core 2 19:27:48 connecting to 127.0.0.1:3000
CP 2 Tester 19:27:53 tester agent failed
HP 0 Core 2 19:27:53 connect closed
KI 0 Core 2 19:28:10 connecting to 127.0.0.1:3000
QL 0 Core 2 19:28:10 connected
PN 0 Core 2 19:28:10 authorized (agent build 360)
RJ 0 Tester 19:28:10 EURUSD,M1 (MetaQuotes-Demo): testing of experts\third_alptest2.ex5 from 2010.10.04 00:00 to 2010.11.05 00:00 to be started
MF 0 Core 2 19:28:11 common synchronization completed
IM 0 Core 2 19:28:11 3124 bytes of account info
loaded