guikroth

Range Filter Buy and Sell 5min

Original Version credits to DonovanWall

Actual Version i just set alerts and change the parameters for BTCUSDC 5min Chart.

NO REPAINT.

Wait For Barclose

Rimuovi dagli script preferiti Aggiungi agli script preferiti
backtest, she works bad on history, need more filtres
//@version=3

//Original Script > @DonovanWall

// Actual Version > @guikroth

//////////////////////////////////////////////////////////////////////////
// Settings for 5min chart, BTCUSDC. For Other coin, change the paremeters
//////////////////////////////////////////////////////////////////////////

strategy(title="Range Filter Buy and Sell 5min", overlay=true)

// Source

src = input(defval=close, title="Source")

// Sampling Period
// Settings for 5min chart, BTCUSDC. For Other coin, change the paremeters

per = input(defval=100, minval=1, title="Sampling Period")

// Range Multiplier

mult = input(defval=3.0, minval=0.1, title="Range Multiplier")

// Smooth Average Range

smoothrng(x, t, m)=>
wper = (t*2) - 1
avrng = ema(abs(x - x), t)
smoothrng = ema(avrng, wper)*m
smoothrng
smrng = smoothrng(src, per, mult)

// Range Filter

rngfilt(x, r)=>
rngfilt = x
rngfilt := x > nz(rngfilt) ? ((x - r) < nz(rngfilt) ? nz(rngfilt) : (x - r)) : ((x + r) > nz(rngfilt) ? nz(rngfilt) : (x + r))
rngfilt
filt = rngfilt(src, smrng)

// Filter Direction

upward = 0.0
upward := filt > filt ? nz(upward) + 1 : filt < filt ? 0 : nz(upward)
downward = 0.0
downward := filt < filt ? nz(downward) + 1 : filt > filt ? 0 : nz(downward)

// Target Bands

hband = filt + smrng
lband = filt - smrng

// Colors

filtcolor = upward > 0 ? lime : downward > 0 ? red : orange
barcolor = (src > filt) and (src > src) and (upward > 0) ? lime : (src > filt) and (src < src) and (upward > 0) ? green :
(src < filt) and (src < src) and (downward > 0) ? red : (src < filt) and (src > src) and (downward > 0) ? maroon : orange

filtplot = plot(filt, color=filtcolor, linewidth=3, title="Range Filter")

// Target

hbandplot = plot(hband, color=aqua, transp=100, title="High Target")
lbandplot = plot(lband, color=fuchsia, transp=100, title="Low Target")

// Fills

fill(hbandplot, filtplot, color=aqua, title="High Target Range")
fill(lbandplot, filtplot, color=fuchsia, title="Low Target Range")

// Bar Color

barcolor(barcolor)

// Break Outs

longCond = na
shortCond = na
longCond := ((src > filt) and (src > src) and (upward > 0)) or ((src > filt) and (src < src) and (upward > 0))
shortCond := ((src < filt) and (src < src) and (downward > 0)) or ((src < filt) and (src > src) and (downward > 0))

CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni
longCondition = longCond and CondIni == -1
shortCondition = shortCond and CondIni == 1

//Alerts

plotshape(longCondition, title = "Buy Signal", text ="BUY", textcolor = white, style=shape.labelup, size = size.normal, location=location.belowbar, color = green, transp = 0)
plotshape(shortCondition, title = "Sell Signal", text ="SELL", textcolor = white, style=shape.labeldown, size = size.normal, location=location.abovebar, color = red, transp = 0)

alertcondition(longCo
Rispondi
superspekulant superspekulant
@superspekulant,
alertcondition(longCondition, title="Buy Alert", message = "BUY")
alertcondition(longCondition, title="Buy Alert", message = "BUY")
alertcondition(longCondition, title="Buy Alert", message = "BUY")
alertcondition(shortCondition, title="Sell Alert", message = "SELL")

if longCondition
strategy.entry("Long", strategy.long)

if shortCondition
strategy.entry("Short", strategy.short)
Rispondi
Has anyone found a way to read it effectively and have the least amount of mistakes?
Rispondi
Very good indicator! Thank you so much for sharing it! Would be great if we could backtest this bad boy! :)
+1 Rispondi
thx for putting the soucre code public

guys check this strategy it's based on this one but for 15m and is constantly in profit including 0.15 fee.
Rispondi
Backtested with 0.08% fees, this strategy loses money.
+2 Rispondi
Hi,
We very much like this Scripts. can you convert the same in python?
+1 Rispondi
Hi, i´d like to know which values i need to modify for 2H and 4H timeframe, thanks.
Rispondi
We need to have heiken ashi candles with this indicator right?
+4 Rispondi
@thefoob, yes
+1 Rispondi
Home Screener azioni Screener forex Screener cripto Calendario economico Show Come funziona Caratteristiche Grafico Costi Regolamento Moderatori Soluzioni per broker & siti web Widget Librerie grafiche Libreria grafica leggera Centro di supporto Invita un amico Suggerisci funzionalità Blog & Novità Twitter
Profilo Impostazioni profilo Account e fatturazione Invita un amico I miei ticket di supporto Centro di supporto Idee pubblicate Follower Seguiti Messaggi Privati Chat Esci