Questions from Beginners MQL4 MT4 MetaTrader 4 - page 131

 

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?

 
BirviZ:

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.

 
Any advice? The MT4 terminal does not show the products in the market. There's just a blank, and I can'tdownload anythingfromMQL5.community(.
 
Colleagues, please advise whether it is correct to use return operator from the loop body? For example, we have a function with a loop. At some moment we need to return some value and thus exit the function. The correct way is to use break and then return(value). But can we use return(value) right away?
 

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.

 
lsv107:
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

what could be the reason??????
 
pryn:

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

what could be the reason??????

Try to locate the file and uncheck the read-only (read-only) option in the file properties.

 
STARIJ:

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.

 
1.I have written an owl, but it is not optimised. No errors appear. What should I look at?
2.How do I transfer the ATP indicator readings to the EA?