infinite
infinite
0
at https://mozilla.org/MPL/2.0/
// © Deewithme
//@version=5
//@ moneymovesalgo and @ AhmetToprakKavran
//This source code is subject to the terms of the Mozilla Public License 2.0 at
https://mozilla.org/MPL/2.0/
if na(rangec[1])
direction := 1
else if prevSuperTrend == prevUpperBand
direction := close > upperBand ? -1 : 1
else
direction := close < lowerBand ? 1 : -1
superTrend := direction == -1 ? lowerBand : upperBand
[superTrend, direction]
//Get Components
ema1 = ta.ema(high, 9)
ema2 = ta.ema(high, 12)
ema3 = ta.ema(high, 15)
ema4 = ta.ema(high, 18)
ema5 = ta.ema(high, 21)
ema6 = ta.ema(high, 24)
ema7 = ta.ema(high, 27)
ema8 = ta.ema(high, 30)
ema9 = ta.ema(high, 33)
ema10 = ta.ema(high, 36)
ema11 = ta.ema(high, 39)
ema12 = ta.ema(high, 42)
ema13 = ta.ema(high, 45)
ema14 = ta.ema(high, 48)
ema15 = ta.ema(high, 51)
//Colors
green = #2BBC4D, red = #C51D0B
emaEnergyColor(ma) => emaEnergy ? (close >= ma ? green : red) : na
//Plots
//plot(ema1, "", emaEnergyColor(ema1), editable=false)
//plot(ema2, "", emaEnergyColor(ema2), editable=false)
plot(ema3, "", emaEnergyColor(ema3), editable=false)
plot(ema4, "", emaEnergyColor(ema4), editable=false)
plot(ema5, "", emaEnergyColor(ema5), editable=false)
plot(ema6, "", emaEnergyColor(ema6), editable=false)
plot(ema7, "", emaEnergyColor(ema7), editable=false)
plot(ema8, "", emaEnergyColor(ema8), editable=false)
plot(ema9, "", emaEnergyColor(ema9), editable=false)
plot(ema10, "", emaEnergyColor(ema10), editable=false)
plot(ema11, "", emaEnergyColor(ema11), editable=false)
plot(ema12, "", emaEnergyColor(ema12), editable=false)
plot(ema13, "", emaEnergyColor(ema13), editable=false)
plot(ema14, "", emaEnergyColor(ema14), editable=false)
plot(ema15, "", emaEnergyColor(ema15), editable=false)
[supertrend, direction] = supertrend(close, sensitivity, 11, keltner_length)
bull = ta.crossover(close, supertrend)
bear = ta.crossunder(close, supertrend)
y1 = low - (ta.atr(30) * 2)
y2 = high + (ta.atr(30) * 2)
//Braid Filter
//Inputs
maType = input.string('McGinley', 'Filter', options=['EMA', 'DEMA', 'TEMA', 'WMA',
'VWMA', 'SMA', 'SMMA', 'HMA', 'LSMA', 'Kijun', 'McGinley', 'RMA'], group='Filters')
Period1 = 3
Period2 = 7
Period3 = 20
PipsMinSepPercent = input.int(75, "Filter Strength", 5, 200, step=5,
group='Filters')
//Moving Average
ma(type, src, len) =>
float result = 0
if type == 'SMA' // Simple
result := ta.sma(src, len)
result
if type == 'EMA' // Exponential
result := ta.ema(src, len)
result
if type == 'DEMA' // Double Exponential
e = ta.ema(src, len)
result := 2 * e - ta.ema(e, len)
result
if type == 'TEMA' // Triple Exponential
e = ta.ema(src, len)
result := 3 * (e - ta.ema(e, len)) + ta.ema(ta.ema(e, len), len)
result
if type == 'WMA' // Weighted
result := ta.wma(src, len)
result
if type == 'VWMA' // Volume Weighted
result := ta.vwma(src, len)
result
if type == 'SMMA' // Smoothed
w = ta.wma(src, len)
result := na(w[1]) ? ta.sma(src, len) : (w[1] * (len - 1) + src) / len
result
if type == 'RMA'
result := ta.rma(src, len)
result
if type == 'HMA' // Hull
result := ta.wma(2 * ta.wma(src, len / 2) - ta.wma(src, len),
math.round(math.sqrt(len)))
result
if type == 'LSMA' // Least Squares
result := ta.linreg(src, len, 0)
result
if type == 'Kijun' //Kijun-sen
kijun = math.avg(ta.lowest(len), ta.highest(len))
result := kijun
result
if type == 'McGinley'
mg = 0.0
mg := na(mg[1]) ? ta.ema(src, len) : mg[1] + (src - mg[1]) / (len *
math.pow(src / mg[1], 4))
result := mg
result
result
//End Plots
BraidColor = ma01 > ma02 and dif > filter ? color.green : ma02 > ma01 and dif >
filter ? color.red : color.gray
//SHORT
short1 = ta.crossunder(rsi66, 70)
short2 = ta.crossunder(rsi66, 80)
short3 = ta.crossunder(rsi66, 85)
//short4 = ta.crossunder(rsi66, 90)
//LONG
plotshape(long1 and ShowTEX and TE1, "GO LONG 1", style=shape.circle,
location=location.belowbar,size=size.tiny, color = color.new(bullcolorr , 60) ,
text="Sell TP" , textcolor = bullcolorr , editable = false)
plotshape(long2 and ShowTEX and TE2, "GO LONG 2", style=shape.circle,
location=location.belowbar,size=size.tiny, color = color.new(bullcolorr , 50),
text="Sell TP" , textcolor = bullcolorr , editable = false)
plotshape(long3 and ShowTEX and TE3, "GO LONG 3", style=shape.circle,
location=location.belowbar,size=size.tiny, color = color.new(bullcolorr , 10),
text="Sell TP", textcolor = bullcolorr , editable = false)
//plotshape(long4 and ShowTEX, "GO LONG 4", style=shape.circle,
location=location.belowbar,size=size.tiny, color=color.gray, text="4")
//SHORT
plotshape(short1 and ShowTEX and TE1, "GO SHORT 1", style=shape.circle,
location=location.abovebar,size=size.tiny, color = color.new(bearcolorr , 60) ,
text="Buy TP" , textcolor = bearcolorr , editable = false)
plotshape(short2 and ShowTEX and TE2, "GO SHORT 2", style=shape.circle,
location=location.abovebar,size=size.tiny, color = color.new(bearcolorr , 50) ,
text="Buy TP" , textcolor = bearcolorr , editable = false)
plotshape(short3 and ShowTEX and TE3, "GO SHORT 3", style=shape.circle,
location=location.abovebar,size=size.tiny, color = color.new(bearcolorr , 10) ,
text="Buy TP" , textcolor = bearcolorr , editable = false)
//plotshape(short4 and ShowTEX, "GO SHORT 4", style=shape.circle,
location=location.abovebar,size=size.tiny, color=color.gray, text="4")
//Alerts
alertcondition(long1 or short1 , 'Trend Exhausted - 1', 'Trend Exhausted | Strength
- 1 ')
alertcondition(long2 or short2 , 'Trend Exhausted - 2', 'Trend Exhausted | Strength
- 2 ')
alertcondition(long3 or short3 , 'Trend Exhausted - 3', 'Trend Exhausted | Strength
- 3 ')