Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 412 1...405406407408409410411412413414415416417418419...1965 New comment Artyom Trishkin 2018.01.11 04:50 #4111 RomanRott: So I guess if you calculate something in the OnTimer function every 1-2 minutes, it will load the terminal less than the same operations in OnTick?In OnTick() you can also calculate once every 1-2 minutes. But in principle, yes. It all depends on the task at hand. Anatoliy Lukanin 2018.01.11 13:21 #4112 Good afternoon!Faced with errors 4110 and 4111 (prohibition to trade in Long or Short)If I disable one of the values in the Expert Advisor settings, it gives an error in the tester.03:46:02.279 2017.11.07 00:00:00 CHFJPY,H1: OrderSend error 411003:56:31.458 2017.11.06 00:02:36 CHFJPY,H1: OrderSend error 4111I can't find a function for MT4 that returns an opportunity to trade short or long.The function for MT5 SYMBOL_TRADE_MODE_LONGONLY and SYMBOL_TRADE_MODE_SHORTONLY does not work in MT4.Please give me a real example to verify that there is no error in the tester.Please do not give me just a link to the tutorial, I know where it is, I need a specific solution.Thanks in advance! Universal code for Short Free EA creation How to know with Taras Slobodyanik 2018.01.11 14:40 #4113 Only catch the error after OrderSend and include a flag that you can't do it again.Or you can set up the "Direction of trade" parameter yourself. Anatoliy Lukanin 2018.01.11 15:42 #4114 Taras Slobodyanik:Only catch the error after OrderSend and include a flag that you can't do it again.Or you can set the "Trade direction" parameter yourself.Only catch an error after OrderSend and turn on the flag that it can no longer be done.==This way one error will still manage to pop up.============Or you can adjust the "Trade direction" parameter yourself.==For yourself you can, but if sov to people - the error will fly out (check in the market may not pass). New trends in technical Let's go SetLastError!!! Interesting topic for many: forexman77 2018.01.11 17:56 #4115 Who can explain why after compilation EA is not visible in tester in drop down menu, and some old ones are not visible.They are in the folder, compiled again, closed, opened the terminal, etc... Konstantin Erin 2018.01.11 19:51 #4116 forexman77: Who can explain why after compilation EA is not visible in tester in drop down menu, and some old ones are not visible.I have them in the folder, compiled them again, closed them, opened the terminal, etc... There was a compilation error. File.mq4 is there, but file.ex4 is gone forexman77 2018.01.11 20:05 #4117 STARIJ: There was a compilation error. File.mq4 is there, but file.ex4 has disappearedThere is no error during compilation. The problem appeared about a month ago. What is surprising is that some EAs appear from time to time. Konstantin Erin 2018.01.11 20:43 #4118 forexman77: There is no error during compilation. The problem appeared about a month ago. What is surprising is that from time to time some EAs appear. There was such a thing - Windows protects system area from interference. Got rid of its guardianship - saw the light Roman Sharanov 2018.01.12 02:22 #4119 Is it possible to make the indicator go through the history on initialization and draw it there WITHOUT cycling through all the bars? Artyom Trishkin 2018.01.12 05:28 #4120 RomanRott: Is it possible to make the indicator go through the history on initialization and draw it without cycling through all the bars?1. Passing through the history and looping through the bars are the same thing.The indicator doesn't have to draw anything at OnInit(). 1...405406407408409410411412413414415416417418419...1965 New comment
So I guess if you calculate something in the OnTimer function every 1-2 minutes, it will load the terminal less than the same operations in OnTick?
In OnTick() you can also calculate once every 1-2 minutes. But in principle, yes. It all depends on the task at hand.
Good afternoon!
Faced with errors 4110 and 4111 (prohibition to trade in Long or Short)
If I disable one of the values in the Expert Advisor settings, it gives an error in the tester.
03:46:02.279 2017.11.07 00:00:00 CHFJPY,H1: OrderSend error 4110
03:56:31.458 2017.11.06 00:02:36 CHFJPY,H1: OrderSend error 4111
I can't find a function for MT4 that returns an opportunity to trade short or long.
The function for MT5 SYMBOL_TRADE_MODE_LONGONLY and SYMBOL_TRADE_MODE_SHORTONLY does not work in MT4.
Please give me a real example to verify that there is no error in the tester.
Please do not give me just a link to the tutorial, I know where it is, I need a specific solution.
Thanks in advance!
Only catch the error after OrderSend and include a flag that you can't do it again.
Or you can set up the "Direction of trade" parameter yourself.
Only catch the error after OrderSend and include a flag that you can't do it again.
Or you can set the "Trade direction" parameter yourself.
Only catch an error after OrderSend and turn on the flag that it can no longer be done.
==
This way one error will still manage to pop up.
============
Or you can adjust the "Trade direction" parameter yourself.
==
For yourself you can, but if sov to people - the error will fly out (check in the market may not pass).
Who can explain why after compilation EA is not visible in tester in drop down menu, and some old ones are not visible.
They are in the folder, compiled again, closed, opened the terminal, etc...
Who can explain why after compilation EA is not visible in tester in drop down menu, and some old ones are not visible.
I have them in the folder, compiled them again, closed them, opened the terminal, etc...
There was a compilation error. File.mq4 is there, but file.ex4 has disappeared
There is no error during compilation. The problem appeared about a month ago. What is surprising is that some EAs appear from time to time.
There is no error during compilation. The problem appeared about a month ago. What is surprising is that from time to time some EAs appear.
Is it possible to make the indicator go through the history on initialization and draw it there WITHOUT cycling through all the bars?
Is it possible to make the indicator go through the history on initialization and draw it without cycling through all the bars?
1. Passing through the history and looping through the bars are the same thing.
The indicator doesn't have to draw anything at OnInit().