Profit and Loss Manager EA

2 April 2020, 10:55
HITESH ARORA
0
138

Profit and Loss Manager EA is to close the running or pending trades when reached to a specified profit or loss.

Product Link: https://www.mql5.com/en/market/product/47957

EA works fully on virtual mode, no hard Stop Loss or Take profit set. You can run the EA in any of the 3 modes:

1.    Per Trade: In this mode, actions are applied to all the trades separately. Rules are applied on a single trade separated, it’s profits/loss not combined with any other trades.

2.    Per Pair: In this mode, actions are applied to the sum of the trades in a single currency pair.

3.    Whole Account: In this mode, actions are applied to the combined results of all the trades in all currency pair.

The behavior of EA setting “Combine Buy & Sell” & “Current Chart Pair Only” for each Mode:

1.    Per Trade Mode

a.    Combine Buy & Sell: It has no affect in this mode.

b.    Current Chart Pair Only: If true, EA monitors only the current chart pair trades.

2.    Per Pair

a.    Combine Buy & Sell: If true, it will combine the results of all buy and sell trades for the calculation.

b.    Current Chart Pair Only: If true, EA monitors only the current chart pair trades.

c.    If both the setting are true; EA will run only for current pair and combine the both BUY and SELL for current pair. It has only 1 bucket with all BUY and SELL in current pair.

d.    If Combine Buy & Sell is false and Current Chart Pair Only is true; EA has two bucket one with all BUY in current pair and other with all SELL in current pair.

e.    If Combine Buy & Sell is true and Current Chart Pair Only is false; EA has one bucket per pair with all BUY and SELL combined.

f.     If both the setting are false; EA has two bucket per pair one with BUY trades and other with SELL trades.

3.    Whole Account: This mode is for all the pairs (whole account) but enabling Current Chart Pair Only add the restriction to it and hide all the other pairs.

a.    Combine Buy & Sell: If true, it will combine the results of all buy and sell trades for the calculation.

b.    Current Chart Pair Only: If true, EA monitors only the current chart pair trades.

c.    If both the setting are true, EA will run only for current pair and combine the both BUY and SELL for current pair. It has only 1 bucket with all BUY and SELL in current pair. This functionality will be same as in mode Per Pair.

d.    If Combine Buy & Sell is false and Current Chart Pair Only is true; EA has two bucket one with all BUY in current pair and other with all SELL in current pair. This functionality will be same as in mode Per Pair.

e.    If Combine Buy & Sell is true and Current Chart Pair Only is false; EA has only one bucket with all BUY and SELL combined for all pairs.

f.     If both the setting are false; EA has only two bucket one with BUY trades of all pairs and other with SELL trades of all pairs.

Calculation Used in Profit Book Type:

1.    Currency Calculation: It will sum the profit and loss of the trades based on the conditions given.

2.    Points Calculation: It works in two ways based on the setting Points Calculation Method. Preferred method to use for Profit Book Type is Average.

a.    Summation: If Points Calculation Method is Sum, it will sum all the points of the trades based on the conditions given.

b.    Average: If Points Calculation Method is Average, it uses Weighted Mean for the calculation. For example:

Let’s say there are 4 trades:

1.    1 lot, 100 pips profit

2.    4 lot, -15 pips loss

3.    0.1 lot, 50 pips profit

4.    2 lot, 25 pips profit

So points will be calculated as (1*100 + 4*(-15) + 0.1*50 + 2*25) / (1+4+0.1+2) = 13.38. As the average is calculated so the account will come to Breakeven at around 13.38 pips movement. There will be a slight difference because each pair has different profit value per pip.

Understanding of Loss Points/Currency: Loss value shows the lower value. It can be positive as well negative. For example:

·         If Profit Points = 100 and Loss Points = -100, it apply the actions when it moves either above +100 or below -100.

·         If Profit Points = 200 and Loss Points = 50, it apply the actions when it moves either above +100 or below +50.

Running Status of EA in Display: If the number of buckets in the EA becomes more, it may happen that it crosses the window of the chart. It show the trades in different ways based on the type of mode selected:

·         Per Trade Mode: In this mode, it shows each trade by their order number.

·         Per Pair Mode: In this mode, it shows each bucket by their symbol. When Combine Buy & Sell is disabled, it shows separately BUY and SELL.

·         Whole Account Mode: In this mode, it shows everything in a single bucket. When Combine Buy & Sell is disabled, it shows separately BUY and SELL.

 


Share it with friends: