Keltner Channel v2 - Auto highlighting of Bull/Bear trends

1638 7 158
Please do not use the previous version (, I was using wrong colors for Bull/Bear there.

All options configurable.

Reversals are marked using crosses. as well as highlighted using green/red color (depending on bull/bear). Enjoy!

Remove from Favorite Scripts Add to Favorite Scripts
// @author LazyBear
// @credits Formula taken from
// v02 - fixed the bull/bear colors, I accidentally switched them in the prev ver. 
// v01 - initial release
study(title="Keltner Channel [LazyBear]", overlay=true)
offset = 1
lengthMiddle = input(20,  title="MiddleEMA")
channelATR = input(10, title="Channel wall ATR")
channelWidth = input(2, title = "Channel Width")
showBarColor = input(true, title="Highlight Bear/Bull indicators?", type=bool)

emaVal = ema(close,lengthMiddle)
upperVal = emaVal + channelWidth * atr(channelATR)
lowerVal = emaVal - channelWidth * atr(channelATR)

middle_line = plot(emaVal, style=circles, linewidth=2)
upper_line = plot(upperVal)
lower_line = plot(lowerVal)
fill(upper_line, lower_line, color=green, transp=80)

bearish = low < lowerVal
bear_point = bearish ? (low-offset) : na
bear_color = bearish ? red : na

bullish = high > upperVal 
bull_point = bullish ? (high+offset) : na
bull_color = bullish ? green : na

bar_color = bearish ? bear_color : (bullish ? bull_color : na)

plot(bear_point, color = bear_color, style=cross, linewidth=2)
plot(bull_point, color = bull_color, style=cross, linewidth=2)

bgcolor(showBarColor ? bar_color : na)
how install this script on exness chart and other broker chart
LazyBear haq2fame
This is coded in Pinescript, TradingView's scripting language. This code cannot be used in any other platform as-is.
+1 Reply
I cannot keep up with you:) great work- tnx for sharing
+1 Reply
LazyBear sublimares2
Thx. Feel free to fix the colors :P
+1 Reply
sublimares2 LazyBear
I always do:)
+1 Reply
Works Great!
+2 Reply
LazyBear QuantitativeExhaustion
+2 Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
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