"Exp TralPartionClose" - assistant EA. Closes a part of a position during rollback.
This is an assistant EA fixing part of the profit at the rollback movement of the currency pair.
The tactics of profit fixing is provided on our website.
1 2013.03.07 00:00 buy 1 2.00 1.29667 0.00000 0.00000 3 2013.03.07 04:07 modify1 2.00 1.29667 1.29667 0.00000 4 2013.03.07 11:07 close 1 0.40 1.30174 1.29667 0.00000 202.80 10202.80 5 2013.03.07 11:07 buy 3 1.60 1.29667 1.29667 0.00000 6 2013.03.07 15:49 close 3 0.40 1.30668 1.29667 0.00000 400.40 10603.20 7 2013.03.07 15:49 buy 4 1.20 1.29667 1.29667 0.00000 8 2013.03.07 16:51 close 4 0.40 1.30982 1.29667 0.00000 526.00 11129.20 9 2013.03.07 16:51 buy 5 0.80 1.29667 1.29667 0.00000 10 2013.03.08 16:08 s/l 5 0.80 1.29667 1.29667 0.00000 -2.88 11126.32
- 1 - opened a Buy deal.
- 2 - after passing StartPointToTral points, set breakeven (при MovingInWLUSE = true).
- The price goes up, we trail the rollback start line up following the price.
- 3 - after a rollback from our line of more than OtkatPoint points down, we fix profit, closing PercentLotToClose percent of our lot. In this case, the next level of the rollback start is equal to "our current rollback line" + StepPointToFixLevel points. That is, the price must again pass StepPointToFixLevel points up from the line, and only then the algorithm is active again.
- 5 - again rollback, again fix profit of 20% of the initial volume. The algorithm is repeated.
- 10 - trend reversal, the position is closed at the breakeven (+swap). Our profit is about 1,125 dollars.
- StartPointToTrail - The number of points in profit to activate the partial closure function.
For example, StartPointToTral = 200: as soon as the position reaching 200 points of profit, the EA fixes the first level at 200 points.
- RollbackPoint - The number of points for the price to roll back in order to partially close the position.
For example, StartPointToTral = 200 RollbackPoint = 100: as soon as the price rolls back 100 points from the fixed level (200), a part of the position will be closed.
- StepPointToFixLevel - The number of points to fix the next level.
For example, StartPointToTral = 200 RollbackPoint = 100 StepPointToFixLevel = 150: after a part of the position is closed, the next level is fixed at 350 points (200+150).
- DisableLockClose - Disable using the partial closure algorithm, if a lock of two positions in different directions with the same lot size has been detected on the account.
For example: if you use the SafetyLock PRO EA and your positions has been locked in a "safe lock", this option (DisableLockClose = true) disabled partially closing this lock.
- PercentLotToClose - Percent of the initial volume to close a position.
For example, a position is opened with 2.0 lot at PercentLotToClose = 20%: the EA calculates the lot for partial closure as 2*0.2(%) = 0.4 lot. At a rollback, 0.4 lot will be closed, and at each consequent closure, the lot for closing will be equal to 0.4.
- FixLotToClose - Fixed lot value for closing each step. 0 - considers the lot percentage PercentLotToClose.
- CloseOnlyOnProfitZone - Apply partial closure only when the position is in profit.
- NumbersOfClose - Number of partial closures.
For example, NumbersOfClose = 3, PercentLotToClose = 20%, initial lot = 2.0: when calculating the lot for partial closure, the EA calculated 0.4 lots for closing at each step. The EA can apply closure with 0.4 lot only 3 times, the remaining 0.8 lot of the position will remain open.
- MovingInWLUSETRAIL - Move the position to breakeven at the first partial closure.
- If the partial closure function is activated, and the first part of the position was closed, the EA moves the stop loss to the opening price.
- If the price continues to move towards the opening price, the stop loss will trigger and the position will be closed with a profit of 0. In this case, a part of the position will be closed in advance.
- FixTrailingStopLevel - Fix the stop loss level when new levels appear.
For example, FixTrailingStopLevel = 100: if the price breaks the fixing level of StepPointToFixLevel (Orange Violet), then the stop loss is placed at the Current level (Red Blue)+-FixTrailingStopLevel points.
- OrderToAverage - Type of orders to monitor the program operation.
- MagicToTrailingProfit - Magic number to identify the positions. -1 = all positions on the current currency pair.
- Added the DisableLockClose option - disable using the partial closure algorithm, if a LOCK of two positions in different directions with the same lot size has been detected on the account.
For example: if you use the SafetyLock EA and your positions has been locked in a "safe lock", this option (DisableLockClose = true) disabled partially closing this LOCK.
NumbersOfClose - The number of position closures by trailing. 0 - unlimited
- Added parameter
FixLotToClose - Fixed lot value for closing each step. 0 - considers the lot percentage PercentLotToClose.
- Added parameter
FixTrailingStopLevel - Fix the stop loss level when new level appear, for example:
FixTrailingStopLevel = 100. if the price breaks the fixing level of StepPointToFixLevel(Orange Violet),
then the stop loss is placed at the Current level (Red Blue)+-FixTrailingStopLevel points
- Added lines to the chart:
Red Blue - Main lines of the defined levels
Yellow - Rollback level
Orange Violet - Next levels for fixing
If the position passes Red Blue, Yellow line appears for a rollback and Orange Violet line for fixing the next level
Fixed working with long tickets
Fixed errors with StepPointToFixLevel
Otkat was renamed to RollBack
- Added the EAPADPRO information panel
Details on the panel in our blog:
The following data has been moved to the Strategy Info block:
"BUY Next Level" - Next fixing level for BUY
"SELL Next Level" - Next fixing level for SELL
"BUY Rollback" - Partial closure level for BUY
"SELL Rollback" - Partial closure level for SELL
"BUY LotToClose" - Partial closure lot for BUY
"SELL LotToClose" - Partial closure lot for SELL
Attention: The data is displayed for 1 BUY and 1 SELL position.