GcNaif

GC Magic Overlay V2

ema
This script is based on Guppy method (www.guppytraders.com/gup329.shtml
) , it was introduced to me by fellow trader @nmike. I am using this script in conjunction to Clones ,Harmonic and other tools.

Script Function:
a. Script plots the fast and slow Exponential moving averages as ribbons.
EMA's used
EMA (close): 25,30,35,40,45,50,55 (Green)
EMA (close): 89,99,109,119,129,139,149 (Red)
b. It draws the Circle dots in Pink for Sell and Black for Buy.

Script Parameters:
a. EMA : 2 emas for cross
b. Signal Exponential moving average
c. which time frame to Plot the above Signal Exponential
d. Show Guppy Slow - Red - Toggle to show red emas on chart
e. Show Guppy Fast - Green- Toggle to show green emas on chart

How to Trade:
a. Wait for the Pink/Black Dot to appear on Chart
b. Do not take trade immediately after the dot appears. Wait for the price to retrace back and touch the ema ribbons.This will keep you away from fake breakouts.
c. Rentries : in examples below

Examples:

I am a Chart Slave.Thank you TradingView and @nmike.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//@version=1
//based on Guppy method
//Written by : Gc Naif
//Written on : 12/31/2015

study("GC Magic Overlay V2", overlay = true, scale = scale.right)

//input(title="Offset", type=integer, defval=7, minval=-10, maxval=10)

ema55 = input(55,  title="EMA 1",minval=55)
ema149= input(149,  title="EMA 2",minval=149)
emaSignalHTF= input(200, title="Signal EMA ",minval=200)
resCustom = input(title="Time interval for Signal EMA (W, D, [min 60,120,240])", type=string, defval="240")
ShowSlowGuppyonChart = input(true, title="Show Guppy-Slow-Red   On Chart?")
ShowFastGuppyonChart = input(true, title="Show Guppy-Fast-Green On Chart?")


price = close
emav1 = ema(price,25)
emav2 = ema(price,30)
emav3 = ema(price,35)
emav4 = ema(price,40)
emav5 = ema(price,45)
emav6 = ema(price,50)
emav7 = ema(price,55)
emav8 = ema(price,89)
emav9 = ema(price,99)
emav10 = ema(price,109)
emav11 = ema(price,119)
emav12 = ema(price,129)
emav13 = ema(price,139)
emav14 = ema(price,149)

emav55  = ema(price,ema55)
emav149 = ema(price,ema149)


emaHTF = security(tickerid, resCustom, ema(price, emaSignalHTF))


MALongCross1 = crossover(emav55,emav149)  ? 1 : 0 
MAShortCross1 = crossunder(emav55,emav149)  ? 1 : 0 

BuySignal  = MALongCross1 > 0 and open[0] > emaHTF and close[0] > emaHTF      // buy signal
SellSignal = MAShortCross1 > 0 and open[0] < emaHTF and close[0] < emaHTF     // Short Signal

BuyGC  = BuySignal == 1
SellGC = SellSignal == 1

//plot only if guppy is checked
plot(ShowFastGuppyonChart ? emav55 : na , color=green, transp=0, linewidth=1)
plot(ShowSlowGuppyonChart ? emav149 : na, color=red, transp=0, linewidth=1)

//fast
plot(ShowFastGuppyonChart ? emav1 : na , color=green, transp=0, linewidth=1)
plot(ShowFastGuppyonChart ? emav2 : na , color=green, transp=0, linewidth=1)
plot(ShowFastGuppyonChart ? emav3 : na , color=green, transp=0, linewidth=1)
plot(ShowFastGuppyonChart ? emav4 : na , color=green, transp=0, linewidth=1)
plot(ShowFastGuppyonChart ? emav5 : na , color=green, transp=0, linewidth=1)
plot(ShowFastGuppyonChart ? emav6 : na , color=green, transp=0, linewidth=1)
// slow
plot(ShowSlowGuppyonChart ? emav8 : na ,  color=red, transp=0, linewidth=1)
plot(ShowSlowGuppyonChart ? emav9 : na ,  color=red, transp=0, linewidth=1)
plot(ShowSlowGuppyonChart ? emav10 : na , color=red, transp=0, linewidth=1)
plot(ShowSlowGuppyonChart ? emav11 : na , color=red, transp=0, linewidth=1)
plot(ShowSlowGuppyonChart ? emav12 : na , color=red, transp=0, linewidth=1)
plot(ShowSlowGuppyonChart ? emav13 : na , color=red, transp=0, linewidth=1)
plot(emaHTF, color=#ff00ff, transp=0, linewidth=2)

plotshape(BuyGC, style = shape.circle,location=location.belowbar, color=black, transp=0,size = size.small)
plotshape(SellGC, style = shape.circle,location=location.abovebar, color=#ff00ff , transp=0,size = size.small)