빌 윌리엄스 멋진 오시레이터 거래 전략

저자:차오장, 날짜: 2023-12-19 15:27:15
태그:

img

전반적인 설명

빌 윌리엄스 어저블 오시일레이터 거래 전략 (Bill Williams Awesome Oscillator trading strategy) 은 빌 윌리엄스가 그의 책?? 뉴 트레이딩 디멘션?? 에서 제안한 권고에 기초하여 개발된 양적 거래 전략이다. 이 전략은 오시일레이터 지표를 구성하고 히스토그램의 색상 변화를 통해 거래 신호를 생성하여 오시일레이터 지표를 표시하기 위해 빠르고 느린 이동 평균의 차이를 사용합니다.

전략 논리

이 전략의 핵심 지표는 멋진 오시일레이터 (AO) 입니다. 그 공식은:

AO = SMA (중간 가격, 빠른 길) - SMA (중간 가격, 느린 길)

Median Price는 높은 가격과 낮은 가격의 평균을 취하고, Fast Length는 빠른 이동 평균의 기간을 나타냅니다. Slow Length는 느린 이동 평균의 기간을 나타냅니다.

AO 지표는 빠른 이동 평균과 느린 이동 평균의 차이를 통해 다른 시간 스케일에서 시장 가격의 변동을 반영합니다. 빠른 이동 평균이 느린 이동 평균보다 높을 때, 단기 가격 동력이 장기 추진력보다 강하다는 신호를 주고 구매 신호를 제공합니다. 빠른 이동 평균이 느린 추진력보다 낮을 때, 단기 가격 동력이 장기 추진력보다 약하다는 신호를 주고 판매 신호를 제공합니다.

이 전략은 현재 AO 값과 이전 기간 사이의 차이를 사용하여 현재 기간의 긴/단지 입장을 결정합니다. 히스토그램에서 그들을 식별하기 위해 다른 색상이 사용됩니다. 현재 AO가 이전 기간보다 크면 파란색으로 표시되며, 현재 AO가 이전 기간보다 작으면 빨간색으로 표시됩니다.

이점 분석

이 전략의 주요 장점은 다음과 같습니다.

  1. 이동 평균의 차이를 사용하여 지표를 구성하면 가격 데이터를 부드럽게하고 시장 소음을 필터하는 데 도움이 됩니다.
  2. 빠른 이동 평균과 느린 이동 평균의 차이는 다른 시간 지평에 걸쳐 가격 트렌드 변화를 포착합니다.
  3. 히스토그램은 거래 방향을 쉽게 판단하기 위해 장/단 상태를 시각적으로 나타냅니다.
  4. 다른 거래 도구에 맞춰 지표 감수성을 조정할 수 있는 매개 변수

위험 분석

이 전략에는 몇 가지 위험도 있습니다.

  1. 부적절한 매개 변수 설정으로 인해 거래 신호가 빈번하게 발생하여 거래가 과도하게 증가할 수 있습니다.
  2. AO 지표의 비교적 복잡한 구조는 매개 변수가 제대로 설정되지 않으면 거래 기회를 놓칠 수 있습니다.
  3. 신호는 다른 지표로부터 검증되지 않은 단일 소스에서 나옵니다.

위의 위험을 완화하기 위해 매개 변수를 최적화하고 지표 구조를 조정하고 다른 지표를 검증에 사용할 수 있습니다.

최적화 방향

이 전략을 최적화 할 수있는 몇 가지 방향은 다음과 같습니다.

  1. 가장 좋은 매개 변수 조합을 찾기 위해 빠르고 느린 이동 평균 길이를 최적화합니다.
  2. AO 지표를 구성하기 위해 다른 종류의 이동 평균을 시도하십시오. 예를 들어 EMA, LWMA 등;
  3. 트렌드를 따르는 지표와 오스실레이션 지표를 포함하여 AO를 개선합니다.
  4. 거래당 손실을 제어하기 위해 스톱 로스 메커니즘을 추가합니다.

결론

결론적으로, 빌 윌리엄스 멋진 오시일레이터 거래 전략은 빠른 이동 평균과 느린 이동 평균의 차이를 사용하여 가격 트렌드 변화를 판단하여 단기 역전 기회를 효과적으로 식별합니다. 이 전략은 명확한 개념을 가지고 있으며 구현하기가 쉽습니다. 매개 변수 최적화 및 다른 지표의 통합으로 좋은 거래 성과를 달성 할 가능성이 있습니다.


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

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 29/12/2016
//    This indicator is based on Bill Williams` recommendations from his book 
//    "New Trading Dimensions". We recommend this book to you as most useful reading.
//    The wisdom, technical expertise, and skillful teaching style of Williams make 
//    it a truly revolutionary-level source. A must-have new book for stock and 
//    commodity traders.
//    The 1st 2 chapters are somewhat of ramble where the author describes the 
//    "metaphysics" of trading. Still some good ideas are offered. The book references 
//    chaos theory, and leaves it up to the reader to believe whether "supercomputers" 
//    were used in formulating the various trading methods (the author wants to come across 
//    as an applied mathemetician, but he sure looks like a stock trader). There isn't any 
//    obvious connection with Chaos Theory - despite of the weak link between the title and 
//    content, the trading methodologies do work. Most readers think the author's systems to 
//    be a perfect filter and trigger for a short term trading system. He states a goal of 
//    10%/month, but when these filters & axioms are correctly combined with a good momentum 
//    system, much more is a probable result.
//    There's better written & more informative books out there for less money, but this author 
//    does have the "Holy Grail" of stock trading. A set of filters, axioms, and methods which are 
//    the "missing link" for any trading system which is based upon conventional indicators.
//    This indicator plots the oscillator as a histogram where periods fit for buying are marked 
//    as blue, and periods fit for selling as red. If the current value of AC (Awesome Oscillator) 
//    is over the previous, the period is deemed fit for buying and the indicator is marked blue. 
//    If the AC values is not over the previous, the period is deemed fir for selling and the indicator 
//    is marked red.
//
// You can change long to short in the Input Settings
// Please, use it only for learning or paper trading. Do not for real trading.
////////////////////////////////////////////////////////////
strategy("Bill Williams. Awesome Oscillator (AO)")
nLengthSlow = input(34, minval=1, title="Length Slow")
nLengthFast = input(5, minval=1, title="Length Fast")
reverse = input(false, title="Trade reverse")
xSMA1_hl2 = sma(hl2, nLengthFast)
xSMA2_hl2 = sma(hl2, nLengthSlow)
xSMA1_SMA2 = xSMA1_hl2 - xSMA2_hl2
cClr = xSMA1_SMA2 > xSMA1_SMA2[1] ? blue : red
pos = iff(xSMA1_SMA2 > xSMA1_SMA2[1], 1,
	   iff(xSMA1_SMA2 < xSMA1_SMA2[1], -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(xSMA1_SMA2, style=histogram, linewidth=1, color=cClr)

더 많은