Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 199
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
Good evening.
Could you please tell me how to add closing all positions and deleting all orders at the end of the trading week?
Thank you!
Write such a script, then throw it on the chart when you want to close and delete everything. That's all...
You're welcome!
Write such a script, then throw it on the chart when you want to close and delete everything. The point is...
Please!
Thank you:) Clarifying the request.
We need to add code to the EA that will close all orders and positions at the end of the trading week.
Could you please write this code?
Thank you:) Clarifying the request.
We need to add code to the EA that will close all orders and positions at the end of the trading week.
Could you please write this code?
I can do that. No problem. Have you ever done anything yourself? This thread isn't about getting something ready for free, it's about helping those who are trying to code on their own.
Checked it out at https://book.mql4.com/ru/trading/orderclose.
Searched on google, on the forum. Didn't find any. Maybe I'm writing the query wrong.
Thought I'd ask in the newbie thread.
How do I prescribe?
As you run the script:
A window pops up with "general" and "input parameters" tabs.
Is it possible that when I run the script, a date box will pop up, I enter the date, click ok and everything will work?
And can I make the script remember the last date I entered?
The function determining the last closed position on the stop has the bool type, while you are trying to return the double type from it. Accordingly, it returns either 0 or 1.
I wrote you that you should add passing of one variable by reference into it:
Now check the last Buy, for example:
Like this...
The function determining the last closed position on the stop has the bool type, while you are trying to return the double type from it. Accordingly, it returns either 0 or 1.
I told you that you should add passing of one variable by reference into it:
Now check the last Buy, for example:
Like this...
Did everything as you said. All compiled...... but function does not work when testing advisor..... all positions advisor opens 0.1 lot.
Please tell me what my mistake is.
I do not understand this point - as you have correctly noticed the function returns the value of type bool, but in the function call, in which the function must put the value of type bool.
You suggested to specify other value types.
Thank you.
I did everything as you said. Everything compiles...... but the function does not work when testing the EA..... all positions the EA opens 0.1 lots.
Could you please tell me what my mistake is?
I don't understand this moment - as you correctly noticed the function returns value of bool type, but in the function call, in which the function should put value of bool type
Do you suggest to specify other types of values .
Thank you.
Why did you remove it. If you had left it, everything would have worked.
Why remove it. If they had, everything would have worked
Why remove it. If they had left it in, everything would have worked.
I put this mystery sign ...... but the result is the same ...function doesn't work