Thanks to everyone for the advice.
With regards to automating that "take profit that triggers a trailing stop", I have already done it, on excel. It's not that hard with vba, considering I have been working on this excel system for two years.
What I find hard is finding the amount of trailing that would work. It's a problem that might require an equation to be solved, something I never have been good at.
Let's make some hypotheses, so maybe someone good at math can come up with the right equation for this problem, an equation that would tell me when and what trailing would be convenient.
--------------------
Hypothesis 1
Say we have a price/profit that goes straight up like this: 1, 2, 3, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 10, 11, 13, 11, 10 - OUT. When it hesitates and goes back to 2, never hesitates for more than 1 tick, and if it does it means the rise is over.
In this case, there are no doubts that the trailing stop is the best solution. We would use a trailing amount of 2 ticks, and we would always get the maximum possible profit out of every trade. But the problem is that the market doesn't behave like this all the time.
--------------------
Hypothesis 2
Say we have a price/profit that goes up like this: 1, 2, 1, 0, 1, 2, 3, 4, 5, 3, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 15, 14, 13, 12, 11, 10 - OUT.
In this case, if we wanted to reach a profit of 10, we would have to allow a trailing amount of 5 ticks, but that would also mean that we are renouncing to 5 ticks of profit from the top. We make a profit of 10 like before, but we went as far as 16. So the pattern seems to be that the more it zigzags the less a traling stop is advantageous.
---------------------
Hypothesis 3
A price/profit goes up like this: from 1 to 5, then back to 0, then up to 10, then back again to 0, then all the way up to 15, then back to 0...then all the way up to 25 before falling to 0.
This is not that rare when support/resistance levels are being tested. We need here a trailing of 15, which on the other hand would cause all trades below 15 (like the cases above) to lose money. In this case with such a traling stop of 15, we would make just 10 ticks of profit.
----------------------
My method in these 3 cases
My take profit/trailing would handle these 3 cases which do happen in real trading, the following way.
Hypothesis 1 (straight to the top): it waits for a profit of 9 then trailing becomes effective and follows the trade just the same as the trailing described. Yet it would lose on all trades with profits smaller than 9.
Hypothesis 2 (moderate ups and downs): it would act just the same way as the case above, but with a tighter trailing stop, so it would make a bit more money.
Hypothesis 3 (wide ups and downs): it would never reach a profit of 25, but it would stop at about 7.
The disadvantages are that, unlike a wide trailing stop, it almost never (it only works if the rises are quick and don't zig zag) lets profit run a lot because it implements a tight trailing stop, and that it never catches small profits like a tight trailing that started from 0 profit (mine starts from 9).
The advantage is that it catches profits that both a tight and a wide trailing stop would catch, but that they don't catch at the same time. A traling stop of 15 ticks in the first case would catch 0 profit , and a trailing of 2 in the third case would catch a 3 ticks profit.
-----------------------
Conclusions
As i said I am not good at math so I can't write an equation summing up the problem. I can't backtest either, so I can't find out what practically would work.
All I can say is that it seems to me that the more a market zigzags, the less a trailing stop works.
At the same time, the less regular the profits are, the less a take profit works. If the profits did all the craziest ups and downs (without triggering the stoploss) but always reached a profit of 10, my mix of take profit/trailing would be the best.
If the market was all an explosion of skyrocketing rises sometimes small and sometimes large, then a tight trailing stop would be the best, because those rises do not come back unless the rise is over.
I do not think that in all markets a large trailing stop works, even though is some situations it could be good, but overall it doesn't work.
With the little data I have, I would sum it all up and say that "tight trailing stops" is what works best, with a level of take profit to trigger such tight trailing to be tailored to the amount of time it takes a trade to really take off, since at least my trades hesitate quite a bit at the start, but usually go into profit, and it would be a pity to be stopped out with that tight trailing.