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
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?
//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)