3가지 슈퍼트렌드 전략


생성 날짜: 2023-09-15 15:59:15 마지막으로 수정됨: 2023-09-15 15:59:15
복사: 0 클릭수: 1343
avatar of ChaoZhang ChaoZhang
1
집중하다
1617
수행원

슈퍼트렌드 전략 원해석

슈퍼트렌드 전략 (Supertrend strategy) 은 트렌드 추적 전략으로, 평균 실제 파장 (ATR) 을 계산하고 슈퍼트렌드 라인을 그리는 것으로 트렌드 방향을 판단한다. 이 전략은 세 개의 다른 파라미터를 사용하여 세 개의 슈퍼트렌드 라인을 그리며, 가격이 슈퍼트렌드 라인을 돌파했을 때 거래 신호를 낸다.

이 전략은 먼저 세 개의 ATR 및 인자를 계산하여 각각 세 개의 슈퍼트렌드 라인을 그리는 데 사용됩니다. ATR는 가격의 변동성을 반영하며, 인자는 슈퍼트렌드 라인이 가격에 대한 민감성을 결정합니다. 이 전략은 각각 단기, 중기 및 장기적인 변수 조합을 사용하여 다양한 주기에서 트렌드 변화를 포착합니다.

가격이 슈퍼트렌드 라인을 넘어서면, 현재 상승 추세에 있다는 것을 의미하며, 이 전략은 더 많은 포지션을 열고, 가격이 슈퍼트렌드 라인을 넘어서면, 현재 하향 추세에 있다는 것을 의미하며, 이 전략은 포지션을 열고, 공백을 합니다. 세 개의 슈퍼트렌드 라인은 더 많은 거래 기회를 창출 할 수 있으며, 상호 검증은 잘못된 신호를 줄이는 데 도움이됩니다.

또한, 이 전략은 change 함수를 사용하여 Supertrend 선의 방향이 변경되었는지 여부를 판단한다. 새로운 신호는 Supertrend 선의 방향이 변경되었을 때만 생성되며, 평점 후에 즉시 역으로 새로운 포지션을 열리는 경우가 발생하지 않는다. 마지막으로, 이 전략은 평점 포지션 전 포지션 및 철회 기능을 제공하여 전략의 실전성을 향상시킨다.

전체적으로, Supertrend 전략은 트렌드 추적 지표 Supertrend 라인의 장점을 최대한 활용하여 다양한 주기적 트렌드를 캡처하는 여러 개의 파라미터를 사용하며, 트렌드 추적 전략의 참고로 합리적인 입출장 메커니즘을 설계합니다.

슈퍼트렌드 전략 우위 분석

슈퍼트렌드 전략은 다음과 같은 장점이 있습니다.

  1. 트렌드 변화를 포착하는 능력

ATR을 계산하고 동적인 슈퍼트렌드 라인을 그리는 것은 시장 추세의 변화를 유연하게 잡을 수 있으며, 흔들리는 시장의 오해를 피할 수 있습니다.

  1. 다중 집합 변수 설계

세 개의 슈퍼트렌드 라인을 세 개의 다른 매개 변수를 사용하여 계산하면 단기, 중기, 장기 기간 동안 동시 트렌드를 잡을 수 있으며 더 많은 기회가 있습니다.

  1. 반전 검증 메커니즘

슈퍼트렌드 선의 방향이 바뀌었을 때만 새로운 신호를 생성하고, 불필요한 반복 거래를 피하고, 신호의 신뢰성을 검증한다.

  1. 실전형 디자인

평고전고 기능을 설정하면 한 번으로 청산할 수 있으며, 청산 기능으로 갑작스러운 사건에 대처하고, 실디 사용 능력을 향상시킬 수 있다.

  1. 전략 논리는 간단하고 명확합니다.

슈퍼트렌드 (Supertrend) 를 기반으로 한 신호 규칙은 명확하고, 조작 및 검증하기 쉽고, 양자 거래 초보자에게 적합하다.

슈퍼트렌드 전략 위험 팁

슈퍼트렌드 전략에는 다음과 같은 위험도 있습니다.

  1. 잘못된 신호를 만들어 낼 수 있습니다.

위기상황에서, 슈퍼트렌드 라인은 자주 위아래로 교차할 수 있으며, 너무 많은 가짜 신호를 생성하여 손실을 초래한다.

  1. 변수를 최적화하기 어려운 경우

