| Automated Trading Black box systems, strategy automation, algorithmic trading, etc... |
![]() | | Tweet | |
| | #9 | ||
![]() | Re: Is Optimizing Profit Target & Stop Loss Curve Fitting? I agree using S/R levels would be good but I'm working on an automated strategy and determining the S/R levels programmatically isn't easy to do. | ||
| |
|
| | #10 | ||
![]() | Re: Is Optimizing Profit Target & Stop Loss Curve Fitting? Code: vars: Support (0), Resistance (0); Resistance = highest(H,Length)[1]; Support = lowest(l,Length)[1]; if Resistance<>Resistance[1] then Resistance = highest(h,Length)[1]; if Resistance=Resistance[1] then Resistance = Resistance[1]; If Support<>Support[1] then Support = lowest(l,Length)[1]; if Support=Support[1] then Support = Support[1]; | ||
| |
|
| The Following User Says Thank You to zapisy For This Useful Post: | ||
cunparis (02-03-2010) | ||
| | #11 | ||
![]() | Re: Is Optimizing Profit Target & Stop Loss Curve Fitting? Code: vars: Support (0), Resistance (0); Resistance = highest(H,Length)[1]; Support = lowest(l,Length)[1]; if Resistance<>Resistance[1] then Resistance = highest(h,Length)[1]; if Resistance=Resistance[1] then Resistance = Resistance[1]; If Support<>Support[1] then Support = lowest(l,Length)[1]; if Support=Support[1] then Support = Support[1]; | ||
| |
|
| | #12 | ||
![]() | Re: Is Optimizing Profit Target & Stop Loss Curve Fitting? Quote:
| ||
| |
|
| | #13 | ||
![]() | Re: Is Optimizing Profit Target & Stop Loss Curve Fitting? Quote:
| ||
| |
|
| | #14 | ||
![]() | Re: Is Optimizing Profit Target & Stop Loss Curve Fitting? Quote:
I have no doubt that if market conditions change that it'll probably stop working. I've done some forward testing by reserving the past 3 months and excluding them from the optimization & backtests. it forward tests fine so I'm sure I'm not curve fitting. My plan is to trade this, first on sim, and then with a small amount (say $100 risk) and then slowly increase the position size. If I get a behavior that's inconsistent with the past then I'll re-optimize for the most recent 6 months or so and compare the optimal results. If a slightly smaller target or bigger stop is needed then I can make that decision. any change in market conditions should be gradual so I think it won't just stop working right away (like it would if curve fitting indicator parameters). Plus running the strategy on a basket of 3 stocks will help to spread the risk and detect any problems. The strategy is profitable with SPY but not as profitable as some of the stocks but it's good to know it works with SPY that makes me more confident. It's all pretty exciting. I gave up automation a year ago but that was because I was using indicators. Now that I'm indicator free things make a lot more sense and I feel it's more robust. Thanks for the tips on the S&R, I'll try to code that up and see if I can improve results. | ||
| |
|
| | #15 | ||
![]() | Re: Is Optimizing Profit Target & Stop Loss Curve Fitting? Quote:
Also there is nothing wrong with a pattern that works well in one particular type of market. bear, bull and range bound markets do trade differently. You just need to know when to turn them on or off. | ||
| |
|
| | #16 | ||
![]() | Re: Is Optimizing Profit Target & Stop Loss Curve Fitting? Quote:
this isn't the first time i've had a strategy not work before mid to end 2007 and then work well after that (even curve fitting). i guess that's when they became more volatile. | ||
| |
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Daily stop loss/profit targets | Sparrow | Money Management | 21 | 03-29-2011 09:42 PM |
| Stop Trading After Profit/Loss | cortlane | Automated Trading | 1 | 12-08-2009 10:27 PM |
| Avoiding Curve Fitting | cunparis | Automated Trading | 3 | 09-01-2009 04:41 PM |
| Arts of stop placment and profit target | kingking | Beginners Forum | 24 | 03-01-2007 02:52 AM |
| Stop Loss or Target Price? | Follow The Trend | Trading Psychology | 4 | 12-01-2006 01:54 PM |