SpreadEagle71

Power Law Correlation Indicator 2.0

The Power Law Correlation Indicator is an attempt to chart when a stock/currency/futures contract goes parabolic forming a upward or downward curve that accelerates according to power laws.

I've read about power laws from Sornette Diedler ( www.marketcalls.in/t...sis-observatory.html ). And I think the theory is a good one.

The idea behind this indicator is that it will rise to 1.0 as the curve resembles a parabolic up or down swing. When it is below zero, the stock will flatten out.

There are many ways to use this indicator. One way I am testing it out is in trading Strangles or Straddle option trades. When this indicator goes below zero and starts to turn around, it means that it has flattened out. This is like a squeeze indicator. (see the TTM squeeze indicator).

Since this indicator goes below zero and the squeeze plays tend to be mean-reverting; then its a great time to put on a straddle/strangle.

Another way to use it is to think of it in terms of trend strength. Think of it as a kind of ADX, that measures the trend strength. When it is rising, the trend is strong; when it is dropping, the trend is weak.

Lastly I think this indicator needs some work. I tried to put the power (x^n) function into it but my coding skill is limited. I am hoping that Lazy Bear or Ricardo Santos can do it some justice.
Also I think that if we can figure out how to do other power law graphs, perhaps we can plot them together on one indicator.

So far I really like this one for finding Strangle spots. So check it out.

Peace
SpreadEagle71
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
//Author - SpreadEagle71
study("Power Law Correlation Indicator 2.0")
len=input(13, minval=1,maxval = 50)
demalength = input(13, minval=1)
power=input(3,minval=1, maxval=4)
Dayreturn=pow(close,power)

autocorr = correlation(Dayreturn,Dayreturn[1],len)

plot(autocorr, color = blue , style = line , linewidth = 2,title = "Autocorr")

e1 = ema(autocorr, demalength)
e2 = ema(e1, demalength)
dema = 2 * e1 - e2
plot(dema, color=green)

hline(0, title='hline1', color=red, linestyle=dotted, linewidth=2)
hline(0.5, title='hline2', color=black, linestyle=dotted, linewidth=2)
hline(1.0, title='hline3', color=black, linestyle=dotted, linewidth=2)