LazyBear

Composite Momentum Index [LazyBear]

This is a composite oscillator derived from modified 5/10/20 Chande's Dynamic Momentum Index values.

Volatility is factored in, by design. Look for OB/OS extremes and divergences.

I added the green/red ribbon look to make it easy to read :)

More info:
www.investopedia.com...micmomentumindex.asp

List of my public indicators: bit.ly/1LQaPK8
List of my app-store indicators: blog.tradingview.com/?p=970


List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
//
// @author LazyBear 
// 
// List of my public indicators: http://bit.ly/1LQaPK8 
// List of my app-store indicators: http://blog.tradingview.com/?p=970 
//
study(title="Chande Composite Momentum Index [LazyBear]", shorttitle="CCMI_LB")
src=input(close, title="Source")
lenSmooth=input(3, title="Composite Smoothing Length")
trigg=input(5, title="Signal Length")
calc_dema(src, length) => 
	e1 = ema(src, length)
	e2 = ema(e1, length)
	2 * e1 - e2

cmo51=sum( iff( src >  src[1] , ( src -  src[1] ) ,0 ) ,5 ) 
cmo52=sum( iff( src <  src[1] , ( src[1] - src )  ,0 ) ,5 )
cmo5=calc_dema(100 * nz(( cmo51 - cmo52)  /( cmo51+cmo52)),3)
cmo101=sum( iff( src >  src[1] , ( src -  src[1] ) ,0 ) ,10 ) 
cmo102=sum( iff( src <  src[1] , ( src[1] - src )  ,0 ) ,10 )
cmo10=calc_dema(100 * nz(( cmo101 - cmo102)  /( cmo101+cmo102)),3)
cmo201=sum( iff( src >  src[1] , ( src -  src[1] ) ,0 ) ,20 ) 
cmo202=sum( iff( src <  src[1] , ( src[1] - src )  ,0 ) ,20 )
cmo20=calc_dema(100 * nz(( cmo201 - cmo202)  /( cmo201+cmo202)),3)
dmi=((stdev(src,5)* cmo5)+(stdev(src,10)* cmo10)+(stdev(src,20)*cmo20))/(stdev(src,5)+stdev(src,10)+stdev(src,20))
e=ema(dmi,lenSmooth), s=sma(dmi,trigg)
hline(70,color=red, title="High2")
ul=hline(30,color=green, title="High1")
hline(0, color=black, title="Mid")
ll=hline(-30,color=green, title="Low1")
hline(-70,color=red, title="Low2")
fill(ul,ll,black, title="MidRegionFill")
duml=plot(e>s?s:e, style=circles, linewidth=0, color=gray, title="Dummy")
cmil=plot(e,title="DynamicIndex",color=blue)
tl=plot(s,title="trigger",color=red) 
fill(cmil, duml, color=lime, transp=50, title="PositiveFill")
fill(tl, duml, color=red, transp=50, title="NegativeFill")