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

Gỡ bỏ khỏi Script Ưa thích Thêm vào Script Ưa thích
Very good indicator! Thank you so much for sharing it! Would be great if we could backtest this bad boy! :)
Phản hồi
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.
Phản hồi
Backtested with 0.08% fees, this strategy loses money.
+1 Phản hồi
Hi,
We very much like this Scripts. can you convert the same in python?
Phản hồi
Hi, i´d like to know which values i need to modify for 2H and 4H timeframe, thanks.
Phản hồi
We need to have heiken ashi candles with this indicator right?
+4 Phản hồi
@thefoob, yes
+1 Phản hồi
Hello, I still cant backtest; I used the script posted by Cryptooyster and it gives me an error on starting on line 22 and then it goes on. I have been manually backtesting this strategy and so far it works very well with gbp/jpy 4hrs but it would be faster to do it with the strategy tester; specially on the lower time frames.
+1 Phản hồi
Hello,
I past your strategy code in a new Pine, but when I hit Add to graphic I have a message error:

raison: line 29: mismatched input 'wper' expecting 'end of line without line continuation'

I am a bit new, maybe I made something wrong
Any idea?
+2 Phản hồi
@guikroth Here is ur code to backtest it
//@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
if (longCondition)
strategy.entry("buy", strategy.long, comment="BUY")

shortCondition = shortCond and CondIni == 1
if (shortCondition)
strategy.entry("sell", strategy.short, comment="SELL")
+2 Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Cách thức hoạt động Tính năng Biểu đồ Giá Quy tắc Áp dụng Người điều hành Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Trung tâm Trợ giúp Yêu cầu tính năng Blog & Tin tức Câu hỏi thường gặp Wiki Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Đồng TradingView Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Các ý tưởng đã đăng Người theo dõi Đang theo dõi Tin nhắn riêng Trò chuyện Đăng xuất