Sell / Buy Rates

This script finds sell / buy rates and adds its linear regression to the chart. its aim is finding buying and selling power, then you can try to find trend reversals. Also you can find divergences, it's very important signal for trend reversal.

Linear regression is a basic and commonly used type of predictive analysis.

if you choose lower periods then it will be more sensitive. I choose 34 as it's one of fibonnaci number.

If you find my works useful, please consider a donation
BTC: 16XRqyS3Vgh1knAU1tCcruqhUrVm4QWWmR

Catatan Rilis: Shorter code and some improvements
Skrip open-source

Sejalan dengan semangat TradingView, penulis skrip ini telah mempublikasikannya secara open-source, sehingga para trader dapat memahami dan memverifikasinya. Salut untuk sang penulis! Anda dapat menggunakannya secara gratis, tetapi penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk dapat menggunakannya didalam sebuah chart.

Inggin menggunakan skrip ini pada chart?


Could you please say what do the colors mean
Dark Green

Dark Red
+18 Jawab
Mate, you can simplify a life with:

tw = high - max(open, close)
bw = min(open, close) - low
body = abs(close - open)

_rate(cond) => 0.5 * (tw + bw + (cond ? 2 * body : 0)) / (tw + bw + body)

uprate = _rate(open <= close)
downrate = _rate(open >= close)

and add precision=0 to study() to avoid big numbers (see AAPL)
+13 Jawab
@everget, thanks mate, OK I'm gonna make it shorter ;)
+5 Jawab
Geekyavi everget
@everget, @lonesometheblue 2 pros who rule trading view.
+1 Jawab
Le falta las flechas de compra y venta, me parece
+1 Jawab
hi @dos32101, Pine script doesn't allow to add arrow on the chart when indicator is in another window. (overlay = false or true, can not be both).
+3 Jawab
the graph not showing on my computer display
Can ı use this indikator?
This is: _rate(cond) => 0.5 * (tw + bw + (cond ? 2 * body : 0)) / (tw + bw + body)
Especially: (cond ? 2 * body : 0)

What is the basic functionale (mathematicaL) reason (purpose) here?
LOVE this! Thank you!