
이 정책은적응형 가격 영역 반전 거래 전략이 전략은 적응 가격 영역 (Adaptive Price Zone, APZ) 지표를 사용하여 가격 영역을 식별하고, 그 영역을 뚫면 거래 신호를 발생시킵니다. APZ 지표는 쌍 지수 이동 평균과 변동률 계산에 기초하여, 가격 영역의 경계를 밟습니다. 가격이 지역 경계를 뚫었을 때, 가격이 반전 될 수 있음을 나타냅니다.
이 전략은 주로 충격적인 상황, 특히 상환 상황에 적용된다. 그것은 하루 단선 거래 또는 자동 거래 시스템의 일부로 사용될 수 있으며, 모든 거래 가능한 자산에 적용된다. 전반적으로, 이 전략은 APZ 지표가 제공하는 보조 판단을 사용하여 가격 지역 경계 근처에서 역전 거래한다.
이 정책은 APZ 지표를 사용하여 가격 지역을 판단합니다. 구체적인 계산 방법은 다음과 같습니다.
이렇게 얻은 상하 궤도는 적응 가격 영역을 구성한다. 가격이 이 영역을 돌파하면 거래 신호가 발생한다. 돌파 신호 판단 규칙은 다음과 같다:
또한, 이 전략은 역거래 스위치 파라미터 reverse를 제공합니다. 역거래를 열고, 상술한 규칙과 달리 더 많은 코카이징을 한다.
종합적으로, 이 전략은 APZ 지표를 사용하여 적응된 가격 영역을 판단하고, 가격이 지역 경계를 돌파했을 때 반전 거래 신호를 발생시킵니다.
이 전략은 다음과 같은 장점을 가지고 있습니다.
이 전략에는 다음과 같은 몇 가지 측면에 초점을 맞춘 몇 가지 위험도 있습니다.
대응방법은 다음과 같습니다.
이 정책은 다음과 같은 부분에서 최적화될 수 있습니다.
이 전략은 전반적으로 단선 반전 전략에 속하며, APZ 지표를 통해 가격 영역을 포착하고, 영역 경계 근처에서 반전 거래를 한다. 전략의 장점은 거래 빈도가 높고, 더 많은 단선 기회를 포착할 수 있으며, 가격 영역을 조정할 수 있다. 그러나 특정 가짜 돌파의 위험이 있지만, 다른 도구를 사용하여 최적화를 해야 한다.
/*backtest
start: 2023-12-05 00:00:00
end: 2023-12-11 08:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 15/01/2020
//
// The adaptive price zone (APZ) is a volatility-based technical indicator that helps investors
// identify possible market turning points, which can be especially useful in a sideways-moving
// market. It was created by technical analyst Lee Leibfarth in the article “Identify the
// Turning Point: Trading With An Adaptive Price Zone,” which appeared in the September 2006 issue
// of the journal Technical Analysis of Stocks and Commodities.
// This indicator attempts to signal significant price movements by using a set of bands based on
// short-term, double-smoothed exponential moving averages that lag only slightly behind price changes.
// It can help short-term investors and day traders profit in volatile markets by signaling price
// reversal points, which can indicate potentially lucrative times to buy or sell. The APZ can be
// implemented as part of an automated trading system and can be applied to the charts of all tradeable assets.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="Adaptive Price Zone Backtest", shorttitle="APZ", overlay = true)
nPeriods = input(20, minval=1)
nBandPct = input(2, minval=0)
reverse = input(false, title="Trade reverse")
xHL = high - low
nP = ceil(sqrt(nPeriods))
xVal1 = ema(ema(close,nP), nP)
xVal2 = ema(ema(xHL,nP), nP)
UpBand = nBandPct * xVal2 + xVal1
DnBand = xVal1 - nBandPct * xVal2
pos = 0
pos := iff(low < DnBand , 1,
iff(high > UpBand, -1, pos[1]))
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 )