repo32

EMA_Convergence

First I have to give kudos to my son who I asked to take a shot at creating this little indicator. Nice work son!

While trading, one of the things I look for is when price or certain EMA's approach another EMA. The example that I use on this 1 minute SPY chart is an 8 EMA and 20 EMA. I am looking for when the 8 and 20 are within' 3 cents of each other. Many times when they are getting close, price is approaching a top or bottom. I am looking for a candlestick reversal around that area. You may want to know when PRICE is near the 50 EMA: Use EMA 1 and 50 for that. Having it light up on top of the page, or elsewhere, makes it easier to look for the convergence when it occurs. If it lights up for a long period, price may be going sideways. I don't enter into a trade until the EMA starts separating, usually with another candlestick formation.
You are able to change the distance for convergence and two EMA's. Unfortunately you will have to adjust the convergence number up as you increase in time frames. This is designed to see when they are close, not when they cross.
The bars on top of this example are lit up purple due to the 8 and 20 EMA are within' 3 cents of each other.

If you want to overlay the price bars, instead of having it separate, just change overlay to "true"

Enjoy.

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

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

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
// Created by Taylor N. 031315

study("EMA_Convergence", overlay=false)
Dist = input(.03, title="Maximum distance between EMA's for convergence")
ema1 = input(8, title="First EMA")
ema2 = input(20, title="Second EMA")
plot(ema(close,ema1) >= ema(close,ema2)-Dist and ema(close,ema1) <= ema(close,ema2)+Dist? close : na, title="Column signal for convergence", color = purple, style = columns, linewidth = 2)