MarcoValente

oscillatore EMA

169 0 13
Oscillator make from 4 ema, Columns give us the trend and signal line can be use to find divergenge or as buy/sell trigger. Colors changes to indicate the relation between price and Ema
Volability is calculate using deviation st             .
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
// by Marco
study(title="oscillatore EMA",shorttitle="Osc Ema",overlay=false)
lunl=input(200,title="ciclo lungo")
mdl=input(100,title="ciclo medio")
lunc=input(50,title="ciclo corto")
med=input(20,title="ema20")
long = ema(close,lunl)
medi=ema(close,mdl)
short = ema(close, lunc)
mm=ema(close,med)
wc=ema(close,3)
wb=(wc-mm)
wm=(wc-short)
wml=(wc[1]-medi)
wl=(wc[2]-long)
sw=(2*wb+3*wm+2*wml+wl)/8
dsw=stdev(sw,5)
swd=sw+dsw
ps=sma(100*swd/wc,3)
pss=(ps+2*ps[1]+2*ps[2]+ps[3])/6
mcps=pss-sma(pss,6)
sps=(sma(mcps,3))/0.4
col= wb>0 and wm>0 and  wml > 0 and wl>0 ?  green :wb>0 and wm>0 and wml>0 ? lime: wb>0 and wm>0 ? silver : wb>=0? aqua:wb<0 and wm<0 and wml<0 and wl<0 ? red : wb<0 and wm<0 and wml< 0 ? fuchsia : wb<0 and wm<0 ? orange :  wb<0? yellow : na
lco=sps>=0? lime : red
plot(pss,linewidth=2,style=columns,transp=70,color=col)
plot(sps,linewidth=2,color=lco)
hline(0)
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 Billing Sign Out