[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 428

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
Is it possible to improve the performance of an EA if the indicator used in it, which is called through iCustom(), is completely transferred to a dll? Is such a game worth playing? Is the dll always faster than the indicator? And what are the peculiarities of working with Close[] array in dll?
Yes, I will also add a question: how to format IndicatorCounted() function in dll.
1. Is it possible to get the EA performance gain, if the indicator used in it, which is called via iCustom(), is completely transferred to a dll? Is such a game worth playing? Is the dll always faster than the indicator? And what are the peculiarities of working with Close[] array in a dll?
2. Yes, I would also like to add a question: how to design the IndicatorCounted() function in dll.
It is an interesting topic. But...
1. I don't know, I haven't tried it, but I doubt it, it may be an insignificant increment. From what I've seen indicators transferred to dll do not work fast, but optimizing the code of the indicator allows to achieve very good results in mql.
There is no cheat here, we should pass the value of IndicatorCounted(), Bars and in the dll we should decide whether to re-count all or only one bar. Instead of IndicatorCounted() and Bars, you can pass already calculated Limit.
Clearly, if the indicator is very slow, which makes it unrealistic for use in Expert Advisors (you can not test it), then the transfer to the dll will not help.
1. Is it possible to get the EA performance gain, if the indicator used in it, which is called via iCustom(), is completely transferred to a dll? Is such a game worth playing? Is the dll always faster than the indicator? And what are the peculiarities of working with Close[] array in dll?
2. Yes, I will also add a question: how to format IndicatorCounted() function in dll?
1. Sure, you may and should. It is 20 times faster in calculation. Not to mention convenient debugging and infinite possibilities of C++ and other normal languages.
2. you don't need it there.
SetIndexStyle(0,EMPTY);
SetIndexStyle(0,EMPTY);
Why does the line break down? I need a section by EMPTY. code with an error for H1 (I can see that myself), but how do I fix EMPTY???
Try setting SetIndexEmptyValue(), options: 0, EMPTY_VALUE
Try setting SetIndexEmptyValue(), options: 0, EMPTY_VALUE
Thanks...I'll give it a try)):
...
1. I don't know I haven't tried...
Tried it. EMA on mql and in dll.
01:46:19 1 EURUSD,M15: Alert: dll: 109
01:46:19 1 EURUSD,M15: Alert: 1
01:46:19 1 EURUSD,M15: Alert: mql: 109
01:46:19 1 EURUSD,M15: Alert: dll: 0
01:46:19 1 EURUSD,M15: Alert: 2
01:46:19 1 EURUSD,M15: Alert: mql: 156
01:46:20 1 EURUSD,M15: Alert: dll: 202
01:46:20 1 EURUSD,M15: Alert: 3
01:46:20 1 EURUSD,M15: Alert: mql: 172
01:46:20 1 EURUSD,M15: Alert: dll: 0
01:46:20 1 EURUSD,M15: Alert: 4
01:4620 1 EURUSD,M15: Alert: mql: 172
01:46:20 1 EURUSD,M15: Alert: dll: 171
01:46:20 1 EURUSD,M15: Alert: 5
01:46:20 1 EURUSD,M15: Alert: mql: 78
01:46:20 1 EURUSD,M15: Alert: dll: 78
01:46:20 1 EURUSD,M15: Alert: 6
01:46:21 1 EURUSD,M15: Alert: mql: 202
01:46:21 1 EURUSD,M15: Alert: dll: 94
01:46:21 1 EURUSD,M15: Alert: 7
01:46:21 1 EURUSD,M15: Alert: mql: 172
01:46:21 1 EURUSD,M15: Alert: dll: 94
01:4621 1 EURUSD,M15: Alert: 8
01:46:21 1 EURUSD,M15: Alert: mql: 234
01:46:21 1 EURUSD,M15: Alert: dll: 15
01:46:21 1 EURUSD,M15: Alert: 9
01:46:21 1 EURUSD,M15: Alert: mql: 78
01:46:22 1 EURUSD,M15: Alert: dll: 94
01:46:22 1 EURUSD,M15: Alert: 10
01:46:22 1 EURUSD,M15: Alert: mql: 172
01:46:22 1 EURUSD,M15: Alert: dll: 93
01:46:22 1 EURUSD,M15: Alert: 11
01:46:22 1 EURUSD,M15: Alert: mql: 93
01:46:22 1 EURUSD,M15: Alert: dll: 78
01:46:22 1 EURUSD,M15: Alert: 12
01:46:22 1 EURUSD,M15: Alert: mql: 78
01:46:22 1 EURUSD,M15: Alert: dll: 78
01:46:22 1 EURUSD,M15: Alert: 13
01:46:23 1 EURUSD,M15: Alert: mql: 250
01:4623 1 EURUSD,M15: Alert: dll: 156
01:46:23 1 EURUSD,M15: Alert: 14
01:46:23 1 EURUSD,M15: Alert: mql: 187
01:46:23 1 EURUSD,M15: Alert: dll: 0
01:46:23 1 EURUSD,M15: Alert: 15
01:46:23 1 EURUSD,M15: Alert mql: 78
01:46:23 1 EURUSD,M15: Alert: dll: 171
01:46:23 1 EURUSD,M15: Alert: 16
01:46:24 1 EURUSD,M15: Alert: mql: 266
01:46:24 1 EURUSD,M15: Alert: dll: 0
01:46:24 1 EURUSD,M15: Alert: 17
01:46:24 1 EURUSD,M15: Alert: mql: 93
01:46:24 1 EURUSD,M15: Alert: dll: 78
01:46:24 1 EURUSD,M15: Alert: 18
01:46:24 1 EURUSD,M15: Alert: mql: 94
01:46:24 1 EURUSD,M15: Alert: dll: 15
01:46:24 1 EURUSD,M15: Alert: 19
01:46:2446:46:24 1 EURUSD,M15: Alert: mql: 94
01:46:24 1 EURUSD,M15: Alert: dll: 78
01:46:24 1 EURUSD,M15: Alert: 20
01:46:25 1 EURUSD,M15: Alert: mql: 234
01:46:25 1 EURUSD,M15: Alert: dll: 78
01:46:25 1 EURUSD,M15: Alert: 21
01:46:25 1 EURUSD,M15: Alert: mql: 156
01:46:25 1 EURUSD,M15: Alert: dll: 94
01:46:25 1 EURUSD,M15: Alert: 22
01:46:25 1 EURUSD,M15: Alert: mql: 94
01:46:25 1 EURUSD,M15: Alert: dll: 16
01:46:2546:25 1 EURUSD,M15: Alert: 23
01:46:26 1 EURUSD,M15: Alert: mql: 93
01:46:26 1 EURUSD,M15: Alert: dll: 171
01:46:26 1 EURUSD,M15: Alert: 24
01:46:26 1 EURUSD,M15: Alert: mql: 171
01:46:26 1 EURUSD,M15: Alert: dll: 187
01:46:26 1 EURUSD,M15: Alert: 25
01:46:26 1 EURUSD,M15: Alert: mql: 156
01:46:26 1 EURUSD,M15: Alert: dll: 78
01:46:26 1 EURUSD,M15: Alert: 26
01:46:27 1 EURUSD,M15: Alert: mql: 62
01:4627 1 EURUSD,M15: Alert: dll: 187
01:46:27 1 EURUSD,M15: Alert: 27
01:46:27 1 EURUSD,M15: Alert: mql: 78
01:46:27 1 EURUSD,M15: Alert: dll: 171
01:46:27 1 EURUSD,M15: Alert: 28
01:46:27 1 EURUSD,M15: Alert mql: 93
01:46:27 1 EURUSD,M15: Alert: dll: 78
01:46:27 1 EURUSD,M15: Alert: 29
01:46:27 1 EURUSD,M15: Alert: mql: 172
01:46:28 1 EURUSD,M15: Alert: dll: 94
01:46:28 1 EURUSD,M15: Alert: Average. mql: 140 dll: 91
A few tests:
Average. mql: 126 dll: 116
Average. mql: 122 dll: 86
Average. 167 dll: 91
Average. mql: 149 dll: 82
Average. mql: 140 dll: 91
This is quite noticeable. If calculations are more complicated, the code will be much more noticeable.
Good day!!! I must have misunderstood something about arrays or something. The function does not put a profit in the array!!! It's zero in all circumstances. Zero and that's it!
Function.
Oblivion beyond all functions