MarcoValente

ema-sma

196 0 30
oscillator from the difference between Ema and Sma , moving around 0 line, Quite reactive if use the cross of the 2 lines , more conservative if wait the lines cross the zero line. I add columns for the big change of volume with the cut off so it s show only big divergence with the avarage. colors show trends. I think usefull
Remove from Favorite Scripts Add to Favorite Scripts
//
study(title="ema-sma", shorttitle="ema-sma + vol")
src =input(close,title="source"),length = input(9, minval=1,title="short ema"),lensma=input(17,title="long sma")
vol=volume
vm=100*((sma(vol,length)-(sma(vol,length)[4]))/(sma(vol,length)[4]))
vvm=100*(sma(((vm-vm[1])/vm[1]),3))
osc=sma((ema(src,length)-sma(src,lensma)),3)
sig=(osc+2*osc[1]+2*osc[2]+osc[3])/6
cc=osc>0 ? lime : osc<0 ? red: na
cut=abs(vvm/8)> abs(sma(vvm,5)) ?osc/0.7 : na
cv=cut>0 ? aqua : orange 
si=plot(sig,color=cc)
duml=plot((osc>sig?osc:sig), style=circles, linewidth=0, color=gray)
os=plot(osc,color=cc,linewidth=2, title="ROC")
fill(si,duml,color=green,transp=60)
fill(os,duml,color=red,transp=60)
hline(0, title="Zero Line",color=white)
plot(cut,color=cv,style=columns,linewidth=2,transp=60)
Ideas Scripts Chart
United States
United Kingdom
India
España
France
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