RicardoSantos

[RS]Detrended Price Oscilator System A

dpo
1279 1 218
dpo
DPO with modified formula for percentual values for scale ability trend line and histogram, rest i leave to you to explore..
Remove from Favorite Scripts Add to Favorite Scripts
study(title="[RS]Detrended Price Oscilator System A", shorttitle="[RS]DPOSA")

dpo_length = input(24)
dpo_src = close
dpo_disp = (dpo_src - sma(dpo_src[round(dpo_length/2) + 1], dpo_length))
dpo = (dpo_src - sma(dpo_src, dpo_length))

dpo_f = (dpo / dpo_src) * 100
dpo_df = (dpo_disp / dpo_src) * 100

//dpo_trend = dpo_disp - dpo
//dpo_cycle = dpo_trend + dpo_disp
dpo_trend = dpo_df - dpo_f
dpo_cycle = dpo_trend + dpo_df

dpo_h = highest(dpo_cycle, dpo_length)
dpo_l = lowest(dpo_cycle, dpo_length)

dpo_hlc(s) => s == s[1] ? gray : na
plot(dpo_h, style=line, color=dpo_hlc(dpo_h), linewidth=2)
plot(dpo_l, style=line, color=dpo_hlc(dpo_l), linewidth=2)

dpo_diff = dpo_cycle-dpo_trend

plot(dpo_cycle, color=black, style=line, linewidth=3, transp=50)

plot(dpo_diff, style=histogram, color=gray, linewidth=4)

tc = rising(dpo_trend, 1) ? green : maroon
plot(dpo_trend, color=tc, style=circles, linewidth=3, join=true)

hline(0)
salute...
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