How to calculate Total Wins & Total Losses
-
Hi everyone, I'm a bit stuck on how to get my write to file to work to record all the wins losses and Win rate my EA produced.
So far I have created variables for each output, and have out the variables in the write to file block.
I am struggling to workout the total wins and total losses.
So far I have tried using the 'for each trade closed' block and then am not sure which way to go.
I have some trades that close in profit without fitting the TP because my indicators sometimes take me out the trades early (This is what I want) so I need something that records every trade closed in profit to add + 1 to my Wins variables vice versa.
Any help would be appreciated.
-

Cant figure out which blocks to use after for each closed trade, I just need a block to work out if the trade closed in profit and a trade closed in a loss
-

Another attempt lol still doesn't work
-
@mabz_h Have you tried whit the "Buckets "?
-
Thanks that's a good idea, I'm still a bit confused about the condition I should be used to calculate the total wins and total losses.
I have attempted this

-

Tried this too, gives an error invalid function parameter 4051
-
@mabz_h I'm not completely sure what you want. Please correct me if I'm wrong.
- You want how many closed trades are in profit (you do not want the profit, just the number of trades).
- You want how many closed trades are in loss (as above).
- You want the % ratio of winner trades over loser trades.
Is that correct?
-
@mabz_h I started to make a panel that should give me that information, look in the forum for my panels and possibly someone will help you.

-
Hey @l-andorrà yes sir!
-
@xyon126 thank you il have a look
-
@mabz_h xyon126 is right. I remember that info was in his panel.
-
@mabz_h try this way