Ema12 Overlay

ema12 overlay
//@version=3
strategy(shorttitle=”guppy ema strategy”, title=”guppy ema strategy”, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, overlay = true, initial_capital = 10000000, backtest_fill_limits_assumption = 1)

Ema12 Overlay

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
ema12 overlay check more ema12 overlay
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)
ema12 overlay informational ema12 overlay
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 overlay informational ema12 overlay
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 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 ema7 and strategy.position_size <= 0
strategy.order("Long", strategy.long, limit = ema7)
if dnTrend and close = 0
strategy.order(“Short”, strategy.short, limit = ema7)
ema12 overlay best of ema12 overlay
if not upTrend and not dnTrend
strategy.close_all()

//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)
ema12 overlay check more ema12 overlay
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)

ema12 overlay ema12 overlay
// === Backtesting Dates ===
testPeriodSwitch = input(false, “Custom Backtesting Dates”)
testStartYear = input(2018, “Backtest Start Year”)
testStartMonth = input(1, “Backtest Start Month”)
testStartDay = input(1, “Backtest Start Day”)
testStartHour = input(0, “Backtest Start Hour”)
testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay,testStartHour,0)
testStopYear = input(2018, “Backtest Stop Year”)
testStopMonth = input(12, “Backtest Stop Month”)
testStopDay = input(14, “Backtest Stop Day”)
ema12 overlay ema12 overlay
testStopHour = input(14, “Backtest Stop Hour”)
testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay,testStopHour,0)
testPeriod() =>
time >= testPeriodStart and time <= testPeriodStop ? true : false
isPeriod = testPeriodSwitch == true ? testPeriod() : true
// === /END
if not isPeriod
strategy.cancel_all()
strategy.close_all()
ema12 overlay

212 Steakhouse

Fujitsu Fi 6130z Driver Windows 7

[wprpi][wprpi][wprpi]