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
If you code it correctly it will work!
Go through your code with the debugger (knowing this is part of knowing to code!)
Code debugging: https://www.metatrader5.com/en/metaeditor/help/development/debug
Error Handling and Logging in MQL5: https://www.mql5.com/en/articles/2041
Tracing, Debugging and Structural Analysis of Source Code, scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/272
What are the error messages?
Well, here is my code (you can read it from def manageAlerts function) then it's very simple, only a BUY entry and the Half close entry:
Here are the outputs from the console:
Result from the BUY order:
Result from the Half close:
Regards
You have to learn how to debug your code:
Code debugging: https://www.metatrader5.com/en/metaeditor/help/development/debug
Error Handling and Logging in MQL5: https://www.mql5.com/en/articles/2041
Tracing, Debugging and Structural Analysis of Source Code, scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/272
Have you looked up what 10030 means? It tells you where is your fault (at least one).
You have to learn how to debug your code:
Code debugging: https://www.metatrader5.com/en/metaeditor/help/development/debug
Error Handling and Logging in MQL5: https://www.mql5.com/en/articles/2041
Tracing, Debugging and Structural Analysis of Source Code, scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/272
Have you looked up what 10030 means? It tells you where is your fault (at least one).
I think the error comes from the request syntax themselves, which is not "really" code related (I mean, it just amount to change one line in the request), I will open a new more high level thread
It comes from your understanding of the filling type.
Please do a search, it was discussed a lot of times.
Indeed, I will try to understand this better
my BUY order:
my "half close" order:
ORDER_FILLING_RETURN should work here since the order is a market order ( ORDER_TYPE_SELL)
my BUY order:
my "half close" order:
ORDER_FILLING_RETURN should work here since the order is a market order ( ORDER_TYPE_SELL)
Why are you using a different filling mode for the close ?
You can only use allowed filling mode according to the symbol's settings. See https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#symbol_filling_mode
my BUY order:
my "half close" order:
ORDER_FILLING_RETURN should work here since the order is a market order ( ORDER_TYPE_SELL)