Questions from Beginners MQL4 MT4 MetaTrader 4 - page 231
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
Well, to be more precise, it looks like you can't. And about SLEEP. Do you want to freeze the entire Expert Advisor for some time? Or just a certain function, after it has been worked out. In any case, even for interruption of Expert Advisor's work, it is better to use the flag for long delays, and when checking it, if there is no permission, just exit to OnTick/OnTimer. For short delays, yes, you can useSLEEP.
By the way,SLEEP does not work in indicators.
So, understand the use of flags, you will need it in future.
No, I wanted my EA to hold for 10 sec. before it closes, but when a slip goes before CloseAllOrder function, the function does not work at all, then it does not work after it, etc. I am now thinking of adding this delay to the CloseAllOrder function itself. I've been studying MQL4 programming for only a month, plus I've never programmed before.
Check Slip by printing milliseconds before and after Slip. If something is not working, are you using old data? Are you usingRefreshRates() or aren't you taking into account that the number of orders is decreasing?
Accepting full responsibility for the fact that
ushort
The unsigned shorttype is the ushort type, which also has a size of 2 bytes. The minimum value is 0, the maximum value is 65,535.
int
The integer int type has a size of 4 bytes (32 bits). The minimum value is -2 147 483 648, the maximum value is 2 147 483 647.
Everything worked out zero by compilation
Glad it helped
*** is it ***? or quite real brokers who will help?
*** is it ***? or quite real brokers who will help?
Discussion about brokers is forbidden.
Comrades, need your help on webrequest.
Is it a get or post method?
Do itby post-query, try to remove length limitation on server
Get or post method?
Do thepost-request, on the server try to remove the length restriction