Configuring Partial-Close Levels
Partial-Close Levels are added, edited or deleted on the "Partial Close" tab of the fnCloseOrder function configuration window.
- When the Partial-Close feature is first enabled, one "Partial Close Level" is automatically created.
- To add a "Partial Close Level" click the Add button.
- To remove a "Partial Close Level" click the down arrow on the Add button and select Remove.
- Note: The top-most "Partial Close Level" can not be removed.
- An unlimited number of "Partial Close Levels" may be added.
To configure a "Partial Close Level" enter values for the PIP Profit and Lot Size values.
- The Pip Profit value is the numbers of pips of profit the trade needs to reach to set the lot size of the trade to Lot Size.
- The Lot Size is the number of lots that will remain open when the Pip Profit value has been reached.
- The example in the image below shows these values:
Pip Profit |
Lot Size |
Notes |
25 |
4.0 |
When the trade reaches 25 PIPs of profit, the number of open lots is modified to 4.0. This trade was opened with a lot size of 5, therefore 1 lot is closed to set the Lot Size to 4.0. |
50 |
3.0 |
When the trade reaches 50 PIPs of profit, the number open lots is modified to 3.0. |
75 |
0 |
When the trade reaches 75 PIPs of profit, the number open lots is modified to 0. The trade is closed. The last level may close all remaining lots or leave some portion of the trade open indefinitely, to be closed by a trailing or fixed stop, etc. |
Pip Profit is the difference in points between the current market price and trade's open price. It does not account for the number of lots open or the profit in dollars (or base currency).
If a level has ever been reached the lot size is modified. Therefore, it is possible the trade's lot size may be 3.0 lots with a profit of less than 50 PIPs. This is because the trade at one point was 50 PIPs in profit.
NOTE: The levels will always be arranged in the order shown above:
- Pip Profit from smallest to largest and Lot Size from largest to smallest.
- This sorting does not occur in VTS. It is implemented in the generated MQL code because the level values may be variables that can not be sorted until their value is known.
- The Partial-Close feature only allows Lot sizes to become smaller as Profitincreases.