samuelhei

Projecting EMAs

This simple indicator projects 4 EMAs above and 4 under the main EMA group.
Remove from Favorite Scripts Add to Favorite Scripts
study(title="Projecting EMAs", shorttitle="PEMA", overlay=true)



ema2 = ema(close, input(25,"EMA 1"))
ema1 = ema(close, input(50,"EMA 2"))


dif = ema2- ema1



pEma1 = ema2 + dif
pEma2 = ema2 + 2*dif

pEma3 = ema2 + 3*dif
pEma4 = ema2 + 4*dif

pEma5 = ema2 -2*dif
pEma6 = ema2 -3*dif

pEma7 = ema2 -4*dif
pEma8 = ema2 -5*dif

ple1 = plot(ema1, title="EMA 1", color=gray)
ple2 = plot(ema2, title="EMA 2", color=gray)

fill(ple1,ple2,color=green,transp=80)

plp1 = plot(pEma1, title="P Ema 1", color=gray)
plp2 = plot(pEma2, title="P Ema 2", color=gray)

plp3 = plot(pEma3, title="P Ema 3", color=gray)
plp4 = plot(pEma4, title="P Ema 4", color=gray)

fill(plp3,plp4,color=black,transp=70)
fill(plp2,plp3,color=black,transp=80)
fill(plp1,plp2,color=black,transp=90)

plp5 = plot(pEma5, title="P Ema 5", color=gray)
plp6 = plot(pEma6, title="P Ema 6", color=gray)

plp7 = plot(pEma7, title="P Ema 7", color=gray)
plp8 = plot(pEma8, title="P Ema 8", color=gray)

fill(plp5,plp6,color=black,transp=90)
fill(plp6,plp7,color=black,transp=80)
fill(plp7,plp8,color=black,transp=70)
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out