다중 모음의 조합을 최적화하는 것은 더 어렵고, 부적절한 매개 변수는 전략의 효과를 떨어뜨릴 수 있다.

  1. 트렌드 전환점을 알 수 없습니다.

슈퍼트렌드 전략은 추세 판단에만 의존하여 잠재적인 추세 반전 지점을 결정할 수 없으며 다른 지표가 보조되어야 합니다.

  1. 비상사태의 위험

극단적인 상황에서는 위험을 효과적으로 통제할 수 없으며, 위험 관리와 함께 손실을 막는 전략이 필요합니다.

  1. 리포트 곡선 적합 위험

최적화 파라미터는 재검토 결과를 역사적인 데이터보다 우월하게 만들지만, 미래의 유효성을 보장할 수 없으며 신중한 평가가 필요합니다.

슈퍼트렌드 전략 요약

슈퍼트렌드 전략은 전체적으로 간단한 실용적인 트렌드 추적 전략이다. 그것은 슈퍼트렌드 선의 동적 특성을 사용하여 트렌드 방향을 판단하고, 다중 모음의 파라미터 디자인을 사용하여 효과를 높인다. 동시에 전략 메커니즘은 합리적이며, 약간의 실전성이 있다. 그러나 이 전략에는 잘못된 신호를 생성하거나, 최적화하기 어려운 파라미터와 같은 몇 가지 문제가 있습니다.

전략 소스 코드
/*backtest
start: 2023-08-15 00:00:00
end: 2023-09-14 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © MarketShree 

//@version=4
// strategy("Supertrend Strategy", overlay=true, default_qty_value=15)
closs_all=input(title="Close_all_Position", type=input.bool, defval=false)
cancel=input(title="Check To Cancel", type=input.bool, defval=false)

atrPeriod1 = input(7, "ATR Length-1")
factor1 = input(1.5,"Factor-1",type=input.float)
atrPeriod2 = input(10, "ATR Length-2")
factor2 = input(2, "Factor-2")
atrPeriod3 = input(20, "ATR Length-3")
factor3 = input(3, "Factor-3")

[superTrend1, direction1] = supertrend(factor1, atrPeriod1)
[superTrend2, direction2] = supertrend(factor2, atrPeriod2)
[superTrend3, direction3] = supertrend(factor3, atrPeriod3)

if change(direction1) < 0
    strategy.entry("LONG", strategy.long)

if change(direction1) > 0
    strategy.entry("SHORT", strategy.short)
strategy.close_all(when=closs_all,comment ="All postion are closed")
strategy.cancel_all(when=cancel)

if change(direction2) < 0
    strategy.entry("LONG", strategy.long)

if change(direction2) > 0
    strategy.entry("SHORT", strategy.short)
strategy.close_all(when=closs_all,comment ="All postion are closed")
strategy.cancel_all(when=cancel)
    
if change(direction3) < 0
    strategy.entry("LONG", strategy.long)

if change(direction3) > 0
    strategy.entry("SHORT", strategy.short)
strategy.close_all(when=closs_all,comment ="All postion are closed")
strategy.cancel_all(when=cancel)

colResistance = direction1 == 1 and direction1 == direction1[1] ? color.new(color.red, 0) : color.new(color.red, 100)
colSupport = direction1 == -1 and direction1 == direction1[1] ? color.new(color.green, 0) : color.new(color.green, 100)
plot(superTrend1, color = colResistance, linewidth=2)
plot(superTrend1, color = colSupport, linewidth=2)    

colResistance1 = direction2 == 1 and direction2 == direction2[1] ? color.new(color.red, 0) : color.new(color.red, 100)
colSupport1 = direction2 == -1 and direction2 == direction2[1] ? color.new(color.green, 0) : color.new(color.green, 100)
plot(superTrend2, color = colResistance, linewidth=2)
plot(superTrend2, color = colSupport, linewidth=2)

colResistance2 = direction3 == 1 and direction3 == direction3[1] ? color.new(color.red, 0) : color.new(color.red, 100)
colSupport2 = direction3 == -1 and direction3 == direction3[1] ? color.new(color.green, 0) : color.new(color.green, 100)
plot(superTrend3, color = colResistance1, linewidth=2)
plot(superTrend3, color = colSupport1, linewidth=2)