
기술 그래프 확인형 다중주기 운동 전략은 여러 종류의 고전적인 그래프 형태를 인식하고 동력을 확인하는 거래 시스템이다. 이 전략은 주로 시장에서 흔히 볼 수 있는 기술 형태를 식별하는 것, 예를 들어, 머리 어깨 윗부분, 머리 어깨 밑부분, 쌍 윗부분, 쌍 밑부분, 삼각형 (대칭, 상승, 하락), 깃발 모양, 모양 등으로, 형태가 돌파할 때 입문 신호를 확인한다. 이 전략은 ATR 지표를 교묘하게 결합하여 동적인 중지 손실 및 수준을 설정하고, 위험을 효과적으로 제어하고 수익을 잠금한다. 이 전략은 시장의 다양한 전환점을 포착할 수 있을 뿐만 아니라, 형태가 돌파되는 것을 확인하는 메커니즘을 통해 거래 신호의 신뢰성을 높이고, 가짜 돌파의 위험을 줄인다.
이 전략의 핵심은 일련의 조건 함수를 통해 다양한 그래프 형태를 식별하고 가격이 중요한 수준을 넘어서면 거래 신호를 확인하는 것입니다.
머리 어깨 위/머리 어깨 아래 식별: 연속적인 고점/저점의 상대적 위치 관계를 비교하여, 머리 어깨 형태의 특징 구조를 식별한다. 높점 1이 높점 0, 2, 3, 4보다 크고, 높점 0이 높점 2와 3보다 작을 때, 머리 어깨 형태가 형성된다.
이중 상단/이중 하단 식별: 고위점/저위점 연속을 분석하여 양극점과 양극점 형태를 식별한다. 양극점 형태에서는 고위점 1이 주변 고위점보다 크며, 양극점 형태에서는 저위점 1이 주변 저위점보다 작아야 한다.
삼각형 모양 인식:
깃발 모양/삼각형 깃발 식별: 고점과 저점의 연속적인 변화 패턴을 분석하여 식별한다.
거래 신호 확인:
위험 관리:
체계화된 형상 인식: 전략은 명확한 조건 함수를 정의하여 여러 가지 클래식 그래프 형태를 자동으로 인식하여 주관적 판단으로 인한 편차를 감소시킵니다.
신호 확인 메커니즘전략은 차트 형태를 인식하는 것뿐만 아니라, 가격의 중요한 수준을 통과하는 것을 확인하는 것으로, 가짜 돌파구를 초래하는 위험을 줄입니다.
동적 위험 관리: ATR 지표를 사용하여 동적 중지 및 중지 수준을 설정하여 시장의 변동성에 대한 위험을 조절합니다.
다형적 커버전략: 전략은 여러 클래식 차트 형식을 포함하고, 거래 기회를 증가시키고, 다양한 시장 환경에 적응한다.
시각화: 전략은 plottshape 함수를 통해 그래프 상에 직관적으로 인식 된 다양한 형태를 표시하여 거래자가 전략 논리를 이해하고 검증하는 데 도움이됩니다.
위험과 이익이 합리적일 수 있습니다.이 전략은 3배의 ATR을 스톱으로, 1.5배의 ATR을 스톱으로, 리스크 수익률은 1:2로, 효과적인 리스크 관리 원칙에 부합한다.
형상 인식 정확도가 제한되어 있습니다.: 현재 형태 인식 알고리즘은 상대적으로 단순화되어 있으며, 특히 시장 소음이 큰 경우, 잘못된 판단이나 미처 판단이 발생할 수 있습니다.
매개변수 민감도ATR 주기의 설정과 중지, 중지의 배수의 설정은 전략의 성능에 중요한 영향을 미치며, 다른 시장과 시간 프레임에 따라 최적화가 필요합니다.
가짜 침입 위험하지만, 시장에서 가짜 브레이크가 발생하여 불필요한 거래 손실이 발생할 수 있습니다.
형태 반복 인식: 현재 코드의 일부 형태 인식 함수의 논리는 비슷하다 (예를 들어, 머리 어깨 톱과 쌍 톱), 동일한 시장 상황에서 여러 신호를 유발하여 거래 빈도와 비용을 증가시킬 수 있다.
트렌드 필터 부족이 전략은 전체 시장의 경향 방향을 고려하지 않고, 강한 추세에서 역전 신호를 생성하여 역전 거래로 이어질 수 있다.
위험 회피 방법:
형상 인식 알고리즘 개선:
수량 확인:
트렌드 필터:
최적화된 위험 관리:
필터링 시간을 추가합니다.:
다중 시간 프레임 분석:
이러한 최적화 방향은 다음과 같은 이유로 전략의 안정성과 효율성을 크게 향상시킬 것입니다.
기술 그래프 확인형 다중 주기 동적 전략은 체계화 된, 규칙이 명확한 거래 시스템으로, 여러 가지 고전적인 차트 형태를 식별하고 브레이크 확인과 결합하여 거래 신호를 생성한다. 전략은 ATR 지수를 사용하여 동적 위험 관리를 수행하고, 합리적인 위험 수익률을 설정한다. 현재의 버전의 형태 식별 알고리즘은 상대적으로 단순화되었지만, 추가적인 최적화를 위해 좋은 토대를 제공합니다. 거래량 확인, 트렌드 필터링, 위험 관리 및 다중 시간 프레임 분석을 최적화하는 등의 개선 사항을 추가함으로써, 이 전략은 강력하고 안정적인 거래 시스템이 될 잠재력을 가지고 있습니다. 이러한 기술 형태에 기반한 전략은 특히 시장의 변동성과 가격 행동이 명백한 상품에 적합하며, 거래 시스템이 시장의 전환점과 돌파구를 포착하는 데 도움이 될 수 있습니다.
/*backtest
start: 2024-02-29 00:00:00
end: 2025-02-26 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Chart Pattern Strategy - Full Set", overlay=true)
// ATR settings for stop loss and take profit
atrLength = input.int(14, title="ATR Length")
atrValue = ta.atr(atrLength)
stopLoss = atrValue * 1.5 // Stop loss 1.5 ATR
takeProfit = atrValue * 3 // Take profit 3 ATR
// Head and Shoulders Detection
isHeadAndShoulders() =>
high[1] > high[2] and high[1] > high[0] and high[1] > high[3] and high[1] > high[4] and high[0] < high[2] and high[0] < high[3]
// Double Top Detection
isDoubleTop() =>
high[1] > high[2] and high[1] > high[0] and high[1] > high[3] and high[1] > high[4] and high[0] < high[2] and high[0] < high[3]
// Double Bottom Detection
isDoubleBottom() =>
low[1] < low[2] and low[1] < low[0] and low[1] < low[3] and low[1] < low[4] and low[0] > low[2] and low[0] > low[3]
// Symmetrical Triangle Detection
isSymmetricalTriangle() =>
high[2] > high[1] and low[2] < low[1] and high[3] < high[2] and low[3] > low[2]
// Ascending Triangle Detection (Bullish)
isAscendingTriangle() =>
high[2] < high[1] and low[2] > low[1] and high[3] < high[2] and low[3] > low[2]
// Descending Triangle Detection (Bearish)
isDescendingTriangle() =>
high[2] > high[1] and low[2] < low[1] and high[3] < high[2] and low[3] < low[2]
// Flags/Pennants Detection
isFlagPattern() =>
high[1] < high[0] and low[1] > low[0] and high[2] < high[1] and low[2] < low[1]
// Entry Logic (Confirmation based on Breakouts)
longSignal = (isHeadAndShoulders() or isDoubleBottom() or isAscendingTriangle()) and close > high[1]
shortSignal = (isDoubleTop() or isDescendingTriangle() or isFlagPattern()) and close < low[1]
// Plotting Chart Patterns on the Chart
plotshape(isHeadAndShoulders(), title="Head and Shoulders", location=location.abovebar, color=color.red, style=shape.labelup, text="HS")
plotshape(isDoubleTop(), title="Double Top", location=location.abovebar, color=color.red, style=shape.labelup, text="DT")
plotshape(isDoubleBottom(), title="Double Bottom", location=location.belowbar, color=color.green, style=shape.labeldown, text="DB")
plotshape(isSymmetricalTriangle(), title="Symmetrical Triangle", location=location.top, color=color.blue, style=shape.triangledown, text="ST")
plotshape(isAscendingTriangle(), title="Ascending Triangle", location=location.belowbar, color=color.green, style=shape.labelup, text="AT")
plotshape(isDescendingTriangle(), title="Descending Triangle", location=location.abovebar, color=color.red, style=shape.labeldown, text="DT")
plotshape(isFlagPattern(), title="Flag Pattern", location=location.abovebar, color=color.orange, style=shape.triangledown, text="Flag")
// Executing Trades based on Patterns
if (longSignal)
strategy.entry("Buy", strategy.long)
strategy.exit("Take Profit/Stop Loss", from_entry="Buy", stop=close - stopLoss, limit=close + takeProfit)
if (shortSignal)
strategy.entry("Sell", strategy.short)
strategy.exit("Take Profit/Stop Loss", from_entry="Sell", stop=close + stopLoss, limit=close - takeProfit)