Strategi Scalping Saluran Harga Noro
Strategi ini pertama-tama menghitung saluran harga tertinggi (lasthigh) dan saluran harga terendah (lastlow) dari harga, kemudian menghitung garis tengah saluran harga (tengah). Selanjutnya, ia menghitung jarak (dist) antara harga dan garis tengah serta rata-rata bergerak sederhana dari jarak (distsma). Berdasarkan ini, band volatilitas 1 kali (hd dan ld) dan 2 kali (hd2 dan ld2) jarak dari garis tengah dapat dihitung.
Ketika harga menembus band volatilitas 1 kali jarak dari garis tengah, itu dinilai bullish. Ketika harga menembus band volatilitas di bawah garis tengah, itu dinilai bearish. Strategi membuka posisi terbalik ketika tanda-tanda kelelahan terjadi dalam tren. Misalnya, dalam tren naik, jika ada dua garis yang, posisi pendek akan dibuka pada penutupan garis yang kedua; dalam tren turun, jika ada dua garis yin, posisi panjang akan dibuka pada penutupan garis yin kedua.
Secara umum, Strategi Scalping Saluran Harga Noro
/*backtest start: 2023-11-10 00:00:00 end: 2023-12-10 00:00:00 period: 3h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=2 strategy("Noro's Bands Scalper Strategy v1.0", shorttitle = "Scalper str 1.0", overlay=true, default_qty_type = strategy.percent_of_equity, default_qty_value=100.0, pyramiding=0) //Settings needlong = input(true, defval = true, title = "Long") needshort = input(true, defval = true, title = "Short") len = input(20, defval = 20, minval = 2, maxval = 200, title = "Period") needbb = input(true, defval = true, title = "Show Bands") needbg = input(true, defval = true, title = "Show Background") src = close //PriceChannel lasthigh = highest(src, len) lastlow = lowest(src, len) center = (lasthigh + lastlow) / 2 //Distance dist = abs(src - center) distsma = sma(dist, len) hd = center + distsma ld = center - distsma hd2 = center + distsma * 2 ld2 = center - distsma * 2 //Trend trend = close < ld and high < hd ? -1 : close > hd and low > ld ? 1 : trend[1] //Lines colo = needbb == false ? na : black plot(hd, color = colo, linewidth = 1, transp = 0, title = "High band") plot(center, color = colo, linewidth = 1, transp = 0, title = "center") plot(ld, color = colo, linewidth = 1, transp = 0, title = "Low band") //Background col = needbg == false ? na : trend == 1 ? lime : red bgcolor(col, transp = 80) //Signals bar = close > open ? 1 : close < open ? -1 : 0 up7 = trend == 1 and bar == -1 and bar[1] == -1 ? 1 : 0 dn7 = trend == 1 and bar == 1 and bar[1] == 1 and close > strategy.position_avg_price ? 1 : 0 up8 = trend == -1 and bar == -1 and bar[1] == -1 and close < strategy.position_avg_price ? 1 : 0 dn8 = trend == -1 and bar == 1 and bar[1] == 1 ? 1 : 0 if up7 == 1 or up8 == 1 strategy.entry("Long", strategy.long, needlong == false ? 0 : trend == -1 ? 0 : na) if dn7 == 1 or dn8 == 1 strategy.entry("Short", strategy.short, needshort == false ? 0 : trend == 1 ? 0 : na)