노로밴드 모멘텀 포지션 전략

저자:차오장, 날짜: 2024-01-18 10:58:48
태그:

img

전반적인 설명

이 전략은 노로의 밴드 이론과 양적 기법을 결합하여 모멘텀 브레이크아웃 전략을 형성합니다. 그것은 밴드 브레이크아웃 거래를 구현하기 위해 이동 평균, RSI, 밴드, 컬러 바 및 기타 지표를 계산하여 거래 신호를 생성합니다.

전략 논리

  1. 상위 및 하위 대역을 평균 진 범위를 사용하여 계산합니다. 상위 대역을 통과하는 가격은 긴 신호를 나타냅니다. 하위 대역을 깨는 것은 짧은 신호를 제공합니다.
  2. RSI 지표를 사용 하 여 과잉 구매 및 과잉 판매 구역을 결정 합니다. RSI 30 아래는 긴, 70 이상은 짧은 것을 제안 합니다.
  3. 최대 가격과 최소 가격을 깨는 것은 가격 동력 방향을 보여줍니다.
  4. 색상 바는 상승 또는 하락 시장을 나타냅니다. 녹색은 긴 황소 시장을 의미하고 빨간색은 짧은 곰 시장을 의미합니다.
  5. 트레이드 신호의 분리를 확인하기 위해 이동 평균을 결합합니다.

장점

  1. 여러 지표가 조합되면 정확도가 높아집니다.
  2. 밴드 이론과 양적 기술을 결합하면 전략이 더 효과적입니다.
  3. 동력 브레이크오웃과 평균 리버션 트레이딩을 혼합하면 수익 공간을 넓힐 수 있습니다.
  4. 시장에 따라 매개 변수를 조정하는 높은 확장성

위험성

  1. 매개 변수들은 끊임없이 최적화되고 테스트되어야 합니다.
  2. 긴 단축 스위치에 적시에 반응하지 않아 손실이 발생할 수 있습니다.
  3. 높은 거래 빈도, 수수료와 미끄러짐에 의해 쉽게 영향을받습니다.
  4. 매개 변수는 다양한 주기에 맞게 적시에 조정되어야 합니다.

최적화

  1. 가장 좋은 매개 변수 조합을 찾기 위해 다중 시간 프레임 검증
  2. 단일 손실을 줄이기 위해 스톱 로스를 추가합니다.
  3. 수익 효율을 높이기 위해 더 큰 위치 관리
  4. 자동 매개 변수 최적화를 위해 딥 러닝을 결합합니다.

요약

이 전략은 동력과 평균 반전 지표를 통해 효과적인 수익을 달성하기 위해 전형적인 양적 지표를 결합합니다. 또한 합리적인 입구 지점을 찾기 위해 평균 진정한 범위 이론을 사용합니다. 이론과 기술을 결합하는 좋은 예입니다. 매개 변수 최적화 및 위험 통제 개선으로 효율적이고 안정적인 양적 전략이 될 것입니다.


/*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)

더 많은