NoroBands Momentum Posisi Strategi

Penulis:ChaoZhang, Tanggal: 2024-01-18 10:58:48
Tag:

img

Gambaran umum

Strategi ini menggabungkan teori band Noros dengan teknik kuantitatif untuk membentuk strategi momentum breakout.

Logika Strategi

  1. Menghitung band atas dan bawah menggunakan rentang rata-rata yang benar. Harga yang menembus band atas menunjukkan sinyal panjang sementara menembus band bawah memberikan sinyal pendek.
  2. Gunakan indikator RSI untuk menentukan zona overbought dan oversold. RSI di bawah 30 menunjukkan panjang sementara di atas 70 menunjukkan pendek.
  3. Mematahkan harga maksimum dan minimum menunjukkan arah momentum harga.
  4. Bar warna menunjukkan pasar bullish atau bearish. Hijau berarti pasar bull untuk jangka panjang sementara merah berarti pasar bear untuk jangka pendek.
  5. Menggabungkan rata-rata bergerak untuk mengidentifikasi divergensi untuk sinyal perdagangan.

Keuntungan

  1. Kombinasi beberapa indikator meningkatkan akurasi.
  2. Menggabungkan teori pita dan teknik kuantitatif membuat strategi lebih efektif.
  3. Menggabungkan momentum breakout dan rata-rata reversi perdagangan memperluas ruang keuntungan.
  4. Ekspansibilitas tinggi untuk menyesuaikan parameter sesuai dengan pasar.

Risiko

  1. Parameter perlu terus-menerus dioptimalkan dan diuji.
  2. Gagal menanggapi tepat waktu untuk saklar pendek panjang, menyebabkan kerugian mungkin.
  3. Frekuensi perdagangan yang tinggi, mudah dipengaruhi oleh biaya dan slippage.
  4. Parameter harus disesuaikan tepat waktu agar sesuai dengan siklus yang berbeda.

Optimalisasi

  1. Validasi multi-frame waktu untuk menemukan kombinasi parameter terbaik.
  2. Tambahkan stop loss untuk mengurangi kerugian tunggal.
  3. Manajemen posisi yang lebih besar untuk meningkatkan efisiensi keuntungan.
  4. Menggabungkan pembelajaran mendalam untuk optimasi parameter otomatis.

Ringkasan

Strategi ini menggabungkan indikator kuantitatif khas untuk mencapai keuntungan yang efektif melalui indikator momentum dan reversi rata-rata. Ini juga menggunakan teori rentang rata-rata yang benar untuk menemukan titik masuk yang wajar. Contoh yang baik dari menggabungkan teori dan teknik. Dengan optimasi parameter dan peningkatan kontrol risiko, ini akan menjadi strategi kuantitatif yang efisien dan stabil.


/*backtest
start: 2023-01-11 00:00:00
end: 2024-01-17 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/


//@version=2
strategy("Noro's Bands Strategy v1.5", shorttitle = "NoroBands str 1.5", overlay=true)

//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")
color = input(true, defval = true, title = "Use ColorBar")
usecb = input(true, defval = true, title = "Use CryptoBottom")
usersi = input(true, defval = true, title = "Use RSI")
usemm = input(true, defval = true, title = "Use min/max")
usepyr = input(true, defval = true, title = "Use pyramiding")
needbb = input(false, defval = false, title = "Show Bands")
needbg = input(false, defval = false, title = "Show Background")
needlo = input(false, defval = false, title = "Show Locomotive")
needpy = input(false, defval = false, title = "Show Avg.price line")
src = close

//Fast RSI
fastup = rma(max(change(src), 0), 2)
fastdown = rma(-min(change(src), 0), 2)
fastrsi = fastdown == 0 ? 100 : fastup == 0 ? 0 : 100 - (100 / (1 + fastup / fastdown))

//CryptoBottom
mac = sma(close, 10)
lencb = abs(close - mac)
sma = sma(lencb, 100)
max = max(open, close)
min = min(open, close)

//PriceChannel
lasthigh = highest(src, len)
lastlow = lowest(src, len)
center = (lasthigh + lastlow) / 2

//dist
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(hd2, color = colo, linewidth = 1, transp = 0, title = "High band 2")
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")
plot(ld2, color = colo, linewidth = 1, transp = 0, title = "Low band 2")

//Background
col = needbg == false ? na : trend == 1 ? lime : red
bgcolor(col, transp = 80)

//Signals
up = trend == 1 and ((close < open or color == false) or close < hd) and (min < min[1] or usemm == false) and (close < strategy.position_avg_price or usepyr == false or strategy.position_size <= 0) ? 1 : 0
dn = trend == -1 and ((close > open or color == false) or close > ld) and (max > max[1] or usemm == false) and (close > strategy.position_avg_price or usepyr == false or strategy.position_size >= 0) ? 1 : 0 
up2 = close < open and lencb > sma * 3 and min < min[1] and fastrsi < 10 and (close < strategy.position_avg_price or usepyr == false or strategy.position_size <= 0) ? 1 : 0 //CryptoBottom
//dn2 = close > open and len > sma * 3 and max > max[1] and fastrsi > 90 ? 1 : 0 //CryptoBottom
up3 = fastrsi < 5 and usersi == true and (close < strategy.position_avg_price or usepyr == false or strategy.position_size <= 0) ? 1 : 0
//dn3 = fastrsi > 95 and usersi = true ? 1 : 0

//Avg Price
colpy = needpy == false ? na : black
plot(strategy.position_avg_price, color = colpy)

up4 = close < strategy.position_avg_price and usepyr == true and strategy.position_size >= 0 ? 1 : 0 
dn4 = close > strategy.position_avg_price and usepyr == true and strategy.position_size <= 0 ? 1 : 0 

//Locomotive
uploco = trend == 1 and close < open and min < min[1] and close < center ? 1 : 0
plotarrow(needlo == true and uploco == 1 ? 1 : 0, colorup = black, colordown = black, transp = 0)

longCondition = up == 1 or (up2 == 1 and usecb == true) or (up3 == 1 and usersi == true) or up4 == 1
if (longCondition)
    strategy.entry("Long", strategy.long, needlong == false ? 0 : na)

shortCondition = dn == 1 or dn4 == 1
if (shortCondition)
    strategy.entry("Short", strategy.short, needshort == false ? 0 : na)

Lebih banyak