당사 팬 페이지에 가입하십시오
- 게시자:
- Vladimir Karputov
- 조회수:
- 5104
- 평가:
- 게시됨:
- 2018.06.18 10:22
-
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
Idea by: Igor.
MQL5 code by: Vladimir Karputov.
Suppose a trader enters the market with the Buy and Sell positions by an asset, where the currency is, say, at the level of 100. Then the prices moves to 200. Here, buying for 100 will be profitable, and selling for the same will be losing. We close our buy position, and the profit of 100 comes to our account. In this case, selling results in losing 100 units.
When using a grid, you should be sure of being able to make profit whatever direction is taken by the market. For this purpose, enter your Buy and Sell transactions again. Now, for the sake of convenience, let us assume that the price is moving to level 100 again.
The repeated selling will lead to +100, while the second buying will result in -100. According to the rules, you can close your sell position, and 100 more units will enter to your account. As a result, at this point, we have the total profit of 200.
Now, the first sell position that has remained active is moving from level 200 to level 100. It is in the breakeven range now.
Summing up the four transactions, we get the profits as follows: +100 for the first Buy; +100 for the second Sell; 0 for the first Sell, and -100 for the second Buy. The total profit has made +100. So we can delete all the orders and drink a glass of champagne. Prior to each subsequent double opening (simultaneous opening of Buy and Sell), we increase the lot size by the factor of Lot exponential.
There are many other market movements that make profitable these seemingly incomprehensible activities of simultaneous buying and selling.
However, in such trading, there is always a risk of "hanging" positions, i.e., positions that produce relatively high losses and have an opening price that is located very far from the current price. To overcome such "hanging" positions, we have introduced two parameters: Excess of balance over Equity (balance exceeding the Equity) and Mimimum profit.
In all cases, be careful, since two scenarios are possible: Optimistic
and pessimistic
Input parameters
- Lots - initial lot;
- Take Profit - Take Profit;
- Lot exponential - lot increase ratio;
- Excess of balance over Equity - balance exceeding the Equity;
- Mimimum profit - minimum profit;
- magic number - unique identifier for the EA.
MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/20781

An automated trading system with a data panel in form of the OBJ_LABEL objects.

An NRTR-type indicator using Average Directional Movement Index.

Indicator ADX_Cross_Hull_Style_NRTR with the timeframe selection option available in input parameters.

The inverted chart of the current financial instrument.