Filter trades
-
Good Morning,
Can anyone suggest the ways to filter the trades in martingale EA.
For example if one cycle of trade is running and if there is a certain drawdown it must open a new cycle and count the trade according to second new cycle and must not count the previous trade count and its volume both.
I count putting a group number but what it is doing, it only closing the magic number trades but not include the group trades.
So i need to run 2 different cycle independently but when it went into profit on global space it must close all trades linked to magic and each group
-
@Mani13 You are doing it right. Each cycle needs separate group numbers. But remember that they can be combined. For example when looking at profit, like this:

This way all profit coming from groups 1 and 2 is summed up combined.
-
Thank you @l-andorrà for stepoing in, you always come first, Thank you.
I understand your suggestion and I am 100% sure it will work. -
You're welcome.

-
@l-andorrà The thing you suggested works perfectly, and thank you for that.
I have a another question from same topic that I also count the buys and sells independently for second cycle linked to second group, But currently it is counting the previous cycle trades and opening new trades while including -previous group trades also
-
Not sure what you exactly mean. Could you please share a numeric example of what you need?
-
For example I have 3 trades open from Group A
Trade 1 - 0.01
Trade 2 - 0.02
Trade 3 - 0.04and now i want to EA to open a new cycle of trades in Group B which needs to be independent of the count and lot size of the trades of Group A.
In Cycle 2 of Group B initial lot is 0.10 and
if trade count is 1 then open second trade 0.20
Trade count 2 then third trade 0.40
count 3 then 4th trade 0.80But now what happening is it is counting the trades of first cycle as well and it is directly jumping to open the 4th trade of cycle 2 Group B skipping 1st, 2nd and 3rd trade of cycle 2 Group B even when I filter them to count by Group B but still it is counting Group A trades.
-
Then you need to create 2 completely independent structures with 2 complete independent sets of groups numbers. In my exmaple above I used groups 1 and 2. You will have to create groups 3 and 4 now on a separate structure.