Professional Documents
Culture Documents
//why ? because i was bored and i was lazy so i did not want to put all my
freetime on this but i did add extra options
// disclaimer : this does nt contain all options... if there is something you
would like me to add dm me
// @ moneymovesalgo
//
//-----------------------------------------
====================================================-------------------------------
\\
//
\\
//@version=5
indicator("EzAlgo V1.0", shorttitle='EzAlgo V1.0', overlay=true)
y1 = low - (ta.atr(30) * 2)
y2 = high + (ta.atr(30) * 2)
per2 = 50
mult2 = 3
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x[1]), t)
smoothrng = ta.ema(avrng, wper) * m
smoothrng
smrng1 = smoothrng(close, per1 *9, mult1)
smrng2 = smoothrng(close, per2, mult2)
smrng = (smrng1 + smrng2) / 2
// -------------------- \\
rngfilt(x, r) =>
rngfilt = x
rngfilt := x > nz(rngfilt[1]) ? x - r < nz(rngfilt[1]) ? nz(rngfilt[1]) : x - r
: x + r > nz(rngfilt[1]) ? nz(rngfilt[1]) : x + r
rngfilt
filt = rngfilt(close, smrng)
upward = 0.0
upward := filt > filt[1] ? nz(upward[1]) + 1 : filt < filt[1] ? 0 : nz(upward[1])
downward = 0.0
downward := filt < filt[1] ? nz(downward[1]) + 1 : filt > filt[1] ? 0 :
nz(downward[1])
hband = filt + smrng
lband = filt - smrng
longCond = bool(na)
shortCond = bool(na)
longCond := close > filt and close > close[1] and upward > 0 or close > filt and
close < close[1] and upward > 0
shortCond := close < filt and close < close[1] and downward > 0 or close < filt and
close > close[1] and downward > 0
CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni[1]
// Plotting
// Alerts
alertcondition(long and enSignals, title='Buy Signal' , message='Buy Signal Has
Appeared For EzAlgo V.5' )
alertcondition(short and enSignals, title='Sell Signal', message='Sell Signal Has
Appeared For EzAlgo V.5')
lvlLines = (true)
linesStyle = ("SOLID")
lvlDecimals = (4)
lvlDistance = (1)
atrLen = (14)
countBull = ta.barssince(bull)
countBear = ta.barssince(bear)
stop_y = lastTrade(atrStop)
stop = levelsl ? label.new(time, close, "Stop Loss | " + str.tostring(stop_y,
decimals), xloc.bar_time, yloc.price, color.rgb(255,82,83,0),
label.style_label_left, color.new(color.white, 10), size.small) : na
label.set_x(stop, label.get_x(stop) + math.round(ta.change(time) * lvlDistance))
label.set_y(stop, stop_y)
label.delete(stop[1])
tp1sd = ta.crossunder(close, tp1_y) and not bull and not bear and close<supertrend
tp2sd = ta.crossunder(close, tp15_y) and not bull and not bear and close<supertrend
plotshape(tp2sd, text='', style=shape.xcross, location=location.belowbar,
size=size.tiny, color=color.new(#2157f999, 68), textcolor=#ff000099)
tp3sd = ta.crossunder(close, tp2_y) and not bull and not bear and close<supertrend
// ----------------------------------------- bands
----------------------------------- \\
useEma = true
int volBandsSen = 5
gray = volBands ? #787B86 : na, gray40 = volBands ? color.new(gray, 60) : na,
gray5 = volBands ? color.new(gray, 95) : na, gray20 = volBands ?
color.new(gray, 80) : na
//
f_kc(src, len, mult) =>
float basis = useEma ? ta.ema(src, len) : ta.sma(src, len)
float span = useEma ? ta.ema(ta.tr, len) : ta.sma(ta.tr, len)
[basis + span * mult, basis - span * mult]
// set bull
mal_is_bull = (shortem > intm ? color.new(#00DBFF, 75) : color.new(#E93E63, 75))
// plot it
plot(mal ? longem : na, color = mal_is_bull, linewidth=4)
//number
rsiLength = 14
rsiOverbought = 66
rsiOversold = 35
drawOnRT = true
left = 50
right = 25
quick_right = 5 // Used to try and detect a more recent significant swing.
src = close
Wilders_Period = RSI_Period * 2 - 1
longband = 0.0
shortband = 0.0
trend = 0
DeltaFastAtrRsi = dar
RSIndex = RsiMa
newshortband = RSIndex + DeltaFastAtrRsi
newlongband = RSIndex - DeltaFastAtrRsi
longband := RSIndex[1] > longband[1] and RSIndex > longband[1] ?
math.max(longband[1], newlongband) : newlongband
shortband := RSIndex[1] < shortband[1] and RSIndex < shortband[1] ?
math.min(shortband[1], newshortband) : newshortband
cross_1 = ta.cross(longband[1], RSIndex)
trend := ta.cross(RSIndex, shortband[1]) ? 1 : cross_1 ? -1 : nz(trend[1], 1)
FastAtrRsiTL = trend == 1 ? longband : shortband
Exlong = 0
Exlong := nz(Exlong[1])
Exshort = 0
Exshort := nz(Exshort[1])
Exlong := FastAtrRsiTL < RSIndex ? Exlong + 1 : 0
Exshort := FastAtrRsiTL > RSIndex ? Exshort + 1 : 0
//Conditions
// Plotting
// ------------------------------------- hh and ll
---------------------------------------- \\
ph = ta.pivothigh(lb, rb)
pl = ta.pivotlow(lb, rb)
float a = na
float b = na
float c = na
float d = na
float e = na
if not na(hl)
[loc1, loc2, loc3, loc4] = findprevious()
a := zz
b := loc1
c := loc2
d := loc3
e := loc4
e