Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1417
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
good afternoon everyone.
please tell me how to solve the problem
there is a class that processes positions and orders and checks them with the database.
we need to pass STRUCTURES (string, double, int, string .....) from this class.
how can this be done
and if possible a link to an example
good afternoon, everyone.
please tell me how to solve the problem
there is a class that processes positions and orders and checks them with the database
it is necessary to pass STRUCTURES (string, double, int, string .....) from this class.
how can this be done
and if possible a link to an example
There are examples in the standard library.
It can't be faster than in the variable. Only one correction: you can use the global variable of the terminal to save it when restarting the terminal, and look through the history in OnInit(). But when you go to OnTick(), this value must be in the global level variable, but not in the global variable of the terminal.
It cannot be faster than in a variable. Only one correction: you can use the global variable of the terminal to save it when restarting the terminal, and dig through the history in OnInit(). But when you go to OnTick(), this value must be in the global level variable, but not in the global variable of the terminal.
Is the global variable of the Terminal so slow, because it should be stored in the same memory as a normal one, it is not a huge amount of information that is requested from the disc when necessary.
Is a global variable so slow, because it should be stored in the same memory as a normal variable, it is not a huge amount of information that is requested from the disc when needed.
Roughly speaking, a global terminal variable is almost like a file. Otherwise, where is it stored when the computer is switched off? And a global-level variable accessible from any place in the programme is a variable in memory. Naturally, it is faster.
It turns out that at a new opening it is better to write both to the global level variable and to the global variable of the terminal to restore it after the terminal restart. But while the terminal is running, the global level variable should be checked.
Roughly speaking, a global terminal variable is almost like a file. Otherwise, where is it stored when the computer is switched off? And a global-level variable accessible from any place of the programme is a variable in memory. Naturally, it is faster.
It turns out that at a new opening it is better to write both to the global level variable and to the global variable of the terminal to restore it after the terminal restart. But while the terminal is running, the global level variable should be checked.
i.e. check the history in OnDeinit and write it to the global terminal variable?
Ideally, there is only a couple of bytes of information in the text form, isn't it contained in the availability as usual variables, i.e. in RAM?
In OnInit we read it, write it to RAM, and then when the variable is updated it is overwritten.
Has anyone actually measured this? Or maybe the developers can help us figure it out.
I.e. check history in OnDeinit and write to the global Terminal?
Ideally, there is only a couple of bytes worth of information in text form, is it not contained in the availability as normal variables, i.e. in RAM?
In OnInit we read it, write it to RAM, and then when the variable is updated it is overwritten.
Has anyone actually measured this? Or maybe the developers can help us figure it out.
Who said about picking history in OnDeinit()?
I was talking about the necessity to duplicate the variable into the terminal variable at the next position opening...
Who said anything about picking history in OnDeinit()?
I was talking about the necessity to duplicate the variable into the terminal variable at the next position opening...
it can all be done, the question was to those who measured the real work, and better to the developers, who knows what they have in their plans.
I don't want to experiment, there are many other tasks.
Good evening, dear programmers!
Help me to solve a simple problem. There is a code from MQL4. I want to adapt it to 5. That is, to work similarly in MQL5.
My variant obviously does not pass, for some reason there are a lot of errors):