이 전략은 평평선 이론을 사용하여 격자 거래 시스템을 구축하여 여러 개의 다른 파라미터의 JMA 평평선 조합을 통해 시장 추세를 판단하고, 추세 전환점에서 격자 거래를 열고, 시장의 중간에 긴 선 추세 전환으로 이익을 취하는 것을 목표로합니다.
1-20주기별 JMA 평균선을 이용한 평균선 조합을 구성하여 시장 경향을 판단한다. 단기 평균선이 장기 평균선보다 높을 때 상승 경향으로 판단하고, 반대로, 하락 경향이다.
트렌드 전환점, 즉 짧은 평균선이 상단에서 긴 평균선 또는 하단에서 긴 평균선으로 뚫렸을 때, 격자 거래를 개시하십시오. 상승 추세에서 단계적으로 공표를 구축하십시오. 하향 추세에서 단계적으로 다중 공표를 구축하십시오.
K선 실체색으로 필터링 할 수 있으며, 적색 K선에서만 구매하고, 녹색 K선에서만 판매합니다. 그렇지 않으면 K선 색을 고려하지 않고, 트렌드 전환 시에만 거래합니다.
스톱로스는 스톱로스를 추적하거나, 마감 스톱로스를 수행한다. 마감 스톱로스는 전략이 실행되는 기간이 끝날 때 모든 포지션을 청산하는 것을 의미한다.
평균선 시스템을 사용하여 트렌드를 판단하여 시장의 긴 선의 전환점을 효과적으로 판단 할 수 있습니다.
격자 거래는 명확한 추세가 없을 때 흔들림 시장에서 이익을 얻을 수 있습니다. 동시에 위험을 제어하기 위해 스톱 스로드를 구성 할 수 있습니다.
JMA 평균선 파라미터는 사용자 정의 가능하며, 다른 주기용으로 최적화할 수 있으며, 유연성이 높다.
K선 엔터티 색으로 필터링 할 수 있습니다.
큰 변동이 있는 시장에서 큰 손실이 발생할 수 있습니다.
평균선 시스템 판단 오류 may lead to 거래 신호 오류 .
K선 필터링을 활성화하면 몇 가지 트레이딩 기회를 놓칠 수 있습니다.
그리드 간격이 너무 크면 충분한 수익을 얻을 수 없으며 너무 작으면 너무 많은 상위권과 비용 부담이 있습니다.
더 많은 조합의 변수를 테스트하여 다른 품종에 더 적합한 JMA 평균선 조합을 찾을 수 있다.
BOLL 채널, KD 등과 같은 다른 지표와 결합하여 필터링 할 수 있으며, 신호 품질을 향상시킵니다.
그리드 거래의 구성을 최적화할 수 있는 매개 변수로는 그리드 간격, 창고 수 등이 있다.
더 많은 유형의 손실을 고려할 수 있습니다. 예를 들어, 점프 중지, 추적 중지 등.
이 전략은 JMA 평균선 이론으로 추세를 판단하고, 전환점에서 격자 거래를 시작합니다. 시장의 중간에 긴 선의 움직임을 변환하여 이익을 얻을 수 있습니다. 매개 변수를 최적화하여 더 나은 전략 성능을 얻을 수 있습니다.
/*backtest
start: 2022-12-27 00:00:00
end: 2024-01-02 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//Noro
//2019
//@version=3
strategy(title = "Noro's Fishnet Strategy", shorttitle = "Fishnet str", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, pyramiding = 0)
//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(true, defval = true, title = "Short")
capital = input(100, defval = 100, minval = 1, maxval = 10000, title = "Lot")
usecf = input(false, defval = false, title = "Use Color-filter")
fromyear = input(1900, defval = 1900, minval = 1900, maxval = 2100, title = "From Year")
toyear = input(2100, defval = 2100, minval = 1900, maxval = 2100, title = "To Year")
frommonth = input(01, defval = 01, minval = 01, maxval = 12, title = "From Month")
tomonth = input(12, defval = 12, minval = 01, maxval = 12, title = "To Month")
fromday = input(01, defval = 01, minval = 01, maxval = 31, title = "From day")
today = input(31, defval = 31, minval = 01, maxval = 31, title = "To day")
//JMA
jmax(src, len) =>
beta = 0.45*(len-1)/(0.45*(len-1)+2)
alpha = pow(beta, 3)
L0=0.0, L1=0.0, L2=0.0, L3=0.0, L4=0.0
L0 := (1-alpha)*src + alpha*nz(L0[1])
L1 := (src - L0[0])*(1-beta) + beta*nz(L1[1])
L2 := L0[0] + L1[0]
L3 := (L2[0] - nz(L4[1]))*((1-alpha)*(1-alpha)) + (alpha*alpha)*nz(L3[1])
L4 := nz(L4[1]) + L3[0]
L4
ma01 = jmax(close, 10)
ma02 = jmax(close, 20)
ma03 = jmax(close, 30)
ma04 = jmax(close, 40)
ma05 = jmax(close, 50)
ma06 = jmax(close, 60)
ma07 = jmax(close, 70)
ma08 = jmax(close, 80)
ma09 = jmax(close, 90)
ma10 = jmax(close, 100)
ma11 = jmax(close, 110)
ma12 = jmax(close, 120)
ma13 = jmax(close, 130)
ma14 = jmax(close, 140)
ma15 = jmax(close, 150)
ma16 = jmax(close, 160)
ma17 = jmax(close, 170)
ma18 = jmax(close, 180)
ma19 = jmax(close, 190)
ma20 = jmax(close, 200)
trend = 0
trend := ma01 > ma20 ? 1 : ma01 < ma20 ? -1 : trend[1]
col = trend == 1 ? #00FF7F : #DC143C
plot(ma01, transp = 0, color = col)
plot(ma02, transp = 0, color = col)
plot(ma03, transp = 0, color = col)
plot(ma04, transp = 0, color = col)
plot(ma05, transp = 0, color = col)
plot(ma06, transp = 0, color = col)
plot(ma07, transp = 0, color = col)
plot(ma08, transp = 0, color = col)
plot(ma09, transp = 0, color = col)
plot(ma10, transp = 0, color = col)
plot(ma11, transp = 0, color = col)
plot(ma12, transp = 0, color = col)
plot(ma13, transp = 0, color = col)
plot(ma14, transp = 0, color = col)
plot(ma15, transp = 0, color = col)
plot(ma16, transp = 0, color = col)
plot(ma17, transp = 0, color = col)
plot(ma18, transp = 0, color = col)
plot(ma19, transp = 0, color = col)
plot(ma20, transp = 0, color = col)
//Trading
lot = 0.0
lot := strategy.equity / close * capital / 100
if trend == 1 and (close < open or usecf == false)
strategy.entry("Long", strategy.long, needlong ? lot : na)
if trend == -1 and (close > open or usecf == false)
strategy.entry("Short", strategy.short, needshort ? lot : na)