If you want to get additional charts on your screen without paying:) + bonus indic
Cheers
Cheers
study("chartx",overlay=false) //Ins1 = input("FX:USDZAR") Ins1 = input("FX:USDMXN") //Ins1 = input("FX:USDTRY") data(x) => o = security(x,period, open) h = security(x,period, high) l = security(x,period, low) c = security(x,period, close) [o,h,l,c] [o,h,l,c] = data(Ins1) src = close plotcandle(o,h,l,c, color = close >= open ? green : red, wickcolor=black) m=1 Len_ma=input(55,title="len") Len_LR=Len_ma*m LR_offset=input(0) ema= input(defval=false,title='use ema instead of sma?') ma1 = ema ? ema(h,Len_ma) : sma(h,Len_ma) ma2 = ema ? ema(l,Len_ma) : sma(l,Len_ma) mm = ema ? ema(c,Len_ma) : sma(c,Len_ma) mm_p = plot(mm,style=areabr,transp=100) mm_p1 = plot(mm,style=line,transp=100,color=black) z1=linreg(h,Len_LR,LR_offset) z2=linreg(l,Len_LR,LR_offset) z3=linreg(c,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)