Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 811
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
Do you have a curve? It's never too late to learn.
More of a topic from the category: I want to achieve more impact and make programmes more compact and structured, which ultimately improves programme performance.
How to return address of variable and array cell index element?
https://docs.mql4.com/ru/basis/types/this
MQL programs do not have physical access to memory, they can only get a pointer to an object
Please advise my friends. I am getting requotes on the MT5 with Marekt Execution.
How do I correctly process this error to open a trade? I understand that my broker sends back the request to open the deal at 1.12875? How do you deal with this?
Please advise my friends. I am getting requotes on the MT5 with Marekt Execution.
How do I correctly process this error to open a trade? I understand that my broker sends back the request to open the deal at 1.12875? How do you handle it?
Request
and decide on the error code. Update the prices and try again.Hello, during testing, I identified a situation that is not clear to me, when setting the timeframe of the graph M30, entry does not happen on the order, when setting M1, entry is, in the settings is testing on every tick. I thought that this setting does not affect the time frame chart and I can put the one that I feel comfortable with for reviewing the test results. Please help me to understand.
I am writing it down. I have just run the tests:
- setting every tick, no visualization, 1M: Gross profit 17695, Gross loss -19836
- setting every tick, without visualization, 30M: Gross profit 17634, Gross loss -19227
MQL programs do not have physical access to memory, they can only get a pointer to an object
That's bad - that's why we have all the trouble. And how to get it, what can be done? As far as I understand, it is possible to access the descriptor, but I do not know how to influence the address of storage variable through the descriptor. Is it possible to do it with a descriptor?
Yesterday I made a record in the following format.
int mas[0]=4,mas[1]=3;then I declared an array and tried to fill it with the values that are stored in the cells of this array
int Arr[]={mas[0],mas[1]}
and what do you think the error will be. If I had a sledgehammer at hand I'd smash the computer with it, go to America or wherever, find these idiots developers who put a ton of restrictions on mql and smash them with it, it's horrible. You can only write
int Arr[]={4,3} everything is so static, it's horrible.
Who knows how to write a letter to mql4 developers, is it possible to write in Russian, is there a technical support service?
It's bad, that's where all the trouble comes from. And how to get it what can be done? As far as I understood there is a way to access the descriptor, but I don't know how to influence the variable storage address through the descriptor. Is it possible to do this with a descriptor?
there is no problem
MQL is 90% like C++, there is no direct work with memory, such as allocation of memory, working with memory via pointers, etc., because MQL works under the control of the terminal, and is not an independent program in the OS
If you need to pass a value into a function - pass it by value or by reference
https://www.mql5.com/ru/docs/basis/function
pointers are used only when working with classes
you are looking for a spherical horse in a vacuum for several days, there is a specific task - there will be a specific implementation, MQL is quite a flexible language, with rich functionality and provides full interaction with the MT trading terminal - getting and processing historical data, sending trading commands, getting information about a trading instrument.... all information necessary for trading
If you need to write in a third-party software, MQL supports the connection of .dll - search through the forum - there are about 20 articles on the subject
https://docs.mql4.com/ru/basis/types/this
MQL programs do not have physical access to memory, they can only get a pointer to an object
I read this topic, the description is very overloaded and of course I don't understand it correctly. The description of how to access the class, how to call the class, what its members should be accessed or to call the whole form or to access via point, it is not clear how to describe the class separately or internally, and many other things seem to be present and cool, but it is not clear how it works. Are you saying that through a class and an ampersand you can access an address (this is the descriptor principle, working through an intermediary via a prototype)?