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
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?
//
// @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)