# Quick Closure MT5

This is a handy Expert Adviser that helps you to close all the profits first, before using the profit collected to close the losses.

The largest loss is being closed first before closing the rest.

If there is not sufficient profit to close the losses, they will remain.

It is made for traders who need to manage many hedging orders at the same time.

There are only 2 parameters to modify. Just place it on the chart for it to work.

### Parameters

- Profit used as trigger to close out losses
- Default is $10.
- Percentage of actual profit collected to be used
- Default is 80%.
- Specified percentage of actual profit collected will be used to close out the losses with some remaining.

### Examples

Let's say you have 5 orders and all of them are running at the same time.

Profit used as trigger to close out losses is $10.

Percentage of actual profit collected to be used is 80%.

**First scenario:**

- Estimated profit of 3 of them sum up to be $9, while 2 of them sum up to be -$8.
- $9 is not over the minimum profit ($10) used to close out losses.
- Quick Closure will not do a thing.

**Second scenario:**

- Estimated profit of 3 of them sum up to be $12, while one of them is -$8, and the other is -$1.
- $12 is over the minimum profit ($10) used to close out losses.
- Quick Closure will first close the 3 profit orders to gain $12, and then use 80% of $12 = $9.6 to close the -$8 first since its loss is bigger than the -$1 loss.
- Profit becomes $1.6 after closing the bigger loss.
- $1.6 is then used to close the -$1 loss.
- The final gain is $0.60. All the orders have been closed.

**Third scenario:**

- Estimated profit of 3 of them sums up to be $12, while one of them is -$8, and the other one is -$4.
- $12 is over the minimum profit ($10) used to close out losses.
- Quick Closure will first close the profit orders to gain $12, and then use 80% of $12 = $9.6 to close the -$8 first since its loss is bigger than the -$4 loss.
- Profit becomes $1.6 after closing the bigger loss.
- $1.6 is then used to close the -$4 loss, but couldn't.
- The final gain is $1.6, remaining with a -$4 paper loss.

无评论

版本 1.2
2017.12.18

1) It is now mandatory to use minimum profit specified as trigger to close out the losses.

2) Percentage of actual profit collected to be used for closing out the losses can now be specified.

3) Some bug fixes to improve the product quality.

2) Percentage of actual profit collected to be used for closing out the losses can now be specified.

3) Some bug fixes to improve the product quality.

版本 1.1
2017.11.28

Converted utility script into an expert adviser that monitors the minimum profit accumulated, which is subsequently used for closing the losses.