soru

LRx2 v3

96 0 12
LRx2 v3
Remove from Favorite Scripts Add to Favorite Scripts
study("LRx2 v3",overlay=true)
Len_ma=input(56,title="len")
m=input(title="LR multiplier",defval=1)
Len_LR=Len_ma*m
LR_offset=input(0)
ema= input(defval=false,title='use ema instead of sma?')
ma1 = ema ? ema(high,Len_ma) : sma(high,Len_ma)
ma2 = ema ? ema(low,Len_ma) : sma(low,Len_ma)
//m1=plot(show_2xMA ? ma1:na,color=gray, linewidth=2)
//m2=plot(show_2xMA ? ma2: na,color=gray, linewidth=2)
mm = ema ? ema(close,Len_ma) : sma(close,Len_ma)
mm_p = plot(mm,style=areabr,transp=100)
mm_p1 = plot(mm,style=line,transp=100,color=black)
z1=linreg(high,Len_LR,LR_offset)
z2=linreg(low,Len_LR,LR_offset)
z3=linreg(close,Len_LR,LR_offset)
z11=z1>ma1 ? z1-2*(z1-ma1) : z2+2*(ma2-z2)
swing=plot(rma(z11,10),style=areabr,transp=100)
fill(swing,mm_p,color=black,transp=80)


Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out