
이 전략은 쌍 기관 지표의 장점을 종합적으로 사용하고, 123 형태 판단 역전 신호를 채택하고, 양량 지수 판단 양량 에너지 신호를 보조하여, 짧은 선의 역전 상황을 포착합니다.
123 형태 판단 역전 신호
9일 스토흐 지표로 빠른 선과 느린 선을 구성
종결값이 2일 연속으로 하락하고 3일 종결값이 상승하고, Stoch 단축선이 50보다 낮으면 구매 신호가 발생한다.
2일 연속으로 상향, 3일 연속으로 하향, 그리고 50보다 높은 스톡 (Stoch) 스프릿 라인이 있을 때 팔기 신호가 발생한다.
정량 지수 판단량 신호
정량 지수 (PVI) 는 전날과 오늘의 거래량 변화를 비교하여 판단할 수 있다.
PVI 상에서 N일 이동 평균을 통과할 때, 설명량은 확대되어 구매 신호를 생성합니다.
PVI 아래의 N일 이동 평균을 통과할 때, 설명량은 축소될 수 있으며, 판매 신호를 생성한다.
이중 신호 통합 판단
종합적으로, 이 전략은 양 기관 지표의 장점을 최대한 활용하여, 단선 측정값 역전 기회를 효과적으로 식별할 수 있습니다.
123 형태 판단, 중요한 단선 반전 지점을 포착할 수 있다
PVI 양력 지표, 양 가격 협조를 판단하고, 가짜 돌파구를 피하기
Stoch 지표 파라미터가 최적화되어 대부분의 불안한 영역의 무효 신호를 필터링합니다.
이중신호 결합은 단일신호보다 신뢰도가 높다.
낮 내 판단을 사용하여, 야간 위험을 피하고, 단선 운영에 적합하다.
역전 실패 위험
지표의 실패 위험
이중 신호를 놓치는 위험
거래 빈도 위험
변수 최적화 공간이 넓다
Stop Loss 전략에 포함될 수 있습니다.
필터링 조건을 고려하세요.
쌍 신호 조합을 최적화
이 전략은 Stoch 지표와 PVI 지표의 조합을 통해 높은 신뢰도를 가진 짧은 선량 가격 역전 거래 전략을 형성한다. 단일 지표에 비해 더 높은 승률과 긍정적인 기대를 가지고 있다. 변수 최적화 및 위트 컨트롤 설정을 통해 샤프 비율을 더욱 확장 할 수 있다. 전체적으로 이 전략은 쌍 기관 지표의 장점을 활용하여 시장의 단기 역전 기회를 효과적으로 포착할 수 있으며 실험적으로 시각지대를 확인하는 최적화를 가치가 있다.
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 22/04/2021
// This is combo strategies for get a cumulative signal.
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
// The strategy sells at market, if close price is lower than the previous close price
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
// The theory behind the indexes is as follows: On days of increasing volume,
// you can expect prices to increase, and on days of decreasing volume, you can
// expect prices to decrease. This goes with the idea of the market being in-gear
// and out-of-gear. Both PVI and NVI work in similar fashions: Both are a running
// cumulative of values, which means you either keep adding or subtracting price
// rate of change each day to the previous day`s sum. In the case of PVI, if today`s
// volume is less than yesterday`s, don`t add anything; if today`s volume is greater,
// then add today`s price rate of change. For NVI, add today`s price rate of change
// only if today`s volume is less than yesterday`s.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
vFast = sma(stoch(close, high, low, Length), KSmoothing)
vSlow = sma(vFast, DLength)
pos = 0.0
pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0)))
pos
PVI(EMA_Len) =>
pos = 0.0
xROC = roc(close, 1)
nRes = 0.0
nResEMA = 0.0
nRes := iff(volume > volume[1], nz(nRes[1], 0) + xROC, nz(nRes[1], 0))
nResEMA := ema(nRes, EMA_Len)
pos := iff(nRes > nResEMA, 1,
iff(nRes < nResEMA, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Positive Volume Index", shorttitle="Combo", overlay = true)
line1 = input(true, "---- 123 Reversal ----")
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
line2 = input(true, "---- Positive Volume Index ----")
EMA_Len = input(255, minval=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posPVI = PVI(EMA_Len)
pos = iff(posReversal123 == 1 and posPVI == 1 , 1,
iff(posReversal123 == -1 and posPVI == -1, -1, 0))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1 , 1, pos))
if (possig == 1 )
strategy.entry("Long", strategy.long)
if (possig == -1 )
strategy.entry("Short", strategy.short)
if (possig == 0)
strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )