Only 1 of 2 strategies within EA opens a trade
-
Hi Everyone,
I'm struggling to work out what im doing wrong here. Im trying to run 2 strategies within 1 EA so i can see what the combined backtest results are to see if i can get an improvement to my DD numbers. Essentially they both function as you would expect separately but when ive put them together and split them up using the group functions and adding some additonal variables so they are being counted separately only Group 1 opens trades. If i then highlight and switch those blocks "off" then the trades from Group 2 start working fine. Here is the link for it. Any help would be much appreciated.
Cheers
-
Hi, the only minor problems I can see is that at trailing stop group2 you forgot to specify group 2, and also in the global operations area, the close trades block, because you used groups, you should specify like this: 1, 2 in the group field.
I can't see anything other than that, and all of this is related to closing positions, so I don't think this has to do with your problem, everything seems correct. -
@Ads I see in the "big block" "Group 2" that the blocks 87 and 89 pass only if : Count_Trades_1<1, it might be the problem
-
@seb-0 That is what I was looking at right now... in both group 1 and group 2 area... you used block check position count == 0... then you have those conditions blocks where the value has to be lower than max trades per day, but I don't think it can get there if you have that condition above of == 0.
Edit: Sorry. So if you you have No position block at start, then that check position count block is of no use anyway... (redundant) if it is used for ==0.
And yes that condition block lower counts trades per day not positions so it's ok. That was my mistake with was I wrote above -
You guys are legends, thanks heaps for looking at it for me. The 87 and 89 blocks were the problem. They are also in there twice once further up as well so when i changed it over i did it there but not further down. Im very greatful. Cheers
-
@Ads For further optimisation, there are those blocks check positions count... 109, 110.. that check if positions <=0 which is redundant if you have blocks 111 and 112 "no position". And then you still have to specify groups in trailing stop, and close trades as I mentioned in my first comment.
Also, The numbering of the blocks is important, especially those at the head of the tree. First tree could start with 1, then the second tree 2 a.s.o, (as these numbers represent the order of operation), then bigger numbers, smaller numbers within those trees, then you can do Options>project options>normalise IDs. This option will take into account your specified ordering of blocks, but will trim down the number in the blocks IDs.
-
Agreed, there is still some reduntant stuff in there. Ill sort that out tomorrow. I did fix those other things in the trailing stop mentioned. Ill fix the block ID's too. I didnt realise they had much of an affect. Thanks again!