
동력 상품 선택 지수 (Commodity Selection Index, CSI) 전략은 시장 동력을 추적하는 단선 거래 전략이다. 그것은 상품의 경향성과 변동성을 계산하여 강력한 동력을 가진 상품을 식별하여 거래한다. 이 전략은 웰스 와일더 (Welles Wilder) 가 그의 책상 신기술 분석 거래 시스템 개념에 제시했다.
이 전략의 핵심 지표는 상품의 추세성과 변동성을 종합적으로 고려하는 CSI 지수이다. 구체적인 계산 방법은 다음과 같다:
CSI = K × ATR × ((ADX + ADX의 n 일간 평균선) /2)
그 중, K는 축소 계수이며, ATR는 시장의 변동성을 측정하는 평균 실제 변동량을 나타냅니다. ADX는 시장의 경향성을 반영하는 평균 방향 지수를 나타냅니다.
각 상품의 CSI 지수값을 계산하고, 그 n일 간단한 이동 평균선과 비교하여, CSI가 이동 평균선보다 높을 때 구매 신호를 발생시키고, CSI가 이동 평균선보다 낮을 때 판매 신호를 발생시킨다.
이 전략은 CSI 지수가 높은 상품을 선택하여 거래한다. 이러한 상품은 강한 경향성과 변동성이 있기 때문에 단기간에 더 큰 수익 잠재력을 얻을 수 있다.
이 전략에는 다음과 같은 장점이 있습니다.
이 전략에는 몇 가지 위험도 있습니다.
위험을 통제하기 위해, 합리적으로 스톱로스 위치를 설정하고, 단일 포지션 크기를 제어하고, 다른 시장 환경에 맞게 파라미터를 적절히 조정해야 한다.
이 전략은 다음과 같은 부분에서 최적화될 수 있습니다.
동량 상품 선택 지수 전략은 시장에서 유행성이 강하고 변동성이 큰 상품을 포착하여 간단한 빠른 단선 거래를 실현한다. 이러한 동량을 전문적으로 추적하는 방법은 신호를 명확하게하고 자동화를 쉽게 구현한다. 물론 위험을 통제하는 데 주의를 기울이고 시장 환경에 적응하기 위해 지속적으로 개선해야 한다.
/*backtest
start: 2023-10-28 00:00:00
end: 2023-11-27 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 20/03/2019
// The Commodity Selection Index ("CSI") is a momentum indicator. It was
// developed by Welles Wilder and is presented in his book New Concepts in
// Technical Trading Systems. The name of the index reflects its primary purpose.
// That is, to help select commodities suitable for short-term trading.
// A high CSI rating indicates that the commodity has strong trending and volatility
// characteristics. The trending characteristics are brought out by the Directional
// Movement factor in the calculation--the volatility characteristic by the Average
// True Range factor.
// Wilder's approach is to trade commodities with high CSI values (relative to other
// commodities). Because these commodities are highly volatile, they have the potential
// to make the "most money in the shortest period of time." High CSI values imply
// trending characteristics which make it easier to trade the security.
// The Commodity Selection Index is designed for short-term traders who can handle
// the risks associated with highly volatile markets.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
fADX(Len) =>
up = change(high)
down = -change(low)
trur = rma(tr, Len)
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, Len) / trur)
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, Len) / trur)
sum = plus + minus
100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), Len)
strategy(title="Commodity Selection Index Backtest", shorttitle="CSI Backtest")
PointValue = input(50)
Margin = input(3000)
Commission = input(10)
Length = input(14)
reverse = input(false, title="Trade reverse")
K = 100 * ((PointValue / sqrt(Margin) / (150 + Commission)))
xATR = atr(Length)
xADX = fADX(Length)
nADXR = (xADX + xADX[Length]) * 0.5
xCSI = K * xATR * nADXR
xMACSI = sma(xCSI, Length)
pos = 0.0
pos := iff(xCSI < xMACSI, 1,
iff(xCSI > xMACSI, -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(xCSI, color=green, title="CSI")
plot(xMACSI, color=red, title="CSI SMA")