RicardoSantos

[RS]Long Term Price Range Analysis (MML)

480 2 60
Study on Price range Regression and range (deviation multiplier needs to be accommodate manually to fit price action)
study was made for time frames above weekly
Remove from Favorite Scripts Add to Favorite Scripts
study("[RS]Long Term Price Range Analysis (MML)", overlay=true)
Multiplier = input(1)
cadev(src, _length)=>cum(stdev(close, _length))/(n+1)
preHH = nz(HH[1], high[1])
preLL = nz(LL[1], low[1])
HH = high >= preHH ? high : preHH
LL = low <= preLL ? low : preLL
RANGE = HH-LL
pool = 100
CalculateRegression(_pool_size) => (valuewhen(n == _pool_size, LL+(RANGE*0.5), 0)-valuewhen(n == 1, LL+(RANGE*0.5), 0))/(n+1)
RegressionMLine = nz(RegressionMLine[1], valuewhen(n==1, LL+(RANGE*0.5), 0))+CalculateRegression(pool)
stdev_length = 4
cdev = cadev(RANGE, stdev_length)
R_UML6 = RegressionMLine + (cdev*Multiplier)*6
R_UML5 = RegressionMLine + (cdev*Multiplier)*5
R_UML4 = RegressionMLine + (cdev*Multiplier)*4
R_UML3 = RegressionMLine + (cdev*Multiplier)*3
R_UML2 = RegressionMLine + (cdev*Multiplier)*2
R_UML1 = RegressionMLine + (cdev*Multiplier)*1
R_DML1 = RegressionMLine - (cdev*Multiplier)*1
R_DML2 = RegressionMLine - (cdev*Multiplier)*2
R_DML3 = RegressionMLine - (cdev*Multiplier)*3
R_DML4 = RegressionMLine - (cdev*Multiplier)*4
R_DML5 = RegressionMLine - (cdev*Multiplier)*5
R_DML6 = RegressionMLine - (cdev*Multiplier)*6
plot(R_UML6, color=black, offset=-pool, linewidth=1)
plot(R_UML5, color=black, offset=-pool, linewidth=1)
plot(R_UML4, color=black, offset=-pool, linewidth=2)
plot(R_UML3, color=black, offset=-pool)
plot(R_UML2, color=black, offset=-pool)
plot(R_UML1, color=black, offset=-pool)
plot(RegressionMLine, color=black, offset=-pool, linewidth=2)
plot(R_DML1, color=black, offset=-pool)
plot(R_DML2, color=black, offset=-pool)
plot(R_DML3, color=black, offset=-pool)
plot(R_DML4, color=black, offset=-pool, linewidth=2)
plot(R_DML5, color=black, offset=-pool, linewidth=1)
plot(R_DML6, color=black, offset=-pool, linewidth=1)
//plot(HH)
//plot(LL)

Related Ideas

This is the ridiculous data. http://en.wikipedia.org/wiki/Euro#Introduction EUro didn't exist before 1992. But the data above has from 1972??? OMG -
Reply
lol.. probably a weighted average of the old currencies.. data looks to fit tho...
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