Questions from Beginners MQL5 MT5 MetaTrader 5 - page 132
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
11110000000000000111111b=> 31457535 (decimal)
prohibition of trade from 00 to 07 hours
trading hours between 08:00 and 20:00
prohibition from 9 p.m. to 11 p.m.
Probably, it's a dummy question, I'm still not very familiar with mql5 syntax (as well as everything else). Can a function return more than one value, or an array or some other structure?
Something like:
int testfunc(int x, int Y)
{
z = x + y;n = x * y;
return(z, n);
}
test = testfunc(5,10);
Print(test.x,test.y);
Probably, it's a dummy question, I'm still not very familiar with mql5 syntax (as well as everything else). Can a function return more than one value, or an array or some other structure?
No, the array can be described globally and its values can be changed in a function.
Please advise how to unsubscribe from the signal and I signed up for the signal one day later, the signal is active in subscriptions, I put a tick to enable subscription in settings, then OK, but again I open the settings and no ticks.
Probably, it's a dummy question, I'm still not very familiar with mql5 syntax (as well as everything else). Can a function return more than one value, or an array or some other structure?
Something like:
Simple (not containing class objects, strings and dynamic arrays) structures can be returned from functions.
Thank you, I've managed to solve the problem without arrays - just using global variables without any predefined value (it's always easy to open a door, as always).
However, I have a new, perhaps less typical question: I know that mql5 has all sorts of built-in features for strategy tester control. But I cannot find any of them allowing to handle optimization results in a preliminarily prepared way. Suppose I want to find an average profit value among all results that have all parameter values except for Х which is in some range?
Or is it possible to do this only by hand in Excel? I know how to do it in Excel, if anything. Just there is an idea of a small research (purely for myself, out of interest), for which I would have to dig through a whole mountain of tables in a very routine and identical way, and I want to automate it somehow...
Thanks, I've managed to solve the problem without arrays - just using global variables without any predefined values (the door was open, as always).
However, I have a new, perhaps less typical question: I know that mql5 has all sorts of built-in features for strategy tester control. But I cannot find any of them allowing to handle optimization results in a preliminarily prepared way. Suppose I want to find an average profit value among all results that have all parameter values except for Х which is in some range?
Or is it possible to do this only by hand in Excel? I know how to do it in Excel, if anything. Just there is an idea of small research (purely for myself, out of interest), for which I would have to dig through a whole mountain of tables in a very routine and identical way, and I want to automate it somehow...
Read here: https://www.mql5.com/ru/docs/optimization_frames
And then search the forum for examples of use.
Read it here: https://www.mql5.com/ru/docs/optimization_frames
And then search the forum for examples of use.
Yes, I've come across this a few times before, and examples like this. But for some reason, it didn't seem to be exactly what I was looking for. But maybe it's just that I don't know how to make them yet :)
Anyway, it's not relevant yet as long as the unfortunate owl can't be made to work properly...
So the last (I hope, at least) question for the near future is: how to get the opening price of the last order of a position right?
My test owls were not really originally mine, but a recently found one by an unknown author. This owl has initially had such a strange bug: It works properly in the tester but does not get the value of the last order price in the demo.
It generates error 4753 (order not found) and returns zero in the demo (it returns everything as expected in the tester). And this despite the fact that the test Print suggests that it seems to reachHistoryOrderGetDouble processing and even has a Ticket that isn't empty...
Tell me, 50 rating $1 every week? Who has 5000 he gets $100 a week?