
이 전략은 기술 분석의 고전적인 평행선 교차와 K선 형태 인식을 결합한 지능형 거래 시스템이다. 전략은 K선의 상하의 선과 실체와의 관계를 분석하여 쌍평행선 교차 신호를 결합하여 시장 추세 전환점을 정확하게 포착한다. 시스템은 가격 움직임을 관찰하는 것뿐만 아니라 평균 파장을 계산하여 거래 매개 변수를 동적으로 조정하여 전략의 적합성을 향상시킨다.
이 전략의 핵심 논리는 크게 두 가지로 나뉘어져 있습니다.
K선 형태 인식 모듈은 위아래 그림선과 개체의 비율 관계를 계산하여 잠재적인 역전 신호를 식별한다. 시스템은 조정 가능한 그림선 곱하기 파라미터 (wickMultiplier) 와 개체 비율 파라미터 (bodyPercentage) 를 신호 품질을 최적화하기 위해 설정한다. K선에서 조건에 부합하는 긴 위아래 그림선 또는 긴 아래 그림선이 나타나면, 시스템은 그에 따른 더하거나 공백 신호를 낸다.
쌍평선 교차 시스템은 14주기 및 28주기 간단한 이동 평균 ((SMA) 을 트렌드 지표로 사용합니다. 단기평선이 장기평선을 상향으로 가로질렀을 때, 시스템은 다중 신호를 생성합니다. 단기평선이 장기평선을 하향으로 가로질렀을 때, 시스템은 공백 신호를 생성합니다.
이 전략은 K선 형태 인식과 균등선 교차 시스템을 결합하여 비교적 완전한 거래 의사 결정 프레임워크를 구축한다. 이 전략의 장점은 엄격한 신호 필터링 메커니즘과 유연한 파라미터 조정 능력이지만, 동시에 파라미터 최적화 및 시장 환경 적응성의 문제에 주의를 기울여야 한다. 지속적인 최적화 및 개선으로 이 전략은 다양한 시장 환경에서 안정적인 성능을 유지할 수 있을 것으로 보인다.
/*backtest
start: 2024-10-28 00:00:00
end: 2024-11-27 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5 indicator("Wick Reversal Setup", overlay=true)
// Input parameters
wickMultiplier = input.float(3.5, title="Wick Multiplier", minval=0.5, maxval=20)
bodyPercentage = input.float(0.25, title="Body Percentage", minval=0.1, maxval=1.0)
// Calculate the average range over 50 periods
avgRange = ta.sma(high - low, 50)
// Define the lengths of wicks and bodies
bodyLength = math.abs(close - open)
upperWickLength = high - math.max(close, open)
lowerWickLength = math.min(close, open) - low
totalRange = high - low
// Long signal conditions
longSignal = (close > open and upperWickLength >= bodyLength * wickMultiplier and upperWickLength <= totalRange * bodyPercentage) or
(close < open and lowerWickLength >= bodyLength * wickMultiplier and upperWickLength <= totalRange * bodyPercentage) or
(close == open and close != high and upperWickLength >= bodyLength * wickMultiplier and upperWickLength <= totalRange * bodyPercentage) or
(open == high and close == high and totalRange >= avgRange)
// Short signal conditions
shortSignal = (close < open and (high - open) >= bodyLength * wickMultiplier and lowerWickLength <= totalRange * bodyPercentage) or
(close > open and (high - close) >= bodyLength * wickMultiplier and lowerWickLength <= totalRange * bodyPercentage) or
(close == open and close != low and lowerWickLength >= bodyLength * wickMultiplier and lowerWickLength <= totalRange * bodyPercentage) or
(open == low and close == low and totalRange >= avgRange)
// Plot signals
plotshape(series=longSignal, location=location.belowbar, color=color.green, style=shape.labelup, text="Long")
plotshape(series=shortSignal, location=location.abovebar, color=color.red, style=shape.labeldown, text="Short")
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Sahaj_Beriwal
//@version=5
strategy("My strategy", overlay=true, margin_long=100, margin_short=100)
longCondition = ta.crossover(ta.sma(close, 14), ta.sma(close, 28))
if (longCondition)
strategy.entry("L", strategy.long)
shortCondition = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28))
if (shortCondition)
strategy.entry("S", strategy.short)