Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 952
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
and don't you look at the error code on the sreen. the fxssi contacts are there as it is, but they say the problem is in mt4.
Who is "they"? Who is "fxssi"? ?
Hello. I am drawingOBJ_RECTANGLE on the main chart. But when I scroll in history, the chart is getting wider and narrower, and OBJ_RECTANGLE is getting small and then the text inside OBJ_RECTANGLE is moving out of line of OBJ_RECTANGLE, and then it is moving back. What is the solution to this problem, if OBJ_RECTANGLE is always the same size and the text does not jump out of OBJ_RECTANGLE?
You need to find the last order which was opened. Find its ticket. Then we will search the list of object names for a substring containing the last order ticket found in the object name line. As soon as the ticket of the last order is found in the object name, this is the necessary graphical object. All that remains is to extract what you need from this graphical object.
What's wrong with me? How can I make only open orders be considered? This code still captures partially closed orders which I don't need
How can I make only open orders be considered? This code also captures partially closed orders, which I don't need
You need to use the MODE_TRADES parameter:
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
MODE_TRADES - current orders
MODE_HISTORY - historical
You have to use the MODE_TRADES parameter:
MODE_TRADES - current orders
MODE_HISTORY - historical
is not an option. it does not depend on this
You must use the MODE_TRADES parameter:
MODE_TRADES - current orders
MODE_HISTORY - historical
pool=MODE_TRADES
[in] Data source for selection. Used when the select parameter is equal to SELECT_BY_POS. Can be one of the following values:
MODE_TRADES (default) - order is selected among open and pending orders,
MODE_HISTORY - the order is selected among closed and deleted orders.
This parameter is not required at all since it is set by default.
I have anOBJ_RECTANGLE object linked by price and time, not by coordinates.
What's wrong with me? How can I make only open orders be considered? This code also captures partially closed orders, which I do not need
There is no separation between positions and pending orders in mql4. And furthermore, there is no sifting out of positions left from partially closed ones. In the comment of an order, there is a ticket number from the partial closing of which it is formed. So, we should sift out the ones we do not need according to this comment.
I need to draw anOBJ_RECTANGLE frame around each bar, and OBJ_RECTANGLE_LABEL is created for GUI design. I need to use OBJ_RECTANGLE, but how can I make it not scale?