j1O9SB

KCO w/Candles

238 2 23
Candles Request
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study(title="Keltner Channels Oscillator",shorttitle="KCO",overlay=false,precision=1)
//Inputs
kc_len=input(21,title="Keltner Channel Length")
kc_mult1=input(1,title="Keltner Channel First Multiple")
kc_mult2=input(2,title="Keltner Channel Second Multiple")
kc_src=input(close,title="Keltner Channel Source")
//Keltner Channel
kc_ma=ema(kc_src,kc_len)
kc_rng=ema(tr,kc_len)
kc_oneup=kc_ma+kc_rng*kc_mult1
kc_onedn=kc_ma-kc_rng*kc_mult1
kc_twoup=kc_ma+kc_rng*kc_mult2
kc_twodn=kc_ma-kc_rng*kc_mult2
//Oscillator
kc_lvlclose=(close-kc_ma)/kc_rng
kc_lvlopen=(open-kc_ma)/kc_rng
kc_lvlhigh=(high-kc_ma)/kc_rng
kc_lvllow=(low-kc_ma)/kc_rng
kc_lvloneup=(kc_oneup-kc_ma)/kc_rng
kc_lvlonedn=(kc_onedn-kc_ma)/kc_rng
kc_lvltwoup=(kc_twoup-kc_ma)/kc_rng
kc_lvltwodn=(kc_twodn-kc_ma)/kc_rng
//Color
kc_colbar=(close>open)?white:red
//Plots
plotcandle(kc_lvlopen,kc_lvlhigh,kc_lvllow,kc_lvlclose,title='Price Candles',color=kc_colbar,wickcolor=white)
plot(0,color=gray,style=line,linewidth=1,editable=false)
plot(2,color=white,style=line,linewidth=1,editable=false)
plot(1,color=white,style=line,linewidth=1,editable=false)
plot(-1,color=black,style=line,linewidth=1,editable=false)
plot(-2,color=black,style=line,linewidth=1,editable=false)
I have another idea, can you add an optional overlay of a 5, 10, 20, 50, 100 and 200 smas and ema?

And a optional standard stochastic overlay of your indicator would be amazing.
Reply
j1O9SB kinggold
SMA/EMAs are definitely possible. Could you clarify what you mean by a stochastic overlay?
Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
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