stefcom

Stefan Krecher: Jeddingen Divergence

The main idea is to identify a divergence between momentum and price movement. E.g. if the momentum is rising but price is going down - this is what we call a divergence. The divergence will be calculated by comparing the direction of the linear regression curve of the price with the linear regression curve of momentum.
A bearish divergence can be identified by a thick red line, a bullish divergence by a green line.
When there is a divergence, it is likeley that the current trend will change it's direction.
Looking at the chart, there are three divergences that need to get interpreted:
1) bearish divergence, RSI is overbought but MACD does not clearly indicate a trend change. Right after the divergence, price and momentum are going up. No clear signal for a sell trade
2) bearish divergence, RSI still overbought, MACD histogram peaked, MACD crossed the signal line, price and momentum are going down. Very clear constellation for a sell trade.
3) two bullish diverences, RSI is oversold, MACD crossover near the end of the second divergence, price and momentum started rising. Good constellation for a buy trade. Could act as exit signal for the beforementioned sell trade.
More information on the Jeddingen Divergence is available here: http://www.forexpython.com/strategy
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study(title="Stefan Krecher: Jeddingen Divergence", shorttitle="Jeddingen Divergence", overlay=true)
candles = input(title="Number of candles that need to diverge", type=integer, defval=5, minval=3, maxval=10)
linregPrice = input(title="price related linear regression length", type=integer, defval=20, minval=5, maxval=50)
momLength = input(title="momentum length", type=integer, defval=10, minval=2, maxval=50)

jeddingen(series) => ((falling(series, candles)) and (rising(mom(series, momLength),candles))) or ((rising(series, candles)) and (falling(mom(series, momLength),candles)))

srcDiv = close
lrDiv = linreg(srcDiv, linregPrice, 0)

lrDivColor =if(jeddingen(lrDiv) == true)
    rising(lrDiv, candles) ? red:green
else
    na
plot(lrDiv)
plot(lrDiv, color=lrDivColor, linewidth=4)
GET THE CCIDivergence STUDY FOR FREE: http://eepurl.com/c0Kr59
My CryptoArbitrage package for an introductory Price: https://www.tradingclue.com/shop/cryptoarbitrage?viatvsig
Have a Look at my other Studies:
https://www.tradingclue.com/shop?viatvsig
Hi - I just released a new version of this script, that basically does the same calculations but adds the possibility to create alerts based on the divergences:
Reply
cristian.d stefcom
@stefcom, Thanks for sharing Stef
Reply
What settings do you recommend for stocks?
Reply
stefcom PRO cristian.d
@christian.d I think it depends on the stock and it's volatility and on the timeframe you would like to use - do you have any special stocks in mind? I could play around with some setups. Would love to do more trading with stocks
Reply
cristian.d stefcom
I day (5 min or 1 min TF) trade high optionable stocks/indices, but mainly SPY, AAPL and FB. SPY is the one that I would like to try your indicator on. It looks good overall, just was curious how can I improve settings. As you can see, half of the signals were goo, half, not so good. Besides your recommended momentum indicators, is here something that can be changed in settings? You help is much appreciated. Danke :)
snapshot
Reply
stefcom PRO cristian.d
I have a TradingView strategy script that uses the Jeddingen Divergence algorithm, maybe I'll release this is the near future. I use RSI and MACD as confirmation, e.g. if there is a divergence AND RSI is above a certain level AND the MACD histogram is above a certain level AND the MACD histogram has peaked - then a trade can be executed,
To adapt the strategy to a special asset/ TF I would play with the RSI and MACD histogram levels, and maybe with the properties that relate to the divergence (e.g. how long must price and momentum diverge?).
I'll come back to SPY later this week. Schönen Abend noch ;-)
Reply
stefcom PRO cristian.d
Hi Christian, I revisited your SPY example and came up with a simple solution: In case of a bullish divergence you draw a trendline above price, in case of a bearish divergence you need to draw it under the price. A buy/ sell signal will be triggered only when price breaks the trendline.
I draw some very basic trendlines with an online drawing program - have a look at it here:
https://www.dropbox.com/s/l7n2npn1ya0iqla/spy-with-trendlines.png?dl=0
This is based upon Rob Bookers Trifecta system looking at trendline breaks after a Knoxville Divergence.
Reply
cristian.d stefcom
Vielen dank Stef ! Also some of the buy signals came on obvious tops, so yeah.. Again thank you!
Reply
cristian.d stefcom
How do you draw with dropbox? Is it automatically drawn?
Reply
stefcom PRO cristian.d
I just downloaded your chart as an image file and edited it with an online image manipulation tool. I just draw some lines on it, only to illustrate the idea of trendline breaks after a Jeddingen Divergence. Then saved the image and shared it via Dropbox - no automagic ...
Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out