RicardoSantos

[RS]Long Term Price Range Analysis (MML)

398 2 49
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
English
English (UK)
English (IN)
Deutsch
Français
Español
Italiano
Polski
Türkçe
Русский
Português
Bahasa Indonesia
Bahasa Melayu
ภาษาไทย
Tiếng Việt
日本語
한국어
简体中文
繁體中文
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