Hi everyone, I have a question, the below function can open 1 sell stop and buy stop when trades number is set at 0. But when I include the function in time and date to open trade at specific time and day of the week, it opens multiple trades what might the issue?
- Trade function opening multiple trades instead of one
- Enter Multiple trades and Trailing stop to start at profit
- Only one buy and one sell order per day
Jones John:
Hi everyone, I have a question, the below function can open 1 sell stop and buy stop when trades number is set at 0. But when I include the function in time and date to open trade at specific time and day of the week, it opens multiple trades what might the issue?
Hi everyone, I have a question, the below function can open 1 sell stop and buy stop when trades number is set at 0. But when I include the function in time and date to open trade at specific time and day of the week, it opens multiple trades what might the issue?
maybe need to increase TradesNumber after stop buystop/sellstop order has been sent?
or add else between those two if's (pending<=Trades_Number) Jones John: it opens multiple trades what might the issue?
Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
Code debugging - Developing programs - MetaEditor Help
Error Handling and Logging in MQL5 - MQL5 Articles (2015)
Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010)
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