GcNaif

GC Magic(EMA/RMA) V1

This is the second script I am posting on TV . This is a Trend based indicator with the option of using it as Exponential Moving Averages or Rsi Moving Averages.The RMA's are giving better signal than the Exponential Moving Averages. The script has the option to select either of them. Works on all time frames. The default options are working good on all time frames.

With the help of Indicator Properties following Options can be changed
a. Type of moving averages for using Guppy method
b. Option to use higher time frame Signal moving average of your choice along with higher time frame
c. Enable or disable to show signal EMA/RMA on chart .
d. Enable or disable to show Guppy EMA/RMA on chart

Indicator Properties:
1. Select to use EMA , Uncheck to use RMA: --> Check to Select EMA based Guppy or Uncheck to use RMA based Guppy
2. Fast EMA/RMA For Cross --> Fast EMA/RMA cross Length
3. Slow EMA/RMA For Cross --> Slow EMA/RMA Length
4. Signal EMA/RMA --> Moving average to use for Signal filters. This moving average will be based on the timeframe u will be selecting below
5. Time interval for Signal EMA/RMA (W, D, ) --> Which time frame moving average you want for the above Signal EMA
6. Do you want to use Signal EMA/RMA for Signals? --> Do you want to use Signal EMA as filter or just the cross of Guppy . Check to use and uncheck for just cross
7. Show Signal EMA on Chart? --> Do you want to display higher timeframe Signal EMA on chart
8. Show Guppy-Slow-Red On Chart? --> Shows/Hides Slow EMA/RMAs
9. Show Guppy-Fast-Green On Chart? --> Shows/Hides Fast EMA/RMAs
Examples:
GbpAud 15m

GbpNzd 1hr

Oil 4hr

AudUSD 1hr


I am a Chart Slave.Thank you TradingView and @nmike.
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
//@version=1
//based on Guppy method useing ema or rma
//Written by : Gc Naif
//Written on : 1/09/2015

study("GC Magic(EMA/RMA) V1", overlay = true, scale = scale.right)

//input(title="Offset", type=integer, defval=7, minval=-10, maxval=10)
Eema = input(false, title="Select to use EMA , Uncheck to use RMA: ")
ema55 = input(55,   title="Fast EMA/RMA For Cross",minval=55)
ema149= input(149,  title="Slow EMA/RMA For Cross",minval=149)


ema1= 25 ,ema2= 30 ,ema3= 35
ema4= 40 ,ema5= 45 ,ema6= 50,ema7= 55

ema8= 89 ,ema9= 99 ,ema10= 109
ema11= 119 ,ema12= 129 ,ema13= 139,ema14= 149

emaSignalHTF= input(200, title="Signal EMA/RMA ",minval=100)
resCustom = input("120",title="Time interval for Signal EMA/RMA (W, D, [min 60,120,240])", type=string)

UseSignalEMAForSignal= input(false, title="Do you want to use Signal EMA/RMA for Signals?")
ShowSignalEMAonChart = input(false, title="Show Signal EMA on Chart?")
ShowSlowGuppyonChart = input(true, title="Show Guppy-Slow-Red   On Chart?")
ShowFastGuppyonChart = input(true, title="Show Guppy-Fast-Green On Chart?")

price = close

emav1 = Eema ? ema(price,ema1) : rma(price,ema1)
emav2 = Eema ? ema(price,ema2) : rma(price,ema2)
//Eema ? ema(price,ema) : vwma(price,ema)
emav3 = Eema ? ema(price,ema3) : rma(price,ema3) 
emav4 = Eema ? ema(price,ema4) : rma(price,ema4)
emav5 = Eema ? ema(price,ema5) : rma(price,ema5)
emav6 = Eema ? ema(price,ema6) : rma(price,ema6)
emav7 = Eema ? ema(price,ema7) : rma(price,ema7)
emav8 = Eema ? ema(price,ema8) : rma(price,ema8)
emav9 = Eema ? ema(price,ema9) : rma(price,ema9)
emav10 = Eema ? ema(price,ema10) : rma(price,ema10)
emav11 = Eema ? ema(price,ema11) : rma(price,ema11)
emav12 = Eema ? ema(price,ema12) : rma(price,ema12)
emav13 = Eema ? ema(price,ema13) : rma(price,ema13)
emav14 = Eema ? ema(price,ema14) : rma(price,ema14)

emav55  = Eema ? ema(price,ema55) : rma(price,ema55)
emav149 = Eema ? ema(price,ema149) : rma(price,ema149)

// signal vma/ema
sema = Eema ? ema(price, emaSignalHTF) : rma(price, emaSignalHTF)
emaHTF = security(tickerid, resCustom, sema)


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

BuySignal  =  UseSignalEMAForSignal ? MALongCross1 > 0 and open[0] > emaHTF and close[0] > emaHTF : MALongCross1 > 0   and close[1] > emav55 and close > emav55    // buy signal
SellSignal =  UseSignalEMAForSignal ? MAShortCross1 > 0 and open[0] < emaHTF and close[0] < emaHTF : MAShortCross1 > 0  and close[1] < emav55 and close < emav55   // Short Signal

//BuySignal  =  UseSignalEMAForSignal ? MALongCross1 > 0 and open[0] > emaHTF and close[0] > emaHTF : MALongCross1 > 0       // buy signal
//SellSignal =  UseSignalEMAForSignal ? MAShortCross1 > 0 and open[0] < emaHTF and close[0] < emaHTF : MAShortCross1 > 0 // 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(ShowSignalEMAonChart ? emaHTF : na , 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)