부피에 의한 오시슬레이션 양자 전략

저자:차오장, 날짜: 2023-12-05 11:35:50
태그:

이것은 클링거 볼륨 오시레이터 (Klinger Volume Oscillator) 를 기반으로 한 거래 전략이다. 가격 변동 중에 구매 및 판매 세력의 변화를 포착하여 시장 트렌드의 전환점을 식별합니다. 장점은 단기 및 장기 분석에 대한 민감성과 정확성입니다. 그러나 몇 가지 위험이 주목되어야합니다.

전략 논리

이 전략은 다음과 같은 가정에 기반합니다.

  1. 가격 범위 (고등-하위) 는 가격 변동의 폭을 반영하고, 부피는 가격 변동의 원동력입니다.
  2. 오늘의 높은 + 낮은 + 닫는 합이 어제보다 크다면, 그것은 구매력과 축적의 강화를 나타냅니다. 반대는 분배를 나타냅니다.
  3. 부피의 지속적인 변화는 구매자와 판매자의 힘의 변화를 반영합니다.

이론에 기초하여 전략은 클링거 볼륨 오시레이터를 계산하여 오늘날의 종점 가격과 어제의 종점 가격의 합과 볼륨의 변화와 결합한 관계를 비교합니다. 지표가 이동 평균선을 넘을 때 길게 이동하고, 그 아래에 넘을 때 짧게 이동합니다.

구체적으로 세 가지 주요 지표가 포함됩니다.

  1. x트렌드: 하루 간 가격 합의 비교를 기반으로 가격 트렌드의 힘을 반영합니다.
  2. xFast: x트렌드의 빠른 EMA, 기간은 34입니다.
  3. xSlow: x트렌드의 느린 EMA, 기간은 55입니다.

이차 xKVO는 거래 지표로 계산됩니다. 13 일간의 EMA xTrigger를 넘어서면 장거리, 그 아래에 넘어가면 단거리입니다.

장점

가장 큰 장점은 단기 및 장기 분석을 동시에 수행 할 수 있다는 것입니다. 빠른 및 느린 EMA 설정으로 단기 변동을 감지 할 수 있으며 시장 소음을 필터하고 대부분의 가격 기반 지표가 어려움을 겪는 장기 추세를 파악 할 수 있습니다.

또한, 복잡한 수학 없이 가격 및 부피 데이터에 순전히 기반을 두고 있습니다. 이것은 실제 거래 응용 프로그램에 매우 효율적입니다.

위험 과 해결책

주요 위험은 잘못된 브레이크오프를 구별하는 능력이 약하기 때문입니다. 단기 가격 조정으로 잘못된 장기 신호가 생성 될 수 있습니다. 추세를 결정하는 데 다른 요소가 고려되어야합니다.

또한, 전략은 매개 변수 조정에 민감합니다. 최상의 성능을 찾기 위해 EMA와 트리거 라인에 최적화가 필요합니다.

전략 최적화

위험에 따라 전략을 더 최적화 할 수있는 몇 가지 측면:

  1. 스톱 손실 메커니즘을 추가합니다. 어떤 비율의 후퇴로 종료하면 소음 간섭을 줄입니다.

  2. MACD와 같은 지표로 트렌드 필터링을 추가하여 시장에서 방향 오류를 피합니다.

  3. 안정성을 높이기 위해 역 테스트를 통해 매개 변수 세트를 최적화합니다.

  4. 자본 관리 최적화, 예를 들어 스톱 로스/익스피스 레벨에 기반한 동적 포지션 사이징.

결론

전반적으로, 전략은 민감성과 안정성을 위해 가격량과 양량을 비교하여 시장 힘의 변화를 포착합니다. 최적화된 매개 변수와 트렌드 검증을 고려하면 잘 수행 할 수 있지만, 부피 지표의 고유 한 제한은 여전히 거래자에게 위험을 초래할 수 있습니다.

[/trans]


/*backtest
start: 2022-11-28 00:00:00
end: 2023-12-04 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 30/08/2017
// The Klinger Oscillator (KO) was developed by Stephen J. Klinger. Learning 
// from prior research on volume by such well-known technicians as Joseph Granville, 
// Larry Williams, and Marc Chaikin, Mr. Klinger set out to develop a volume-based 
// indicator to help in both short- and long-term analysis.
// The KO was developed with two seemingly opposite goals in mind: to be sensitive 
// enough to signal short-term tops and bottoms, yet accurate enough to reflect the 
// long-term flow of money into and out of a security.
// The KO is based on the following tenets:
// Price range (i.e. High - Low) is a measure of movement and volume is the force behind 
// the movement. The sum of High + Low + Close defines a trend. Accumulation occurs when 
// today's sum is greater than the previous day's. Conversely, distribution occurs when 
// today's sum is less than the previous day's. When the sums are equal, the existing trend 
// is maintained.
// Volume produces continuous intra-day changes in price reflecting buying and selling pressure. 
// The KO quantifies the difference between the number of shares being accumulated and distributed 
// each day as "volume force". A strong, rising volume force should accompany an uptrend and then 
// gradually contract over time during the latter stages of the uptrend and the early stages of 
// the following downtrend. This should be followed by a rising volume force reflecting some 
// accumulation before a bottom develops.
//
// You can change long to short in the Input Settings
// Please, use it only for learning or paper trading. 
////////////////////////////////////////////////////////////
strategy(title="Klinger Volume Oscillator (KVO)", shorttitle="KVO")
TrigLen = input(13, minval=1)
FastX = input(34, minval=1)
SlowX = input(55, minval=1)
reverse = input(false, title="Trade reverse")
hline(0, color=gray, linestyle=line)
xTrend = iff(hlc3 > hlc3[1], volume * 100, -volume * 100)
xFast = ema(xTrend, FastX)
xSlow = ema(xTrend, SlowX)
xKVO = xFast - xSlow
xTrigger = ema(xKVO, TrigLen)
pos = iff(xKVO > xTrigger, 1,
	   iff(xKVO < xTrigger, -1, nz(pos[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)	   	    
barcolor(possig == -1 ? red: possig == 1 ? green : blue )  
plot(xKVO, color=blue, title="KVO")
plot(xTrigger, color=red, title="Trigger")


더 많은