[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 178
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
Thanks for the good news!
Hello. Please help me solve problem number 3 shown in the picture. If problem number 4 arises, then that too. Please explain it to me as a dummie.
Let's say I opened an order.
1 in buy. lot 0.01
but the price went down. and I decided to open a sell position with a lot more for example 0.1
How can I now close the loss-making deal in Expert Advisor at the expense of the profitable. is it even possible? so the first position is a 0 loss and the second profit is less.
I.e., I want to close all losses of the first position with a part of profitable one.
Or I want to cross-close two positions at once, close one order at the expense of another.
How to implement this programmatically? Is there some function?
Korinf, read about OrderCloseBy().
Thank you.
https://www.mql5.com/ru/code/9425 try the website search - good
Not so thanks. More specifically, I need to know how to return the number of closed orders intraday, not the entire history (is it possible to use something other than the OrderHistoryTotal function)
Good afternoon. Excuse me, if you could help. I'd like to take apart the code of the indicator line by line. What is this buffer, what is it for? The reference that number three is a number of buffers is not clear to put it mildly.
Allocates memory for buffers used for custom indicator calculations. The number of buffers must not exceed 8 and must be less than value specified in indicator_buffers property. If your custom indicator requires additional buffers for counting, you should use this function to specify the total number of buffers.
Suppose, if you use 3 buffers for drawing and 2 more buffers are used to make calculations without displaying them on the screen, you should use
#property indicator_buffers 3 //number of buffers to draw (display)
.......... .
IndicatorBuffers(5); //total number of buffers in the indicator
Maybe it would be better to read the Language Reference - ALL of it - and then there won't be any questions left :-)