[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 74
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
the consortium is intriguing ))
That's how many years they've been tracking Petrov! And they got what they wanted!
Hi all!
Does MQL4 allow getting Windows system time via WinAPI and to what precision?
An example would be desirable.
Hi all!
Does MQL4 allow getting Windows system time via WinAPI and to what precision?
An example would be useful.
to work with time there are functions in mql4:https://book.mql4.com/ru/functions/datetime
To work with dll, use: https://docs.mql4.com/ru/basis/preprosessor/import
Search the forum for examples by the name of the function you are interested in: https: //www.mql5.com/ru/search
to work with time there are functions in mql4:https://book.mql4.com/ru/functions/datetime
to work with dll: https://docs.mql4.com/ru/basis/preprosessor/import
examples by searching the forum for the name of the function of interest: https: //www.mql5.com/ru/search
Thank you! That's understandable. I didn't want to dig through the WinAPI. I was hoping to get a ready-made solution...
You need time accuracy better than 1 sec.
to work with time there are f-functions in mql4:https://book.mql4.com/ru/functions/datetime
to work with dll: https://docs.mql4.com/ru/basis/preprosessor/import
examples by searching the forum for the name of the function of interest: https: //www.mql5.com/ru/search
Found it.
Thank you!!!
But it's not real and is hardly of any value.
You don't think so.
There are films about him indirectly ("The Spirit of the Times") and in books, new books are being prepared. It is beginning to thaw if it does not come up with something new (Lenin also talked about the causes of the collapse, their essence). It is tentatively likely to disintegrate in 2032.
don't take the zeitgeist seriously
You need a time accuracy of better than 1 second.
Please advise on the function to close all orders
void Closeallorders()
{
int total;
Print("CloseAll");
total=OrdersTotal();
Print("total "+total);
for(int i=0;i<total;i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) { Print("break "+GetLastError()); break;}
if(OrderMagicNumber()!=MAGICMA || OrderSymbol()!=Symbol()) continue;
RefreshRates();
if (OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,3,White);
if (OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,3,White);
Print("close all error="+GetLastError());
}
}
why not all orders are closed. yes - there are errors 138 and 129. but sometimes in this line as well -
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) { Print("break "+GetLastError()); break;}
The programmer breaks, but the error code is 0. - Why does it happen?
What else can be fixed apart from looping until all requests are killed completely?