Discussion of article "Tips from a professional programmer (Part II): Storing and exchanging parameters between an Expert Advisor, scripts and external programs" - 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
...
As you know, the OnInit handler of an Expert Advisor is triggered not only when it is launched, but also when the timeframe is changed. In fact, each time the timeframe is switched, the variables are reset and initialised again, except for the Expert Advisor parameters.
...
Incorrect. This is what happens in the indicator. When parameters are changed and the symbol/timeframe of the chart is changed, the Expert Advisor is not reinitialised.
Now, as for information transfer between Expert Advisors/indicators/services, etc.
That leaves only EventChartCustom(...), with all its disadvantages.
So, tick the box to allow import of dll and start doing the right thing, or, better, no way.
1) The article is poorly developed.
1) I was praised by the moderator.
2) so as not to run the bar analysis repeatedly
3) the lifetime of the file is longer than that of the global variable
4) I showed one of the ways of packing
5) I don't use them
...
a) Incorrect. This is what happens in the indicator. When parameters are changed and symbol/timeframe of the chart is changed, the Expert Advisor is not reinitialised.
Now, as for information transfer between Expert Advisors/indicators/services, etc.
b) So, tick the box to allow dll import and start doing it right, or, better, not at all.
a) I agree that reinitialisation of Expert Advisor variables is not done
1-2) we are talking about exchange between your EA and scripts. If you want, you can encrypt the information ;-)
3) the DC can add something to the end in MT4. There is no such thing in MT5, at least for me ;-)
4) Well, I usually use the flag FILE_SHARE_READ.
b) if you do it for yourself, then as they say "flag in your hands....".
If you do it for the market, DLLs don't pass there.
(a) Agrees that there is no reinitialisation of EA variables
1-2) we are talking about the exchange between the Expert Advisor and scripts. You can encrypt the information if you want ;-)
3) to add something to the end in MT4. There is no such thing in MT5, at least for me.
4) Well, I usually use the flag FILE_SHARE_READ
b) if you do it for yourself, then as they say "flag in your hands....".
If you're doing it for the market, DLLs don't pass there.
1-2) So encrypt or not encrypt, but you can still change/delete it)))))
3) If it is not explicitly stated that you can not, then ... Personally, I'm not sure I'm going to be able to do that.
4) I'm not talking about that, I'm talking about the situation of data "races" when sharing a resource from different threads. Run the two attached scripts on different graphs. Run write first. This is the answer to my long-standing question about metaquotes. And, again, in the context of the test result, which I finally got to (thanks to TC) and the question to them: where are the native synchronisation primitives?
This is also the answer why it is somehow mauvais for a professional to do such a thing in the market without warning huge letters to customers.
....
All the examples from my articles, work fine for me (in my EA and scripts)
All the examples from my articles, I have them working fine for me (in my EA and scripts)
My post is not about what does not work, but about the fact that data security and integrity are not ensured. When using all of the above methods of data transfer, the reliability of the mechanism is not ensured. Moreover, it is related not to possible bugs of third-party systems (Terminal, OS, hardware bugs), but to the method itself: collision of names or user actions in case of global terminal variables, the same + deletion functions for graphical objects, lack of synchronisation for operations of reading and writing to a file from different threads.
Yes, the probability of this can be reduced to very low values, but not to 0. That's what you should keep in mind)
My post isn't about what doesn't work, it's about not ensuring data security and integrity. When using all of the above methods of data transfer, the reliability of the mechanism is not ensured. Moreover, it is related not to possible bugs of third-party systems (Terminal, OS, hardware bugs), but to the method itself: collision of names or user actions in case of global terminal variables, the same + deletion functions for graphical objects, lack of synchronisation for operations of reading and writing to a file from different threads.
Yes, the probability of this can be reduced to very low values, but not to 0. This is what you should keep in mind)
Storing parameters in files provide 100% reliability. All your "collisions" are solved by prefixes of object names, including global variables.
For example, level parameters are stored in Files\Cayman\Params\128968168864101576\exp_05_Lev607A160E_H4.txt. Where 128968168864101576 is ChartID. Nobody knows about this file except the analyser of this particular level. Take any piece of code from the article and try to "break" it ;-) If you break it, I will show you where you made a mistake ;-)
Something like this script in any EA/indicator/script/service run by a curious user, and you have fun weeks of searching for an unreproducible bug that doesn't exist)))))