A sub-workshop to fill in the FAQ (frequently asked questions). Let's help comrades! - page 13
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
(Integer ): With Instant Executuion, an order can be opened with a pre-set stop-loss and take-profit, set the Slippage in pips, which allows opening an order when the price at the moment of its execution by the broker deviates from the trader's request price. At Market Execution it is not possible to open an order with a pre-determined Stop Loss and/or Take Profit, there is no parameter for the Slippage. The order is opened at any price available at the moment of its execution by the broker. A Stop Loss and/or Take Profit can be set immediately after the order is opened. Most dealing centres work in the Instant Execution mode. Not so many dealing centres operate in the Market Execution mode.
More and more brokerage companies are switching to Market Execution. Soon the information given by Integer will become irrelevant.
it's just information about the two modes.
and that's exactly what the last paragraph of the FAQ says - a trend! https://www.mql5.com/ru/forum/131853/page3#464977
-------
By the way, how is the glossary of terms, is the patient rather alive?
1. and the last paragraph in the FAQ says exactly that - trend! https://www.mql5.com/ru/forum/131853/page3#464977
-------
2. By the way, how is the glossary of terms, is the patient rather alive?
1. Didn't see the last paragraph in the FAQ on the link and only reacted to granit77's post.
2. I have read the section on which I offered my own help. But it is as complete as one could wish for. There is practically nothing to add. I should have reported it earlier - I regret not having done so.
Still, the section can add jargon abbreviations of terms that are in use by programmers and traders. I have just started a new job and I have very little free time now, barely enough to at least continue my own project. Therefore, I will gradually write down "on a piece of paper" and when I accumulate more of it, I will add it to the section. OK?
Question: Getting an array of "own" orders
Answer: From the point of view of code optimization, this is the convenient approach: first, we conduct "revision" of "friendly" (that is orders with the given MagicNumber()) orders, create an array of tickets with full information concerning each ticket, and then we conduct all other checks (for closing and modifying positions) with the same array of tickets.Example #1. Gathering information about tickets on one currency pair.
If you like, you can declare this function of int type and make it return the number of "own orders".
If our EA is multi-currency.
Example #2. Gathering ticket information for several currency pairs.
In order to check for "friendly" symbols in this case, we will need one more small function:
and our function will have this form:
Question: Obtaining an array of "own" order tickets
Answer: (Continued)
No wonder if you want your EA to have additional statistics about its work, for example: the maximal drawdown, total profit, etc. So that you don't have to "disturb" the server with additional requests, we recommend you to add functionality to our function (excuse the pun). In this case the function may look like this
Variant 1 for a monocurrency EA:
Variant #2 for multi-currency:
In the above examples on ticket information gathering, this information is enough in the vast majority of cases. But in more complex systems, no one forbids you to store information about them in an array of tickets, for example, if virtual stops are implemented in your Expert Advisor:
In general, here you are limited only by the flight of fancy / fanaticism and the level of MQL4 knowledge.
TarasBY
In order not to unnecessarily "disturb" the server with requests...
The server is not disturbed when collecting orders. The ideology of collecting order information into an array -- UG. This is in no way allowed in the FAQ.
Suggest another option. for the need to work with "own" orders