쿼드라틱 모멘텀 이중 지표 타이밍 전략

저자:차오장, 날짜: 2024-02-04 15:53:48
태그:

img

전반적인 설명

이 전략은 슈퍼 트렌드 지표와 엘리엇 웨브 이론을 결합하여 강력한 기술적 거래 도구를 구축합니다. 이는 잠재적인 트렌드 역전 및 중요한 가격 움직임을 조기에 파악 할 수있는 보다 포괄적인 시장 관점을 제공하기 위해 다단계 트렌드 분석을 사용합니다.

전략 원칙

핵심 아이디어는 여러 단계의 접근 방식에 있습니다.

  1. 4 개의 슈퍼 트렌드 지표를 사용하십시오. 각각 다른 ATR 길이와 곱셈자를 사용하여 단기에서 장기간에 걸쳐 트렌드를 판단하십시오.
  2. 지표 컨버전스를 통해 강력한 긴 신호와 짧은 신호를 파악합니다.
  3. 거래 신호를 확인하기 위해 유사한 시장 행동을 식별하기 위해 Elliott Wave의 패턴 인식 방법을 참조하십시오.

따라서 여러 지표를 활용하고 패턴 인식 기능을 추가하여 전략을 더욱 견고하게 만듭니다.

이점 분석

  1. 다중 지표 설계는 포괄적 인 판단을 제공합니다.
  2. 파동 이론의 영감을 통해 패턴 인식의 안정성을 높입니다.
  3. 실시간 방향 조정 시장 변화에 적응
  4. 구성 가능한 매개 변수는 다른 제품과 시간 프레임에 적합합니다.

위험 분석

  1. 매개 변수 설정은 경험에 의존하며 최적의 매개 변수 조합을 결정하기 위해 조정이 필요합니다.
  2. 다중 지표 설계는 복잡하고 계산 부하가 증가합니다.
  3. 잘못된 신호 발생을 완전히 피할 수 없습니다

매개 변수들은 최적을 점진적으로 결정하기 위해 최적화 될 수 있습니다. 클라우드 컴퓨팅은 컴퓨팅 성능을 향상시킬 수 있습니다.

최적화 방향

최적화는 몇 가지 측면에서 이루어질 수 있습니다.

  1. 시장 조건에 따라 동적으로 매개 변수를 조정하는 적응 매개 변수 조정 모듈을 추가
  2. 신호 신뢰성을 판단하는 데 도움이되는 기계 학습 모델을 통합합니다.
  3. 감정 지표, 뉴스 이벤트 등을 결합하여 시장 체제를 결정합니다.
  4. 테스트 작업 부하를 줄이기 위해 여러 제품 매개 변수 템플릿을 지원

이것은 전략 매개 변수를 더 지능화하고 판단을 더 정확하고 실제 적용을 더 편리하게 할 것입니다.

요약

이 전략은 유연성을 높이는 동시에 판단의 견고성을 보장하는 경향과 패턴 차원을 포괄적으로 고려합니다. 다중 지표 및 매개 변수 설정은 시장의 완전한 적용성을 보장합니다. 지능적이고 자동화된 방법을 추가로 통합하면 전략 실용성이 크게 향상 될 수 있습니다. 기술 거래의 발전에 귀중한 영감을 제공하고 참조를 제공합니다.


/*backtest
start: 2024-01-27 00:00:00
end: 2024-02-03 00:00:00
period: 5m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Elliott's Quadratic Momentum - Strategy [presentTrading]",shorttitle = "EQM Strategy [presentTrading]", overlay=true )

// Inputs for selecting trading direction
tradingDirection = input.string("Both", "Select Trading Direction", options=["Long", "Short", "Both"])


// SuperTrend Function
supertrend(src, atrLength, multiplier) =>
    atr = ta.atr(atrLength)
    up = hl2 - (multiplier * atr)
    dn = hl2 + (multiplier * atr)
    trend = 1
    trend := nz(trend[1], 1)
    up := src > nz(up[1], 0) and src[1] > nz(up[1], 0) ?   math.max(up, nz(up[1], 0)) : up
    dn := src < nz(dn[1], 0) and src[1] < nz(dn[1], 0) ? math.min(dn, nz(dn[1], 0)) : dn
    trend := src > nz(dn[1], 0) ?  1 : src < nz(up[1], 0)? -1 : nz(trend[1], 1)
    [up, dn, trend]

// Inputs for SuperTrend settings
atrLength1 = input(7, title="ATR Length for SuperTrend 1")
multiplier1 = input(4.0, title="Multiplier for SuperTrend 1")
atrLength2 = input(14, title="ATR Length for SuperTrend 2")
multiplier2 = input(3.618, title="Multiplier for SuperTrend 2")
atrLength3 = input(21, title="ATR Length for SuperTrend 3")
multiplier3 = input(3.5, title="Multiplier for SuperTrend 3")
atrLength4 = input(28, title="ATR Length for SuperTrend 3")
multiplier4 = input(3.382, title="Multiplier for SuperTrend 3")

// Calculate SuperTrend
[up1, dn1, trend1] = supertrend(close, atrLength1, multiplier1)
[up2, dn2, trend2] = supertrend(close, atrLength2, multiplier2)
[up3, dn3, trend3] = supertrend(close, atrLength3, multiplier3)
[up4, dn4, trend4] = supertrend(close, atrLength4, multiplier4)


// Entry Conditions based on SuperTrend and Elliott Wave-like patterns
longCondition = trend1 == 1 and trend2 == 1 and trend3 == 1 and trend4 == 1
shortCondition = trend1 == -1 and trend2 == -1 and trend3 == -1 and trend4 == - 1

// Strategy Entry logic based on selected trading direction
if tradingDirection == "Long" or tradingDirection == "Both"
    if longCondition
        strategy.entry("Long", strategy.long)
        // [Any additional logic for long entry]

if tradingDirection == "Short" or tradingDirection == "Both"
    if shortCondition
        strategy.entry("Short", strategy.short)
        // [Any additional logic for short entry]


// Exit conditions - Define your own exit strategy
// Example: Exit when any SuperTrend flips
if trend1 != trend1[1] or trend2 != trend2[1] or trend3 != trend3[1] or trend4 != trend4[1] 
    strategy.close_all()

// Function to apply gradient effect
gradientColor(baseColor, length, currentBar) =>
    var color res = color.new(baseColor, 100)
    if currentBar <= length
        res := color.new(baseColor, int(100 * currentBar / length))
    res

// Apply gradient effect
color1 = gradientColor(color.blue, atrLength1, bar_index % atrLength1)
color4 = gradientColor(color.blue, atrLength4, bar_index % atrLength3)


// Plot SuperTrend with gradient for upward trend
plot1Up = plot(trend1 == 1 ? up1 : na, color=color1, linewidth=1, title="SuperTrend 1 Up")
plot4Up = plot(trend4 == 1 ? up4 : na, color=color4, linewidth=1, title="SuperTrend 3 Up")

// Plot SuperTrend with gradient for downward trend
plot1Down = plot(trend1 == -1 ? dn1 : na, color=color1, linewidth=1, title="SuperTrend 1 Down")
plot4Down = plot(trend4 == -1 ? dn4 : na, color=color4, linewidth=1, title="SuperTrend 3 Down")

// Filling the area between the first and third SuperTrend lines for upward trend
fill(plot1Up, plot4Up, color=color.new(color.green, 80), title="SuperTrend Upward Band")

// Filling the area between the first and third SuperTrend lines for downward trend
fill(plot1Down, plot4Down, color=color.new(color.red, 80), title="SuperTrend Downward Band")



더 많은