LazyBear

Color coded UO

Small modification to stock UO code to highlight lows / highs. This helps to see the trend easily. The length to check for high/low is configurable (lengthSlope), I am yet to find the optimal setting but 30 looks nice so far.

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?
//
// @author LazyBear
// @credits This is derived from the stock UO code at TV
// 
study(title="Ultimate Oscillator Bars [LazyBear]", shorttitle="UO_BARS [LazyBear]")
length7 = input(7, minval=1), length14 = input(14, minval=1), length28 = input(28, minval=1)
lengthSlope = input(1)
average(bp, tr_, length) => sum(bp, length) / sum(tr_, length)
high_ = max(high, close[1])
low_ = min(low, close[1])
bp = close - low_
tr_ = high_ - low_
avg7 = average(bp, tr_, length7)
avg14 = average(bp, tr_, length14)
avg28 = average(bp, tr_, length28)
out = 100 * (4*avg7 + 2*avg14 + avg28)/7
plot(out, color=red, title="UO")
bgcolor(falling(out, lengthSlope) ? red : (rising(out, lengthSlope) ? green : blue), transp=50)