LazyBear

Adaptive Ergodic Candlestick Oscillator [LazyBear]

This updates Blau's excellent Candlestick oscillator to be adaptive by using the length of a scaled stochastic indicator and an exponent (for calculating the smoothing coefficient) to obtain the moving average.

Check out the options page for configurable variables.

More info on Ergodic Oscillator:
Book: "Momentum, Direction and Divergence" by William Blau

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("Adaptive Ergodic Candlestick Oscillator [LazyBear]", shorttitle="AECO_LB")
length=input(defval=14, title="Stoch Scaling Length"), sl=input(defval=9, title="Signal Length")
ep=input(defval=5, title="Smooth Length")
vrb= abs( stoch(close, high, low, length)-50)/50
mep=2/(ep+1), ce=cum(1)<=((length+ep)*2)
came1=iff(ce,close-open,nz(came1[1])+mep*vrb*((close-open)-nz(came1[1])))
came2=iff(ce,high-low,nz(came2[1])+mep*vrb*((high-low)-nz(came2[1])))
came11=iff(ce,came1,nz(came11[1])+mep*vrb*(came1-nz(came11[1])))
came22=iff(ce,came2,nz(came22[1])+mep*vrb*(came2-nz(came22[1])))
eco=came11/came22*100.0
se=ema(eco, sl)
ebc=input(false, title="Enable Bar colors")
bc_=eco>0 ? (eco>eco[1]?green:orange) : (eco<eco[1]?red:orange)
bc_t=eco>0 ? (eco>se?lime:orange) : (eco<se?red:orange)
bc=ebc? bc_t : na
barcolor(bc)
plot(0, title="MidLine")
plot(eco, style=histogram, color=bc_,linewidth=2, title="ECOHisto_1")
plot(eco, color=black, linewidth=2, title="AECO")