ChrisMoody

CM_Guppy_EMA

Guppy EMA Trend Based Indicator Requested by 2use


General RULES

1. If Fast and Slow EMA's are ALL in Uptrend. Fast EMA=Aqua Slow EMA's=Green.

2. If Fast And Slow EMA's are ALL in DownTrend. Fast EMA's=Orange Slow EMA's=Red.

3. If Conditions 1 or 2 = False the Color=Silver.

4. If Down Trend Slow EMA's = Resistance.

5. If Up Trend Slow EMA's = Support.

6. Great Moves Start when Color=Silver, then colors change to Up or Down Trend.

7. Conservative move is to wait for 1st or 2nd Pullback.
Remove from Favorite Scripts Add to Favorite Scripts
//Created By ChrisMoody on 8/10/2014 by Request for 2use
//Daryl Guppy EMA's
study(title="CM_Guppy_EMA'S", shorttitle="CM_Guppy_EMA's", overlay=true)
src = close, 
len1 = input(3, minval=1, title="Fast EMA 1")
len2 = input(5, minval=1, title="Fast EMA 2")
len3 = input(8, minval=1, title="Fast EMA 3")
len4 = input(10, minval=1, title="Fast EMA 4")
len5 = input(12, minval=1, title="Fast EMA 5")
len6 = input(15, minval=1, title="Fast EMA 6")
//Slow EMA
len7 = input(30, minval=1, title="Slow EMA 7")
len8 = input(35, minval=1, title="Slow EMA 8")
len9 = input(40, minval=1, title="Slow EMA 9")
len10 = input(45, minval=1, title="Slow EMA 10")
len11 = input(50, minval=1, title="Slow EMA 11")
len12 = input(60, minval=1, title="Slow EMA 12")

//Fast EMA
ema1 = ema(src, len1)
ema2 = ema(src, len2)
ema3 = ema(src, len3)
ema4 = ema(src, len4)
ema5 = ema(src, len5)
ema6 = ema(src, len6)
//Slow EMA
ema7 = ema(src, len7)
ema8 = ema(src, len8)
ema9 = ema(src, len9)
ema10 = ema(src, len10)
ema11 = ema(src, len11)
ema12 = ema(src, len12)

//Fast EMA Color Rules
colfastL = (ema1 > ema2 and ema2 > ema3 and ema3 > ema4 and ema4 > ema5 and ema5 > ema6)
colfastS = (ema1 < ema2 and ema2 < ema3 and ema3 < ema4 and ema4 < ema5 and ema5 < ema6)
//Slow EMA Color Rules
colslowL = ema7 > ema8 and ema8 > ema9 and ema9 > ema10 and ema10 > ema11 and ema11 > ema12 
colslowS = ema7 < ema8 and ema8 < ema9 and ema9 < ema10 and ema10 < ema11 and ema11 < ema12 
//Fast EMA Final Color Rules
colFinal = colfastL and colslowL? aqua : colfastS and colslowS? orange : gray
//Slow EMA Final Color Rules
colFinal2 = colslowL  ? lime : colslowS ? red : gray
//Fast EMA Plots
p1=plot(ema1, title="Fast EMA 1", style=line, linewidth=2, color=colFinal)
plot(ema2, title="Fast EMA 2", style=line, linewidth=1, color=colFinal)
plot(ema3, title="Fast EMA 3", style=line, linewidth=1, color=colFinal)
plot(ema4, title="Fast EMA 4", style=line, linewidth=1, color=colFinal)
plot(ema5, title="Fast EMA 5", style=line, linewidth=1, color=colFinal)
p2=plot(ema6, title="Fast EMA 6", style=line, linewidth=2, color=colFinal)
fill(p1,p2,color=silver, transp=60)
//Slow EMA Plots
p3=plot(ema7, title="Slow EMA 7", style=line, linewidth=4, color=colFinal2)
plot(ema8, title="Slow EMA 8", style=line, linewidth=3, color=colFinal2)
plot(ema9, title="Slow EMA 9", style=line, linewidth=3, color=colFinal2)
plot(ema10, title="Slow EMA 10", style=line, linewidth=3, color=colFinal2)
plot(ema11, title="Slow EMA 11", style=line, linewidth=3, color=colFinal2)
p4=plot(ema12, title="Slow EMA 12", style=line, linewidth=4, color=colFinal2)
fill(p3,p4, color=silver, transp=60)
Someone should make a simple strategy script and test this.
Reply
@kakola, I have made the "Guppy Trading EA" but really struggling with the CBL code. Can anyone help, have a resource or code?
Reply
Great work! Do you know how to add an alert when one of the following happen?

1. The fast EMA's are aqua and Slow EMA's are green
2. The fast EMA's are orange and Slow EMA's are red

Thanks!
+1 Reply
I've done this: https://goo.gl/cYGseb - it works for me but Chris may better advise. It takes some experimentation with alerts.
+2 Reply
Depending on your experience with GMMA, these links may be helpful (or not) - it's a site mainly for noobs (so info may not be very accurate):
1. http://www.newtrader.club/2015/06/22/trading-with-guppy/
2. http://www.newtrader.club/2015/07/03/finding-entry-stop-loss-points-using-guppy/
+2 Reply
Hi Chris, so far no one else seems to have given notice of your fine and generous work on the GMMA (in this thread). So I thought I'd say hello and thanks ever so much for this absolutely brilliant tweaking of GMMA. I really like it because it brings out so visually all that's happening. :)
+6 Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
Việt Nam
日本
한국
简体
繁體
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 Priority Support Contact Support Ideas Published Followers Following Private Messages Chat Sign Out