Testing the new MQL5 compiler for x64 platforms - 2 to 10 times faster calculations! - page 2
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
For example, inter-terminal communications.
Well, if you twist it like that, then of course, the DLL is a useful feature...
But I personally for this very task decided that I don't really need a DLL for that. Right now I'm thinking about an EA that would take quotes from one brokerage company and send signals to another one, and that does not even have MetaTrader. (DucaCopi, by the way, I wonder if MetaQuotes will agree with this venerable broker ?).
Was thinking in the direction of DLL. But decided that shared files are much safer and more reasonable. Let MetaTrader write signals to the file. And let another MetaTrader (or JForex or someone else) read and execute them.
By the way, I've been thinking about array references...
Renat, I make a suggestion:
Since we have a Standard Library, shouldn't we add a variant of OnCalculate() function with the following prototype:
intOnCalculate(constint rates_total,//size of input timeseries
constint prev_calculated,// bars processed at previous call
const CiTime* ptTime,// Time
const CiOpen* poOpen,// Open
const CiHigh* phHigh,// High
const CiLow* plLow,// Low
const CiClose* pcClose,// Close
const CiTickVolume* ptvTickVolume,// Tick Volume
const CiRealVolume* prvRealVolume,// Real Volume
const CiSpread* psSpread// Spread
);
?
In my opinion, this would require very small changes in MetaTrader, but on the other hand it simply provides pointers to arrays, which can be passed to handler classes without copying. And the idea of the Standard Library itself is popularized.
Got first results of comparing performance of old and new compiler on example of real big project (~20,000 lines of source code).
Results of running time of program compiled with old version of compiler (4 runs):
Running time results for a program compiled in the new compiler version (4 runs):
*The second and next runs of the program were carried out with warmed cache - as it is seen the warmed cache increases productivity on 15-30%.
As you can see the results are better in the new compiler: it took ~6.4 seconds to parse over 20000 deals and orders in the first run and ~5.4 seconds in the second one, i.e. the performance gain of 15-20%.
The performance improvement could have been greater, but most of the time is taken up by system function calls.
The new compiler detected no errors in the project, totaling more than 20,000 lines of source code. This is an excellent result, taking into account that this project was created for the old version of the compiler.
However, the new compiler generated several warning messages related to incorrect display of file paths (slash escaping requirement):
This is a fair requirement, which can easily be met with a few minor modifications.
Thus, we can conclude that even large projects written in MQL5 are ready for the new compiler and switching to it will not be a problem for professional developers.
...
I get"code generation error 1 1".
...
The main gain is on mathematics and own calculations.
It is still good, because you can create your own environment with minimal system function calls.
(copying the environment once in your classes and working with it directly).
Well, if you twist it like that, then of course, the DLL is a useful feature...
But I personally for this very task decided that I don't really need a DLL for that. Right now I'm thinking about an EA that would take quotes from one brokerage company and send signals to another one, and that does not even have MetaTrader. (DucaCopi, by the way, I wonder if MetaQuotes will agree with this venerable broker ?).
Thought about dll. But I've decided it's safer and more sensible to use shared files. Let MetaTrader write signals to the file. And another MetaTrader (or JForex, or someone else) - let them read and execute.
There is an option with named channels, but there is a need for an intermediate server,
There are examples of how to do this on the forum.
For example, interterminal communications.
There is an option with named channels, but you need an intermediate server,
There are examples of how to do this on the forum.
No need for any named channels! Waiting to add SQL support. Exchange data via a table. SQL is a built-in support for multi-threaded high load systems.