trailing stop vs. take profit

Discussion in 'Automated Trading' started by travis, Apr 14, 2007.

  1. travis


    I had no doubts that a trailing stop would be better than a take profit, but I am having a very difficult time finding the right amount to allow for trailing, no matter what market.

    Did you have the same problem? It seems that actually a take profit gives better results. Unless we are talking about a trailing stop that allows 2 or 3 ticks ABOVE a certain profit (which is like saying a take profit plus a tight trailing stop), which is not what I had in mind speaking of trailing stops.

    The wide ups and downs of all markets seem to make it impossible to use a large trailing stop.

    What do you think?
  2. travis - excellent question.

    Here's what I found in my personal trading - I'm no good at trailing stops. :D Either too close and get ticked out or too generous and 'give money back'. But that's the fundamental issue with trailing stops, correct?

    So, here's what I do to try to take advantage of both - exit 1/2 contracts at a profit level, however you determine that. Trail the remaining 1/2 and 'give it room'. This will accomplish a couple things - keep you in the winners longer and help prevent over-trading. What I mean on over-trading is that if you exit a position at a full level, you have every reason to look for a re-entry. I found that by keeping 1/2 running, I am really keeping myself more disciplined and also getting much larger winners.

    And if the trailing is taken out at a loss, you still should have made money based on the first exit. So, that 1/2 trailer can be given cushion to work.

    At least, that's what I did.
    Good luck!
  3. travis


    Well, personally I can't do discretionary trading in all its aspects, not just trailing stops. I was talking about trailing stops vs. take profits in a fully automated trading system.

    The problem could be entirely solved if I could just test it, but I am unable to, since I developed my system on excel, getting plenty of live intraday data, and basically I don't have the skills to do backtesting on it (not even to collect the huge amount of data I would need).

    For now the following is going to be my answer, unless someone gives me better advice here. I will use a take profit that activates a trailing stop. Basically, only after a certain amount of profit is guaranteed, will the system allow for a trailing amount that corresponds to 1/3 of the maximum profit realized.

    For example, let's say the trade first of all has to exceed 9 ticks of profit. Then by allowing 1/3 retracement, we can go down to 6 ticks of profit before the system exits. Also, if it goes up to a maximum profit of 30 ticks, then, by falling to a profit of 20 ticks, the system would exit the trade.

    This is to prevent the system from missing out on potential profits when we have those occasional skyrocketing price rises/falls. And I think that overall I would not lose profit if compared to the original take profit I had in place.
  4. Good luck automating that. I'm sure it's possible and if you can find it, sounds like it could be the missing piece of the puzzle.
  5. spinner


    In fact, both of the strategies suggested above are excellent. And both are easily possible using execution programs that allow for it: NinjaTrader, Infinity AT, Transact AT, and probably others.

    Edit: And can be used in with either automated programs or discretionary-entry systems.
  6. TOM134



    You might try COOL-TRADE - it has a 'Real Time Test Environment' capability: paper trade with real live market data.

    ...."A real time market simulator is also included so that trading strategies can be tested and refined under actual market conditions.

    Additionally, traders using the CoolTrade platform enjoy deep discount fees: only a penny per share in commissions, with no minimums."

    I hope this helps.

  7. Only for stocks.... Oh well...
  8. l2tradr


    I just started a thread on that in this section. Any additional imput on CoolTrade? (If you'd like post in that thread so we don't hijack this one :) )
  9. travis


    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.


    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.
  10. i use both
    hard targets and trailing stops.
    seems to backtest best this way.
    you could get a copy of tradestation 2000i on ebay for backtesting. just a thought...
    #10     Apr 15, 2007