Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1032
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 duplicate a Ccanvas object?
I create an object with Ccanvas and in the process have to create duplicates. Sometimes 10-20 and sometimes 100-200.
One time the object is definitely drawn. Is there any way to duplicate it?
Is it possible to duplicate a Ccanvas object?
I create an object with Ccanvas and in the process have to create duplicates. Sometimes 10-20 and sometimes 100-200.
One time the object is definitely drawn. Is there any way to duplicate it?
CCanvas *canv = new CCanvad
I meant a graphic object.
I meant a graphical object.
I could be wrong, but your link will be the author's thread, but you have to leaf through the whole thread, Igor seems to have posted slightly raw codes, and then sometimes rewrote what needed improvement, although again I could be wrong - I leafed through this thread about 5-6 years ago, I do not remember anymore
You are not mistaken. Recently leafed through the author's entire thread. It took me about 2-3 days. In the author's topic in view of the remoteness of writing some of his features are no longer relevant (or so it seemed to me).Read absolutely everything and highly topical and irrelevant little. And as you noticed, he did have mistakes that pop up after 2-3, or even more pages, when someone decided to use his function, found the error and either corrected it and just said that there was a mistake, or just pointed out. So even 10 pages later the same function may appear again, either corrected or improved (time has passed and he wanted to improve it).
So if someone pulled out only the most important and relevant topic, you can only say thank you and save a lot of time.
How to pass a pointer to a function (the function takes a pointer to the function as an argument) as a parameter? I have done it before with mql4 but I lost a copy of example file.
Did MQL ever support function pointers? I don't think so. One solution is to wrap the function in a class and pass the pointer to the object.
Hi all!
I want to write a function in my EA that prohibits trading in the first 2 hours after the start of trading.
But I faced with the fact that iTime(Symbol(),1440, 0) does not correctly return the opening time of the day candle.
More specifically: on 26.12.2019 the market opened at 06:00:00, but iTime determines 00:00:00.
How do I calculate exactly the opening time of the day?
SymbolInfoSessionTrade will help me find out the trading time. I don't know if it reflects changes for Christmas and other holidays.
Did MQL ever support function pointers? I don't think so. One solution is to wrap the function in a class and pass a pointer to the object.
It does. This is done using typedif specifier read help but the scheme is different from c++. I found a forum where a person recorded this code but I didn't save the file and restarted the system, of course the file was deleted. But the help shows a simple example and I had an example I was asking about.
Did MQL ever support function pointers? I don't think so. One solution is to wrap the function in a class and pass the pointer to the object.
You can, code to reproduce:
2019.12.30 18:30:55.518 Script tst EURUSD,H1: removed
2019.12.30 18:30:55.511 tst EURUSD,H1: uninit reason 0
2019.12.30 18:30:55.511 tst EURUSD,H1: This is function call: f_3
2019.12.30 18:30:55.511 tst EURUSD,H1: Calling function number 2
2019.12.30 18:30:55.511 tst EURUSD,H1: This is calling function : f_2
2019.12.30 18:30:55.511 tst EURUSD,H1: Calling function #1
2019.12.30 18:30:55.511 tst EURUSD,H1: This is calling function : f_1
2019.12.30 18:30:55.511 tst EURUSD,H1: Calling fuction no. 0
2019.12.30 18:30:55.511 tst EURUSD,H1: initialized
2019.12.30 18:30:55.496 Script tst EURUSD,H1: loaded successfully