How can I count number of positive results in column Profit/Loss if only setup is ob? I want to store the result in another cell where I can monitor percentage of my trade based on the setups So for example in this Table I would get 2 of 3 trade is successful if setup is ob.
Date | Profit/Loss | Bias | Setup |
---|---|---|---|
31/10/2022 | $1,000.00 | Up | fvg |
01/11/2022 | -$200.00 | Down | ob |
02/11/2022 | $2,000.00 | Up | br |
03/11/2022 | -$150.00 | Up | mt |
04/11/2022 | $1,500.00 | Up | fvg |
05/11/2022 | $1,500.00 | Down | ob |
06/11/2022 | $2,000.00 | Up | mt |
07/11/2022 | -$200.00 | Down | br |
08/11/2022 | $3,000.00 | Down | fvg |
09/11/2022 | -$1,000.00 | Down | fvg |
10/11/2022 | $2,000.00 | Down | ob |
11/11/2022 | $3,000.00 | Up | fvg |
Use Countifs()
function.
To get the percentage of the number of Profit/Loss values > 0 and setup = "ob" Divided by the count of instances of setup = "ob".
=COUNTIFS(B3:B,">0",D3:D,"=ob")/COUNTIFS(D3:D,"=ob")
=LAMBDA(PnL, Setup, TO_PERCENT(COUNTIFS(PnL,">0",Setup,"=ob")/COUNTIFS(Setup,"=ob")))
(B3:B,D3:D)
Used formulas help
LAMBDA
- COUNTIFS
- TO_PERCENT