모멘텀 포지셔널 노로밴드 전략


생성 날짜: 2024-01-18 10:58:48 마지막으로 수정됨: 2024-01-18 10:58:48
복사: 1 클릭수: 561
avatar of ChaoZhang ChaoZhang
1
집중하다
1617
수행원

모멘텀 포지셔널 노로밴드 전략

개요

이 전략은 노로 (Noro) 의 파동 이론과 양적 기술을 결합한 동적 뚫림 전략이다. 그것은 평균선, RSI, 파동, 그리고 호랑이색과 같은 여러 지표들을 계산하여 매매 신호를 형성하고 파동 뚫림 거래를 구현한다.

전략 원칙

  1. 평균 실제 파장을 통해 파장의 상하를 계산한다. 가격의 상하 돌파는 호불호 신호이며, 하하 돌파는 하향 신호이다.
  2. RSI 지표로 판단하면, RSI는 30이하의 부진과 70이하의 부진을 나타냅니다.
  3. 최고 가격과 최저 가격의 돌파구를 통해 가격의 동적 방향을 판단한다.
  4. 황소와 곰의 색깔을 통해 다수점과 공시장을 판단한다. 초록색은 다수점 시장, 낙점; 빨간색은 공시 시장, 낙점 .
  5. 평행선 판단의 이탈과 결합하여 거래 신호를 발산한다.

우위 분석

  1. 다양한 지표 조합으로 정확도를 높여줍니다.
  2. 이 전략은 Band Theory와 Quantitative Technology의 결합으로 더욱 효과적입니다.
  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)