| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Stochastic Divergence https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=479 |
Page 1 of 2 |
| Author: | Fx93 [ Tue Apr 10, 2012 8:44 pm ] |
| Post subject: | Stochastic Divergence |
Here is a mechanical method for trading inherent stochastic divergence. A few of the rules may be a little tricky to code. I backtested this for three months and it averaged 45%/mo. with 4% risk per trade on the 1M chart. This isn't really saying much, but I think with the right tweeks someone could make it work. The core logic is good anyway. Edit: The indicator is Stochastic Slow 32%k and 128 %k SMA with 3 smoothing period. |
|
| Author: | garyfritz [ Wed Apr 11, 2012 2:20 am ] |
| Post subject: | Re: Stochastic Divergence |
Stochastic Slow 32%k is the %K (Slow K) value of a 32-bar Stochastic? So you used the fast (Green, Signal) line of Stochastic(32,3,3) ? |
|
| Author: | Fx93 [ Wed Apr 11, 2012 2:35 am ] |
| Post subject: | Re: Stochastic Divergence |
Yeah, its the %k line of the 32 period stochastic as opposed to the %d line. I don't think this is the best thing I've done, but it might work to be profitable long term. I'm not a fan of the stochastic crossing the 80/20 line for an entry, as it is a bit slow. However, the benefit is that if there is another surge of buying for example, it wouldn't have triggered yet whereas other quicker methods would. Having said that, my favorite trigger in general is the 9 CCI crossing below the 100 line and above the -100 line. I plot these as buy and sell arrows on my chart, and then basically find systems to filter them. These get one in quick. I tested this system on the 1M only, the chart I am developing my strategies for atm is the 2 pip range bar chart. There are a few things about this system proposed that I am unsure of. A 15 vs. 20 pip BE stop, and the amount of divergence that needs to be there between the setup and the trigger. Price may have only needed to make a higher high for it to work. |
|
| Author: | garyfritz [ Wed Apr 11, 2012 3:44 am ] |
| Post subject: | Re: Stochastic Divergence |
I'm implementing this as a simple state machine. I want to make sure I understand the state transitions correctly. * I assume it has to happen in exactly that order: #1: 32%k goes above 95, THEN #2: 128%k gies below 80, THEN #3: 128%k goes above 95, THEN buy when #4: 32%k goes below 80. * If 32%k goes above 95, then 128%k goes below 80, you're in state #2. Now what if 32%k drops below 95 and goes above 95 again? Are you still in state #2, or do you go back to state #1? Same if you're in state #3 (128%k above 95)? * Does 128%k have to stay above 95 while 32%k goes below 80? Is the "opposite" cross 80/20, or 95/5? Try what twice? What's the original setup signal -- #1 (32%k above 95), or #2 (128%k below 80), or ... Say what? I didn't follow that at all. |
|
| Author: | Fx93 [ Wed Apr 11, 2012 4:18 am ] |
| Post subject: | Re: Stochastic Divergence |
That would be a sell rather than a buy but yes, you have it. But when the 128%k went above 95, the 32%k should not have. That is the inherent divergence. The original setup is bust if that happens, if it doesn't then it's a sell when the 32%k drops below 80. If the 32%k did go above 95 with the 128%k, then that would become the initial setup moving forward. You would go back to state #2 like I just described in your first example. If in state #3, all that needs to happen is the 32%k should not go above 95 or state #1 begins again and that it falls to below 80 for the trigger to sell. No. It probably would not. The opposite cross as TP I wasn't very clear about sorry, but it's the opposite cross of the 128%k to the 5/95 line. Say if it's a loss at the first try but there is another signal with the 128%k going above 95 while the 32%k did not, then we can try it once more. I myself am not sure what I meant exactly, because it seems like if it's a new 34/55 EMA trend things would be getting fairly far away from the original setup to be meaningful. So it is probably best to just try it once or twice per setup. Perhaps one setup and trade will lose during a big 34/55 EMA trend and then another will occur, where I noted the odds are against it working as well. Price must be noted at the time the 32%k goes above 95. Once the 128%k dips below 80 and then goes back up past 95 but the 32%k does not, price must be higher at this time by definition to have divergence. There are various ways to denote it, which I stated I am unsure of which is best. It may be comparing the 32%k going above 95 at state #1 to the 128%k going above 95 at state #2. I suggested that this divergence in price should be at least 3 pips, but this is a guess. |
|
| Author: | garyfritz [ Wed Apr 11, 2012 10:40 pm ] |
| Post subject: | Re: Stochastic Divergence |
You never described the EMA cross in your rules. Am I supposed to watch for a 35/55 EMA cross, and only look for long setups when 35 is above 55, or...? I don't have any EMA logic in there yet. See how this looks. Here's a Tradestation chart showing some setups and trades. The middle subgraph shows the 32%k (white) and 128%k (cyan). First off, please compare that against your chart (EURUSD, 4/10/12, 12:00 - 16:00 Eastern Daylight Time (GMT-4) to make sure my Stochastic values look right. The bottom subgraph shows my state variable, using the values I used earlier (but negative for short setups). A: At the left of the chart, the 32%k (white) crosses over the 95 line, so state goes to -1. B: The 128%k (cyan) goes under 80, so state goes to -2. C: 128%k goes above 95, state goes to -3. D: 32%k goes below 80; sell, and state goes to 0. E: 32%k goes below 95, state goes to 1. F: 128%k goes above 20, state goes to 2. G: 128%k goes below 5, state goes to 3, and exit the short (TP2). H: 32%k goes above 20; buy, and state goes to 0. Does that look right? In the past year it's made almost 1800 pips. 518 trades, 68% wins, average 3.5 pips per trade (with NO slippage or other costs included). So it looks promising, but slippage/etc is going to eat most of those profits. I tried throwing it on longer TF charts -- M10, M30, M60 -- and 10 & 30 had potential, but there were some trades that never got profitable and lost a lot before they exited or reversed. I think it needs either a stoploss or some stoch-based exit, or something. I tried adding an exit when the 128%k went above 95 (to exit a sell) or below 5 (to exit a buy) and that looked pretty good. Here the system is running on EURUSD M10 bars. Over 1500 pips, only 46% wins, but average 33 pips per trade! Unfortunately in a quick check, it doesn't seem to work very well on other pairs. What pairs did you test this on? |
|
| Author: | Fx93 [ Thu Apr 12, 2012 6:16 pm ] |
| Post subject: | Re: Stochastic Divergence |
Hi Gary, thanks a lot, that was cool! I tested it only on the EUR/USD 1M. Yes, our charts match, that other trade begun worked too it looks like. I am not sure for the state 1 setup if the 128%k also needed to be above 80. I don't think it did but it is a variant you could try. Were you using a 12 pip SL? What BE stop were you using? It appears in my backtest that I was setting the stop to BE when the 32%k went below 5 in case of a sell or above 95 in case of a buy, rather than the 15 or 20 hard BE stop that I said initially. I would try this out, see if it helps. This should also help you test it on other timeframes, where you will just need to assert/test a hard beginning SL. "Can try twice per original setup signal, once per 34/55 EMA trend." The 34/55EMA rule is just to limit the number of losses to 1 per trend where the rule is we can try twice per original state 1 setup. For instance on a hot uptrend there may be a couple of these setups that just fail due to momentum. Say we tried once then lost. Now the 34 sinks below the 55 briefly then rises up again and gives us one more signal. We could take this, but it's the last try. (You can leave this out if you want). Finally, I recorded how low the 128%k line went below 80 for a sell in state 2 to see if it mattered, but it is unclear if it did. There should be a backtest done using the 60, the 40, the 20 levels, etc. |
|
| Author: | garyfritz [ Thu Apr 12, 2012 6:33 pm ] |
| Post subject: | Re: Stochastic Divergence |
Ack! No, I completely forgot the SL (hence the large losses I mentioned) and the BE. I'll add those. I'll probably use an ATR-based SL instead of the fixed 12-pip SL, so it will work on higher TFs. I like the idea of moving to BE when 32%k goes to 5/95. I prefer that to fixed pip-based movements. I'll test them. |
|
| Author: | Fx93 [ Thu Apr 12, 2012 7:11 pm ] |
| Post subject: | Re: Stochastic Divergence |
Btw Gary, as I see you are in the US as am I, what criminal are you using to demo/trade via Empty4? I've yet to get an account. I usually just use TOS for charting and Oanda's Fxtrade for my live trading. |
|
| Author: | garyfritz [ Thu Apr 12, 2012 8:36 pm ] |
| Post subject: | Re: Stochastic Divergence |
My Empty4 crim is PFG, which comes highly recommended. I also trade using Tradestation, as you might have guessed. |
|
| All times are UTC | Page 1 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|