
이 전략은 유명한 거래 전문가인 빌 윌리엄스가 설계한 윌리엄스 지표의 정교한 진동기 (Awesome Oscillator, 줄여서 AO) 에 기반하여, 다른 주기에서 평균값의 차이를 계산하여 진단 트렌드 및 시장 동력의 진동 지표를 형성하고, 구매 및 판매를 안내하기 위해 적절한 거래 신호를 설계합니다.
이 전략의 핵심 지표는 정교한 진동기 (AO) 이며, 계산 공식은 다음과 같다. AO = SMA ((중간 가격, 5일) - SMA ((중간 가격, 34일) 그 중, 중간값은 ((최고 가격 + 최저 가격) / 2 ᄂ으로 정의된다. 이 공식은 두 개의 다른 주기에서 중간값 SMA에서 가격 운동 정보를 추출한다. 빠른 라인 SMA ((5 일) 과 느린 라인 SMA ((34 일) 의 차이를 계산하여, 빠른 라인이 느린 라인보다 높을 때 구매 신호를 발산하고, 빠른 라인이 느린 라인보다 낮을 때 판매 신호를 발산한다.
이 전략에서, 오차 신호를 필러하기 위해, AO에 대해 5 일 SMA 작업이 수행되기도 한다. 그리고 반전 모드를 설정하여, 긴/단한 신호를 반전하여 다른 거래 방향을 달성 할 수 있다. AO가 이전보다 높으면 구매 기회로 간주되어 파란색 기둥으로 표시되며, AO가 이전보다 높지 않으면 판매 기회로 간주되어 빨간 기둥으로 표시된다.
이 전략은 중저가 느린 SMA 구조 설계의 정교한 흔들기를 활용하여 시장 동력의 변화를 진단하고, 거래 신호는 직관적입니다. 그러나 흔들림과 반전의 영향을 받을 수 있으며, 안정성을 높이기 위해 매개 변수와 중지 전략을 적절하게 조정해야합니다. 위험을 제어하는 전제 하에서 이 전략은 간단하고 실용적이며, 추가 최적화 적용 가치가 있습니다.
/*backtest
start: 2022-12-11 00:00:00
end: 2023-12-17 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 28/12/2016
// This indicator plots the oscillator as a histogram where blue denotes
// periods suited for buying and red . for selling. If the current value
// of AO (Awesome Oscillator) is above previous, the period is considered
// suited for buying and the period is marked blue. If the AO value is not
// above previous, the period is considered suited for selling and the
// indicator marks it as 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 (AC)")
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
xSMA_hl2 = sma(xSMA1_SMA2, nLengthFast)
nRes = xSMA1_SMA2 - xSMA_hl2
cClr = nRes > nRes[1] ? blue : red
pos = iff(nRes > nRes[1], 1,
iff(nRes < nRes[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(nRes, style=histogram, linewidth=1, color=cClr)