Counting of winning and losing positions.
-
Is it possible to perform a search on trades already closed by obtaining the count of winners and losers separately?
I tried it this way and it shows a wrong count.
Any examples in fxdreema that might help?
I noticed that there is a place to create filters "Filter Condition(Advanced)" but I haven't found anything in the Fxdreema forum that is to identify the way I want.

-
@ontradingx To be honest I do not know if this is possible but, I use a what is in this picture:

Hope this helps -
@jstap hello, which one should i choose?

-
@ladydolares Last closed
-
@jstap thanks
-
@jstap Thanks, but I believe this will not work correctly, because if the EA is taken off the chart the information is lost.
That's why I'm wanting to perform a search on everything that has already been closed. -
@ontradingx This will only tell you what has happened while EA is on chart, I am not very practiced with bucket of trades so I can't help about this.
-
@ontradingx Then you need a 'For each closed trade' structure. That loop will scan all closed trades in the history tab.
-
if you want a solution that is bullet proof you need to loop all trades 1 once a certain time is over but this can take long the more trades you take
would look like this
reset variables before the loop
loop all trades for profit
make a counter per run that increases
if close >open and profit is >0 /buy profit +1
if close >open and profit is <0 /buy loss+1if close <open and profit is >0 /sell profit +1
if close >open and profit is <0 /sell loss+1is a quick draft i hope i am right with the directions of the closing trades but should give you an idea what you need...
-
@bk7 Hello
Hello, it helped and I'm trying to create your logic here.
Below is an image that explains visually what I want to have.
What is missing is just the part of counting and separating gains and losses.

-
this is a way different task if you want to split it in day week etc
you would need to make ranges of time for each category
so lets say day is from unixtime to unixtime
and then make counters for each category buy and sell
loop all trades
first action in the loop will be check age find category and then make the counter +1
so if would look like this: if unixtime of current trade >= unixtime_category min && unixtime of current trade <= unixtime_category max && close > open && profit >0 / then category_profit buy +1so would be 4 ifs per category (6 in your picture) so overal 24, which is no big task
bu you cant loop often for the history this takes much time, so you would need to find something that works as limit for oyu or you accept that it takes long, depending on how exact this has to be and how important.
but this should give you a rough guidance
-
@ontradingx You can also select a 'once per bar' block speciftying one day, one week or one month. That way unix time considerations can be skipped.