Questions from Beginners MQL4 MT4 MetaTrader 4 - page 131
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
Good afternoon.
Please tell me the difference between OrderClose() and OrderDelete() functions.
If I understand correctly, the first one should be used to close active orders and the second one for pending ones.
Will there be errors if active orders are deleted using OrderDelete() function and vice versa, if pending orders are deleted using OrderClose() function?
Good afternoon.
Please tell me the difference between OrderClose() and OrderDelete() functions.
If I understand correctly, the first one should be used to close active orders and the second one for pending ones.
Yes, you understand correctly: OrderClose() applies to market orders, and OrderDelete() - to pending orders.
Will there be errors if active orders are deleted using OrderDelete() function, and vice versa, if pending orders are deleted using OrderClose() function?
Yes, there will be.
The laptop switched off when the MT4 platform was switched on (forgot to plug in the power cord). When the MT4 is switched on again, there are no charts and instead it says WAITING FOR RELEASE. At the bottom of the screen it says no connection. I've rebooted and logged in with passwords, nothing changes. Anybody want to give me a hint. It is better to explain in detail. I'm not a very confident user. I'm not a confident user. Thank you.
Colleagues, please advise whether it is correct to use the return operator from the loop's body? For instance, we have a function which has a loop. At some moment we need to return some value and therefore exit the function. The correct way is to use break and then return(value). But can we just use return(value) right away?
There is no harm in using the return operator to exit the loop. Just remember, it will also exit the function in which the loop is executed.
Yes, no need to use break before that!Hello, can someone tell me if anyone knows, I load tick data to test with 99% as it should be, everything works fine for 30 min chart, but as soon as I load H4 data and try to run an EA on it in the tester, - does not work, the tester gives out 2018.04.05 16:41:08.576 TestGenerator: file "C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\7E781795884A398A87F33ED1B942D689\tester\history\USDJPY240_0.fxt" cannot open [5]
And 2018.04.05 16:41:08.535 TestGenerator: file "C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\7E781795884A398A87F33ED1B942D689\tester\history\USDJPY240_0.fxt" is read-only
Hello, can someone tell me if anyone knows, I load tick data to test with 99% as it should be, everything works fine for 30 min chart, but as soon as I load H4 data and try to run an EA on it in the tester, - does not work, the tester gives out 2018.04.05 16:41:08.576 TestGenerator: file "C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\7E781795884A398A87F33ED1B942D689\tester\history\USDJPY240_0.fxt" cannot open [5]
And 2018.04.05 16:41:08.535 TestGenerator: file "C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\7E781795884A398A87F33ED1B942D689\tester\history\USDJPY240_0.fxt" is read-only
Try to locate the file and uncheck the read-only (read-only) option in the file properties.
try to find this file and uncheck the read-only attribute in the properties
Then there will be no tick history of its own. The tester will overwrite the file and create its own.