Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 433
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
how to make a new trade not to open on the bar where the last one closed ?
or just advise how to get the closing time of the last order that was executed
how to make a new trade not to open on the bar where the last one closed ?
or just advise how to get the closing time of the last order that was executed
About the time of the last order, a possible example, the principle is: select the required order (the last), look at its characteristics (closing time)
for (int j=OrdersTotal()-1; j>=0; j--)
{
if (!OrderSelect(j,SELECT_BY_POS,MODE_HISTORY) ) break;
fbuy=OrderCloseTime();
}
In general, you'd better learn how to work with search instead of programming - everything is there... Who did google do the revolution for... it's infuriating...
About the time of the last order, a possible example, the principle is: select the desired order (the last), look at its characteristics (closing time)
for (int j=OrdersTotal()-1; j>=0; j--)
{
if (!OrderSelect(j,SELECT_BY_POS,MODE_HISTORY) ) break;
fbuy=OrderCloseTime();
}
In general, you'd better learn how to work with search instead of programming... Who did google do the revolution for... it just pisses me off...
And not even google, everything is on the website
This function returns the closing bar number of the last position
taken from this thread
Good afternoon!
Can you please tell me how to return an array from a custom function, let's say a two-dimensional array? Or it's not foreseen? And it is necessary to use the array declared at a global level? Thanks in advance!
Example:
int start()
{
int x,y;
double Mass[][];
Mass=FindPrices(x,y); ----- this does not work - compile error....
}
double FindPrices(int i, int j)
{
double Mass_2[][];
.... calculations.....
return( Mass_2);
}
Good afternoon!
Can you please tell me how to return an array from a custom function, let's say a two-dimensional array? Or it's not foreseen? And it is necessary to use the array declared at a global level? Thanks in advance!
Example:
int start()
{
int x,y;
double Mass[][];
Mass=FindPrices(x,y); ----- this does not work - compile error....
}
double FindPrices(int i, int j)
{
double Mass_2[][];
.... calculations.....
return( Mass_2);
}
You can do it like this:
You can go like this:
I don't get it??? So is it possible to return an array or not?
Got it )) https://docs.mql4.com/ru/basis/variables/formal
Thank you!
EventSetTimer and OnTimer in new builds.
EventSetTimer and OnTimer in new builds.
So it will only give a possibility to perform some action by time, not by tick, as I understand it, and I need an owl to sleep in tester after condition to put...