Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 550
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
At the end of the code also Alert(result.retcode);
in the general log:
2018.05.14 12:08:16.984 Scripts script LIMIT (Si-6.18,M15) loaded successfully
2018.05.14 12:08:17.187 Trades '992940': buy limit 3.00 Si-6.18 at 62091 (62092) sl: 61821 tp: 62905
2018.05.14 12:08:17.484 Trades '992940': accepted buy limit 3.00 Si-6.18 at 62091 (62092) sl: 61821 tp: 62905
2018.05.14 12:08:17.500 Trades '992940': buy limit 3.00 Si-6.18 at 62091 (62092) sl: 61821 tp: 62905 placed for execution
2018.05.14 12:08:17.546 Trades '992940': order #13235300 buy limit 3.00 / 3.00 Si-6.18 at 62091 done in 337.532 ms
2018.05.14 12:08:17.578 Scripts script LIMIT (Si-6.18,M15) removed
In the Experts column: 2018.05.14 12:08:17.578 LIMIT (Si-6.18,M15) Alert: 10009, nothing else
Well here's how to help you? First, you write that Sell Limit is not exhibited, you give extracts from the log. And now we are speaking about a Buy Limit order. So, the problem must be floating. In addition, you have never cited the statment. You claim that the order is not visible in reality. And the statment may help to clarify the situation.
How can I help you? First, you write that Sell Limit is not being placed, and you give excerpts from the log. Now we are talking about a Buy Limit order. So, the problem must be floating. In addition, you have never cited the statment. You claim that the order is not visible in reality. The statment may help you clarify the situation.
Neither Sell Limit nor Buy Limit is set, Alert(result.retcode) returns 10009. Where can I get this "statment", what do I need to do?
Run this code on my own. Note that you will get a division error of 0 on the non-binary symbols, as there is no initialising margin there.
In the code where I managed to run it, I had to add a volume check. Otherwise, the volume was equal to zero:
After that, the order is set successfully. Also note that it triggers quite quickly - it is close to the price. Therefore, the order itself might not be noticed by you. The order will either become a position or be attached to it if the account type is netting.
Neither Sell Limit nor Buy Limit is set, Alert(result.retcode) returns 10009. Where can I get this "retcode", what should I do?
The "History" tab of the "Toolbox" window. In the context menu select "Orders". Then select "Report" from the context menu - "HTML". But you will probably be able to see for yourself why the order is missing: its status will be marked "filled".
Found my 2009 script, but it now compiles with a warning:'M' - unrecognized character escape sequence 1.mq4 66 37
Can you tell me what to tweak in the line to compile correctly?
Run this code on my own. Note that you will get a division error of 0 on the non-binary symbols, as there is no initialising margin there.
In the code where I managed to run it, I had to add a volume check. Otherwise, the volume was equal to zero:
After that, the order is set successfully. Also note that it triggers quite quickly - it is close to the price. Therefore, the order itself might not be noticed by you. It is converted to a position or attached to it if the account type is netting.
Found my 2009 script, but it now compiles with a warning:'M' - unrecognized character escape sequence 1.mq4 66 37
Can you tell me what to tweak in the line to compile correctly?
Put a double backslash before MQL4