vdubus

permanent_marker - Experimental - code manipulation / Chart Art

102
permanent_marker - Experimental - code manipulation / Chart Art
*Note - If you try to adjust the setting the MA/ Red band will be reset to pine default width size of 4. You have to either re execute the indicator or modify the code script some how & re save

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
study("Perminant_marker_V1", overlay=true)
//source = close
//short = sma(close, 3)
long = sma(close, 13)
//plot(short, color=blue, linewidth=2)
plot(long, color=red, linewidth=55)
//plot(cross(long, short) ? long : na, style = circles, color=blue, linewidth = 9)
//=========================================================
source = close
length3 = input(55, minval=1, title = "WMA Length")
atrlen = input(1000, minval=1, title = "ATR Length")
mult1 = 2
mult2 = 3
ma = wma(source, length3)
range =  tr
rangema = wma(range, atrlen)

up1 = ma + rangema * mult1
up2 = ma + rangema * mult2

dn1 = ma - rangema * mult1
dn2 = ma - rangema * mult2

color1 = black
color2 = black

u4 = plot(up1, color = color1,linewidth=4)
u8 = plot(up2, color = color2,linewidth=4)

d4 = plot(dn1, color = color1,linewidth=4)
d8 = plot(dn2, color = color2,linewidth=4)

fill(u8, u4, color=#30628E, transp=55)
fill(d8, d4, color=#30628E, transp=55)
fill(d4, u4, color=#128E89, transp=80)

//Linear regression band
//Input
nlookback = input (defval = 20, minval = 1, title = "Lookback")
scale = input(defval=1,  title="scale of ATR")
nATR = input(defval = 14, title="ATR Parameter")

//Center band
periods=input(34, minval=1, title="MA Period")
pc = input(true, title="MA BAND")

hld = iff(close > sma(high,periods)[1], 1, iff(close<sma(low,periods)[1],-1, 0))
hlv = valuewhen(hld != 0, hld, 1)

hi = pc and hlv == -1 ? sma(high, periods) : na
lo = pc and hlv == 1 ? sma(low,periods) : na
//plot(avg(sma(high,periods)+2.5*(sma(high,periods)-sma(low,periods)),sma(low,periods)-2.5*(sma(high,periods)-sma(low,periods))), color=red, style=line,linewidth=55)
plot(pc and sma(high, periods) ? sma(high, periods):na ,title="Swing High Plot", color=black,style=line, linewidth=4)
plot(pc and sma(low,periods) ? sma(low,periods) : na ,title="Swing Low Plot", color=black,style=line, linewidth=4)
//fill(hlv,hld,color=#1c86ee,transp=80)
//------------------------------------------------------------------------------------------