PartialClose and VirtualTrailing
- Utilitários
- Sergiy Podolyak
- Versão: 2.0
- Ativações: 10
Description
ea-PartialClose&VirtualTrailing – fully automated advisor for transaction support. Version = Multi = provides support for any BUY or SELL positions.
The adviser almost perfectly averages profit and loss. In open positions, it is recommended to use Stop-Loss, and do not set TakeProfit, which limits profit during sharp surges of the symbol price.
The trailing process is virtual, since each movement of the levels that are responsible for a certain part of the position does not modify the stops of the position itself.
How is the process of virtual tracking of positions with partial closing?
Consider the option for a BUY position.
1 2 3 4
LevelsClose = "05/10/15/20"
PercentsClose = "30/30/20/20"
At the moment of opening a BUY order, levels are built below the order opening price at the distances specified in the LevelsClose parameter. At each level, the part of the order specified in the PercentsClose parameter is closed.
1. The order is open.
2. The levels are lined up below the order opening price at a distance of: (1) level -05 points, (2) -10 points, etc.
3. The price moves up and all levels move up following the price.
4. The price turns around and starts moving down.
5. The levels do not move and remain in place.
6. The price crosses the first level. (1) Partial closing of 30% of the order occurs.
7. If the price moves further down and breaks through the (2) level, a partial closure of 30% of the order occurs.
8. The price moves up again and the remaining 2 levels move after the price.
9. The price turns around and starts moving down
10. The price crosses the (3)th level. Partial closing of 20% of the order occurs.
And so on until all levels specified in the parameters are broken
- LevelsClose
- PercentsClose
----------------------------------------------
Settings and input parameters:
"===== PARTIAL CLOSE OPTIONS =====";
PartialOn = false; // true – Allow partial closing of Positions
LevelsClose = "05/10/15/20" // Partial order closure levels (in points).
PercentsClose = "30/30/20/20" // Partial order closure percentage (as a percentage of the starting
lot).
"===== TRAILING VIRTUAL OPTIONS =====";
TrailingVirtual = false; // true - Разрешить виртуальный трал с частичным закрытием ордеров
Levels_Virt = "30/45/60"; // Виртуальные уровни трала (пункты)
Perc_Virt = "30/20/50"; // Процент закрытия виртуальных уровней трала
DelayVirtTral = false; // true - Задержка выполнения трала
DelayVirtual = 15.0; // Расстояние задержки трала (пункти) от цены открытия позиции
"=== Other Params ===";
Magic = 3911; // Магическое число ордера
UseSound = true; // Звук частичного закрытия позиций
UseComments = true; // Комментарий к Позиции
"*** Params for TESTER only ***"
TesterBuy = false // открывает ордер Buy для проверки - работает только в тестере
TesterSell = false // открывает ордер Sell для проверки - работает только в тестере
"*** LineBuy / LineSell ***"
UseLine = false // Отображение линий виртуального трала
InpColorBuy = clrLimeGreen // цвет уровней частичного закрытия Buy ордера
InpolorSell = clrLightPink // цвет уровней частичного закрытия Sell ордера