
데 동력 진동기 ((CMO) 를 기반으로 한 평균 회귀 거래 전략은 일정 기간 동안의 가격 변화의 동력을 계산하여 과매매 지역을 식별하는 기술 분석 전략이다. 이 전략은 주로 자산 가격의 동적 변화를 모니터링하여 가격의 극단적 오차가 발생할 때 거래하여 가격 평균 회귀의 기회를 잡는다. 이 전략은 9 일 주기의 CMO 지표를 핵심 신호로 사용하여 CMO가 50보다 낮을 때 더 많이 입점하고 CMO가 50보다 높을 때 또는 5 일 이상의 입점 기간 동안 입점을 유지하면 평평합니다.
전략의 핵심은 CMO 지표의 계산과 적용이다. CMO는 일정 기간 동안 상승과 하락의 차등과 총액의 비율을 계산하여 동력을 측정한다. 구체적인 계산 공식은 다음과 같다: CMO = 100 × (상승 및 하락) / (상승 및 하락)
전통적인 RSI와 달리, CMO는 분자에서 동시다발적으로 상승과 하락의 데이터를 사용하여 더 대칭적인 동력을 측정한다. 전략은 CMO가 50보다 낮으면 시장이 과매매되고 가격이 다시 상승할 것으로 예상되며, 따라서 더 많은 포지션을 열는다. CMO가 50 이상 또는 5 일 이상 포지션을 열면 전략은 평형 포지션 정지 또는 손실을 막는다.
이 전략은 CMO 지표를 통해 시장의 과매매 기회를 포착하고, 고정 시간 상쇄와 결합하여 안정적인 평균값 회귀 거래 시스템을 구축한다. 전략 논리는 명확하고, 위험 관리가 합리적이며, 좋은 실용적 가치를 가지고 있다. 변수를 추가적으로 최적화하고 보조 지표를 추가하면 전략의 안정성과 수익성을 추가적으로 향상시킬 수 있다.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-09 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Chande Momentum Oscillator Strategy", overlay=false)
// Input for the CMO period
cmoPeriod = input.int(9, minval=1, title="CMO Period")
// Calculate price changes
priceChange = ta.change(close)
// Separate positive and negative changes
up = priceChange > 0 ? priceChange : 0
down = priceChange < 0 ? -priceChange : 0
// Calculate the sum of ups and downs using a rolling window
sumUp = ta.sma(up, cmoPeriod) * cmoPeriod
sumDown = ta.sma(down, cmoPeriod) * cmoPeriod
// Calculate the Chande Momentum Oscillator (CMO)
cmo = 100 * (sumUp - sumDown) / (sumUp + sumDown)
// Define the entry and exit conditions
buyCondition = cmo < -50
sellCondition1 = cmo > 50
sellCondition2 = ta.barssince(buyCondition) >= 5
// Track if we are in a long position
var bool inTrade = false
if (buyCondition and not inTrade)
strategy.entry("Long", strategy.long)
inTrade := true
if (sellCondition1 or sellCondition2)
strategy.close("Long")
inTrade := false
// Plot the Chande Momentum Oscillator
plot(cmo, title="Chande Momentum Oscillator", color=color.blue)
hline(-50, "Buy Threshold", color=color.green)
hline(50, "Sell Threshold", color=color.red)