0% found this document useful (0 votes)
86 views5 pages

Ezs Scalping by Hamidbox

The document describes a trading strategy that uses multiple moving averages and indicators like Super Trend and Zero Lag SMA to generate buy and sell signals. It includes inputs to configure period lengths and colors for the indicators. The strategy is intended for scalping trades.

Uploaded by

Soban Rehan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views5 pages

Ezs Scalping by Hamidbox

The document describes a trading strategy that uses multiple moving averages and indicators like Super Trend and Zero Lag SMA to generate buy and sell signals. It includes inputs to configure period lengths and colors for the indicators. The strategy is intended for scalping trades.

Uploaded by

Soban Rehan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

// This source code is subject to the terms of the Mozilla Public License 2.

0 at
https://mozilla.org/MPL/2.0/
// © HamidBox
// For Support:
// USDT (Trc20): TVgoTWEmB9j2AEAVp6PHgrwKwZTkEFCz1p

//@version=4

study("EZS Scalping", shorttitle="EZS Scalping", overlay=true)

// ZLSMA
lengthz = input(title="Length", type=input.integer, defval=50, group = "◈◈◈◈◈◈ | Zero Lag
SMA | ◈◈◈◈◈◈")
offset = input(title="Offset", type=input.integer, defval=0, group = "◈◈◈◈◈◈ | Zero Lag SMA
| ◈◈◈◈◈◈")
width = input(title="Width             ", type=input.integer, defval=2, minval=1, group =
"◈◈◈◈◈◈ | Zero Lag SMA | ◈◈◈◈◈◈", inline="colr")
zlmacol = input(color.new(#fcff40, 0), "", type=input.color, group = "◈◈◈◈◈◈ | Zero Lag
SMA | ◈◈◈◈◈◈", inline="colr")
src = input(close, title="Source", group = "◈◈◈◈◈◈ | Zero Lag SMA | ◈◈◈◈◈◈")
lsma = linreg(src, lengthz, offset)
lsma2 = linreg(lsma, lengthz, offset)
eq = lsma-lsma2
zlsma = lsma+eq

plot(zlsma, color=zlmacol, linewidth=width)

//==========================================//

// Super Trend
length = input(title="ATR Period", type=input.integer, defval=1, group = "◈◈◈◈◈◈ |
SuperTrend | ◈◈◈◈◈◈")
mult = input(title="ATR Multiplier", type=input.float, step=0.1, defval=2.0, group =
"◈◈◈◈◈◈ | SuperTrend | ◈◈◈◈◈◈")
showLabels = input(title="Show Long/Short Labels ?      ", type=input.bool, defval=true,
group = "◈◈◈◈◈◈ | SuperTrend | ◈◈◈◈◈◈")
highlightState = input(title="Highlight State ?", type=input.bool, defval=false, group =
"◈◈◈◈◈◈ | SuperTrend | ◈◈◈◈◈◈", inline="inl")
useClose = input(title="Use Close Price for Extremums ?", type=input.bool, defval=false,
group = "◈◈◈◈◈◈ | SuperTrend | ◈◈◈◈◈◈")

atr = mult * atr(length)

longStop = (useClose ? highest(close, length) : highest(length)) - atr


longStopPrev = nz(longStop[1], longStop)
longStop := close[1] > longStopPrev ? max(longStop, longStopPrev) : longStop

shortStop = (useClose ? lowest(close, length) : lowest(length)) + atr


shortStopPrev = nz(shortStop[1], shortStop)
shortStop := close[1] < shortStopPrev ? min(shortStop, shortStopPrev) : shortStop

var int dir = 1


dir := close > shortStopPrev ? 1 : close < longStopPrev ? -1 : dir

var color longColor = color.rgb(76, 175, 79, 50)


var color shortColor = color.rgb(255, 82, 82, 50)

longStopPlot = plot(dir == 1 ? longStop : na, title="Long Stop", style=plot.style_linebr,


linewidth=2, color=longColor)
buySignal = dir == 1 and dir[1] == -1
plotshape(buySignal ? longStop : na, title="Long Stop Start", location=location.belowbar,
style=shape.circle, size=size.tiny, color=longColor, transp=0)
plotshape(buySignal and showLabels ? longStop : na, title="Buy Label", text="BUY",
location=location.belowbar, style=shape.labelup, size=size.tiny, color=longColor,
textcolor=color.white, transp=0)

shortStopPlot = plot(dir == 1 ? na : shortStop, title="Short Stop", style=plot.style_linebr,


linewidth=2, color=shortColor)
sellSignal = dir == -1 and dir[1] == 1
plotshape(sellSignal ? shortStop : na, title="Short Stop Start", location=location.abovebar,
style=shape.circle, size=size.tiny, color=shortColor, transp=0)
plotshape(sellSignal and showLabels ? shortStop : na, title="Sell Label", text="SELL",
location=location.abovebar, style=shape.labeldown, size=size.tiny, color=shortColor,
textcolor=color.white, transp=0)

midPricePlot = plot(ohlc4, title="", style=plot.style_circles, linewidth=0, display=display.none,


editable=false)

longFillColor = highlightState ? (dir == 1 ? longColor : na) : na


shortFillColor = highlightState ? (dir == -1 ? shortColor : na) : na
fill(midPricePlot, longStopPlot, title="Long State Filling", color=longFillColor)
fill(midPricePlot, shortStopPlot, title="Short State Filling", color=shortFillColor)

changeCond = dir != dir[1]


// alertcondition(changeCond, title="Alert: CE Direction Change", message="Chandelier Exit has
changed direction!")
// alertcondition(buySignal, title="Alert: CE Buy", message="Chandelier Exit Buy!")
// alertcondition(sellSignal, title="Alert: CE Sell", message="Chandelier Exit Sell!")
/////////////////////////////////////////////////////////////////////////////////////////////

// SIMPLE MA SECTION
smaType(source , length, type) =>
type == "SMA" ? sma(source , length) :
type == "EMA" ? ema(source , length) :
na

len1 = input(89, minval=0, title="SMA", group="◈◈◈◈◈◈ | MOVING AVERAGE section |


◈◈◈◈◈◈", inline="on")
smatype = input(title="", defval="SMA", options=["SMA","EMA"], group="◈◈◈◈◈◈ |
MOVING AVERAGE section | ◈◈◈◈◈◈", inline="on")
sma_src = input(close, title="", inline="on", group="◈◈◈◈◈◈ | MOVING AVERAGE section |
◈◈◈◈◈◈")
smacolr = input(color.new(#ffffff, 0), "", type=input.color, group="◈◈◈◈◈◈ | MOVING
AVERAGE section | ◈◈◈◈◈◈", inline="on")
len1bol = input(title="ON", type=input.bool, defval=false, group="◈◈◈◈◈◈ | MOVING
AVERAGE section | ◈◈◈◈◈◈", inline="on")

// // EXPONENTIAL MA SECTION
// elen1 = input(89, minval=0, title="EMA", group="◈◈◈◈◈◈ | MOVING AVERAGE section |
◈◈◈◈◈◈", inline="off")
// ema_src = input(close, title="Source", inline="off", group="◈◈◈◈◈◈ | MOVING AVERAGE
section | ◈◈◈◈◈◈")
// emacolr = input(color.new(#ffffff, 0), "", type=input.color, group="◈◈◈◈◈◈ | MOVING
AVERAGE section | ◈◈◈◈◈◈", inline="off")
// elen1bol = input(title="OFF", type=input.bool, defval=false, group="◈◈◈◈◈◈ | MOVING
AVERAGE section | ◈◈◈◈◈◈", inline="off")

// // SMA Value
// out1 = sma(sma_src, len1)
// // EMA Value
// eout1 = ema(ema_src, elen1)

smainput = smaType(sma_src, len1, smatype)

plot(len1bol ? smainput : na, color= smacolr, title="Moving Average")


// plot(elen1bol ? eout1 : na, color= emacolr, title="1 EMA")

///////////////////////////////////////////////////////////////////////////////////////////////
maType(source , length, type) =>
type == "SMA" ? sma(source , length) :
type == "EMA" ? ema(source , length) :
na

read = input(title="For Safe Side = Read This >>>", defval=true, group="◈◈◈◈◈◈ |


Moving average zone section | ◈◈◈◈◈◈", tooltip="If you want to play on the safe side, Check
ON Moving Average № 3, MA №3 shows the major trend, its work as a Trend-Zone,\nRule: Do
not open trades if the market is below MA № 3, WHY? because Trend is Bearish and it will
make more Down, NOTE:: It is possible after adding MA № 3, it will give you a small profit. But
the great advantage of that, it will reduce your loss and it will also increase your Profit Factor.\
nAnd if you not have any issue with Risk then you can Leave Moving Average No 3")
ma3_show = input(title="MA №3", defval=true, type=input.bool, inline="ma3" ,
group="◈◈◈◈◈◈ | Moving average zone section | ◈◈◈◈◈◈")
ma3type = input(title="", defval="SMA", options=["SMA","EMA"], inline="ma3" ,
group="◈◈◈◈◈◈ | Moving average zone section | ◈◈◈◈◈◈")
ma3Len = input(title="", defval=89, type=input.integer, inline="ma3" , group="◈◈◈◈◈◈
| Moving average zone section | ◈◈◈◈◈◈")
ma3col = input(color.new(#ffffff, 0), "", type=input.color, inline="ma3" ,
group="◈◈◈◈◈◈ | Moving average zone section | ◈◈◈◈◈◈")
zone_col_on = input(title="", defval=true, inline="ma3" , group="◈◈◈◈◈◈ | Moving
average zone section | ◈◈◈◈◈◈")
ma3col_up = input(color.new(color.lime, 70), "", type=input.color, inline="ma3" ,
group="◈◈◈◈◈◈ | Moving average zone section | ◈◈◈◈◈◈")
ma3col_dn = input(color.new(#e91e63, 70), "", type=input.color, inline="ma3" ,
group="◈◈◈◈◈◈ | Moving average zone section | ◈◈◈◈◈◈")
// ma3col_mid = input(color.new(#fff129, 70), "", type=input.color, inline="ma3" ,
group="Moving average zone section")

ma3H = maType(high, ma3Len, ma3type)


ma3L = maType(low, ma3Len, ma3type)

ma3p = plot(ma3_show ? ma3H : na, linewidth=1, color=color.new(ma3col , 50))


ma3p2 = plot(ma3_show ? ma3L : na, linewidth=1, color=color.new(ma3col , 50))

Bigcross_zone_color = if zone_col_on and close > ma3H


ma3col_up
else
if zone_col_on and close < ma3L
ma3col_dn
// else
// if zone_col_on and close > ma3L and close < ma3H
// ma3col_mid
fill(ma3p , ma3p2, color=Bigcross_zone_color, title="Cross Background Color")

BigCrossSignal = close > ma3H


ZoneCrossover = crossover(close , ma3H)

You might also like