LazyBear

EMA Enveloper Indicator & a crazy prediction

ema
EMAEnvelope indicator does just that, draws a nice user-defined period EMA envelope (overlay).

It also can highlight the Bull/Bear breaks using different colors
- Green : High > EMA_HIGH
- Lime : (High > EMA_HIGH) and (Low > EMA_HIGH)
- Orange : Low < EMA_LOW
- Red : (Low < EMA_LOW) and (High < EMA_LOW)

Background highlighting is user-configurable.

Now to the (crazy) prediction: Based on a 100-period EMAEnvelope, we may have to go down to ~427.3 before starting turning Green. Look at the 2 Orange/Red areas highlighted.

EMA 200 tells us a different story, BTW.

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
//
// @author LazyBear
// v01 - initial release
//
study(title = "EMAEnvelope [LazyBear]", shorttitle="EMAEnvelope[LB]", overlay=true)
src = close
length=input(20)
HighlightColors = input(true, title="Bull/Bear highlights?", type=bool)

e=ema(close, length)
eu = ema(high, length)
el = ema(low, length)

plot(e, style=cross, color=aqua)
plot(eu, color=red, linewidth=2)
plot(el, color=lime, linewidth=2)

bull_color_normal = green
bull_color_strong = lime
bear_color_normal = orange
bear_color_strong = red
sidewise_color = blue

bull_f = (high > eu and low > el)
bear_f = (high < eu and low < el)
sidewise_f = (not bull_f) and (not bear_f)
b_color = bull_f ? bull_color_normal : (bear_f ? bear_color_normal : (sidewise_f ? sidewise_color : na))
d_color = (bull_f ? (low > eu ? bull_color_strong : b_color) : bear_f ? ( high < el ? bear_color_strong : b_color) : b_color)
bgcolor(HighlightColors ? d_color : na)