lonestar108

ZLEMA/SMA Intersection

Uses a 1 period zero lag EMA for the fast line, SMA for slow line. Shows intersection candles in lime for positive crosses, orange for negative crosses.

สคริปต์โอเพนซอร์ซ

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

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
//@version=2
study("ZLEMA/SMA Intersection")

len1=input(title="Enter Short  Day", type=integer, defval=1)
src1=input(close, title="Source")

ema1=ema(src1, len1)
ema2=ema(ema1, len1)
d=ema1-ema2
short=ema1+d

len2=input(title="Enter Long Day", type=integer, defval=10)
src2=input(close, title="Source")
long = sma(src2,len2)

plot(short, color = green,title="Short",style = areabr)
plot(long, color = red,title="long",style =areabr)

plot(cross(short, long) ? short : na,color=(long-short <0 ? lime:orange),style = circles, linewidth = 5,title="Intersection Point")

src = close, len = 1
out = sma(src, len)

barcolor(cross(short,long) ?  (long-short <0 ? lime:orange):na)
plotchar(cross(short,long) ? short:na , char='!', location=location.absolute, color=black,title="Alarm", text="!")