| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| A Trading Riddle re: TP and SL Targets https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=709 |
Page 1 of 3 |
| Author: | Jemook [ Tue Jul 17, 2012 3:19 pm ] |
| Post subject: | A Trading Riddle re: TP and SL Targets |
Here's a fun riddle I'd like to propose for the smarter minds amongst us. I'm going to give you a bunch of past results and you are going to come up with a solution for what we should use as a SL based on these past results. Here we go: I have a strategy which tells me the AUDCHF has been in an uptrend for the last 10 days. My strategy is based on entering AT THE DAILY PIVOT each day in the direction of the trend. This means any move ABOVE the daily pivot is considered profit and any move BELOW the daily pivot is considered a loss. I recorded (for the last 10 days) the maximum pips price moved BELOW the daily pivot. Here they are: 0 32 76 2 32 43 10 24 3 5 Now based on these past results I want to find a number to use as my SL today. I want to make sure it's a number that gives me the best chance of my SL not getting hit. If I average these numbers i get '23' which would get hit 5/10 times if i had used that for the past 10 days. So that is definitely not the way to go about it. Here's what I've come up with: SOLUTION 1 1. Remove the outlier (76) 2. Add up the top 3 worst days results after removing the outlier and average them: (43+32+32) / 3 = 36 If I had used 36 as my stop for the past 10 days the stop would have only been hit TWICE out of 10 times! SOLUTION 2 1. Add up the top 3 worst days results and average them: (76+43+32) / 3 = 50 If I had used 50 as my stop for the past 10 days the stop would have only been hit ONCE out of 10 times! ON TO YOU GUYS So I may not be the best at maths/statistics/probability but I'm sure there is a really good way of doing this. I'd love to hear what you come up with. Any ideas? After we crack this code we will look at TP next Jem |
|
| Author: | NeoTrader [ Tue Jul 17, 2012 3:40 pm ] |
| Post subject: | Re: A Trading Riddle re: TP and SL Targets |
Hi Jem, as a quick shot... I would say the average of your last ten days (23) x 2 = 46 would also be hit one time out of ten... But why you don't use the latest swing high/low + some pips? It works very well from my experience... And as TP the same amount of pips as from entry to SL... just a thought. happy trading, NeoTrader - |
|
| Author: | garyfritz [ Tue Jul 17, 2012 3:59 pm ] |
| Post subject: | Re: A Trading Riddle re: TP and SL Targets |
Yes, basing the stop on PA is a good idea. But if you want to just look at the SL values, why not see what different levels would cost you? A SL of 80 would have lost NOTHING... at least in this example!! SL of 75 loses 75. SL of 50 loses 50. SL of 40 gets hit twice, so it loses 80. SL of 30 gets hit 4 times, so it loses 120. SL of 20 gets hit 5 times, so it loses 100. SL of 10 gets hit 6 times, so it loses 60! But you also have to consider the opportunity cost. What would the SL trades have WON if they didn't hit the SL? The SL=10 case looks nice, but you lost 6 winning trades. The actual cost is (SL loss) - (missed win). If we say the average winning trade makes 30 pips, then SL=50 loses 80 (-50 SL - 30 missed win), SL=40 loses 140, SL=30 loses 240, SL=20 loses 250, SL=10 loses 240. For this small sample, SL=50 is about optimal. (Which happens to match Neo's answer but he just got lucky!!! But this is too small of a sample to get a good valid result. You want to look at at least 30 trades or so, preferably 30 losses. In TS I choose SL / PT by backtesting, which is effectively what you're doing here. I sweep the SL value through a range, and see how the system performed at different levels. I look at the net profit, the win%, the average win size, the equity curve, etc. You can do a mini version of that with the process I used above. For TP it depends on your win% -- the more winners you get, the smaller TP you can accept -- and what the market typically acts like. If the market tends to trend, then DON'T use a TP -- let the winners run, and use an exit signal like an opposite-direction entry or something like that. If the market doesn't tend to trend, then pick a TP that maximizes your profits and your winners, i.e. that most often catches the maximum positive excursion before the market turns back and gives away your open profits. Make sure the TP is large enough, given your win%, so you still have a good positive expectancy. |
|
| Author: | Jemook [ Tue Jul 17, 2012 4:26 pm ] |
| Post subject: | Re: A Trading Riddle re: TP and SL Targets |
NT - I like the idea of doubling the average. I'll test that out soon. GF - I definitely like your idea of looking at set levels and working out which one gets hit the least over the sample. How are you with excel? A spreadsheet would be very handy for testing your method out However, personally I'm using a risk % per trade rather than $ amount per pip. So it doesn't matter how many pips I lose / make but rather making sure my TP gets hit as often as possible and my SL gets hit at least as possible. Of course tweaking my risk:reward is also highly important. Anyway your response has REALLY got me thinking, thank you. |
|
| Author: | garyfritz [ Tue Jul 17, 2012 4:52 pm ] |
| Post subject: | Re: A Trading Riddle re: TP and SL Targets |
I'm OK with Excel. I'm sure I could knock out something that would do the kind of analysis I did above. Can you generate a larger sample set? If you describe your strategy, maybe I could implement it in TS and do a full SL/TP optimization test on it. And backtest it while I'm at it, to see how well it works on lots of pairs. Pips vs. % doesn't really change the logic. The risk:reward is the same; the only thing that changes is the position size. The process would still work. |
|
| Author: | Jemook [ Tue Jul 17, 2012 5:26 pm ] |
| Post subject: | Re: A Trading Riddle re: TP and SL Targets |
I'm just playing around now with the following formula in Excel: =COUNTIF(E2:E8;">5") Gives me a count of values in that range which are > 5. Very cool. In regards to a larger sample size I only want to look as far back as the pair has been trending. I can visually do this by looking at the daily bars and counting back how many since the uptrend started. For example AUDCHF has been uptrending on daily for 39 bars. Here's how many pips we moved below the pivot for each of those 39 days: Code: Select all If we used 20 as our stop we'd get hit 17 times If we used 30 as our stop we'd get hit 12 times If we used 40 as our stop we'd get hit 4 times If we used 50 as our stop we'd get hit 3 times If we used 60 as our stop we'd get hit 2 times If we used 70 as our stop we'd get hit 1 time So the best stop to use would be somewhere just above 40. That way we don't get hit too often but we keep the stop as low as possible. If I do the same for the move ABOVE the pivot (profit) I get this for the last 39 days: Code: Select all If we used 20 as our limit we'd get hit 34 times If we used 30 as our limit we'd get hit 28 times If we used 40 as our limit we'd get hit 28 times If we used 50 as our limit we'd get hit 19 times If we used 60 as our limit we'd get hit 15 times If we used 70 as our limit we'd get hit 12 times If I made my stop 40 and TP 40: I'd get stopped out 4 times and TP 28 times. I'd lose 160 pips but make 1120 pips or a total of 960 pips. Very interesting. Didn't realise it would be so simple. So then it's just a question of working out what works best. Great stuff Gary I really appreciate you knocking some sense into my head. Feel free to whip up an Excel spreadsheet that takes this one step further. |
|
| Author: | garyfritz [ Tue Jul 17, 2012 5:36 pm ] |
| Post subject: | Re: A Trading Riddle re: TP and SL Targets |
That's a pretty fab result! 87.5% wins, 30 pips average per trade. You want to find out if it works on more pairs. If you have a system that pops out 30 pips every time it trades, you want it to trade as often as possible! You had the right idea with COUNTIF. You can just make a table of values and COUNTIFs that use them. So e.g. if A1 is 10, and B1 is =COUNTIF(<<max positive excursions>>,">"&A1), that'll tell you how often it's > 10. Then copy A1 and B2 so you have two columns of 10's and COUNTIFs, and change the 10's in column A into 10, 20, 30, 40, 50, etc. Et voila! You have a nice summary of your TP behavior. Do the same with negative values & "<" in the COUNTIF and you've got the SLs. If you want, we could probably get a little fancier and combine the max-negative and max-positive tables into a mini-backtest that tells you how any particular combination of TP/SL behaves. Wouldn't be as accurate as a TS backtest -- e.g. it won't get it right if the market whipsaws and hits both TP and SL -- but it might be useful. |
|
| Author: | Jemook [ Tue Jul 17, 2012 5:38 pm ] |
| Post subject: | Re: A Trading Riddle re: TP and SL Targets |
What's a TS backtest btw? I'm off to sleep for now, if you can be bothered whipping up an Excel sheet go for it and post it up – otherwise I'll make an attempt tomorrow and post it. THANKS GARY! |
|
| Author: | garyfritz [ Tue Jul 17, 2012 5:40 pm ] |
| Post subject: | Re: A Trading Riddle re: TP and SL Targets |
Tradestation -- which has a very accurate backtester. If you can explain the strategy (in PM or email if you want), I can implement it in TS and give you a complete trading history for the last year or whatever, on 28 pairs. That'll tell you how well and how consistently it works, if it works well across all pairs, lots of stats and equity curves, etc. |
|
| Author: | mobthehop [ Wed Jul 18, 2012 2:06 am ] |
| Post subject: | Re: A Trading Riddle re: TP and SL Targets |
Jemook / Gary please continue to discuss this here, I for one am very interested in this subject Very interesting subject! |
|
| All times are UTC | Page 1 of 3 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|