트라이던트 돌파 전략

PITCHFORK Pivot BREAKOUT Trend
생성 날짜: 2025-10-29 15:41:18 마지막으로 수정됨: 2025-10-29 15:41:18
복사: 11 클릭수: 195
avatar of ianzeng123 ianzeng123
2
집중하다
319
수행원

트라이던트 돌파 전략 트라이던트 돌파 전략

, 삼각대 전략이란 무엇인가? 바다의 신인 보세윈의 무기처럼 정확하다!

이 전략은 고대 그리스의 바다 신인 포세윈의 삼각주와 비슷합니다. 세 개의 핵심 포인트를 사용하여 강력한 거래 무기를 만듭니다. 그것은 시장의 세 가지 중요한 전환점을 찾아서 (중심축) 삼각주 모양의 통로를 그려서 가격 돌파의 황금기를 잡을 수 있습니다.

상상해보세요. 여러분이 바다에 있는 텐트를 세 개의 막대기로 세웠다고 상상해보세요. ️ - 첫 번째 막대기는 텐트 경계를 형성하는 받침대이고, 나머지 두 개의 막대기는 텐트 경계를 형성하는 받침대입니다.

전략의 핵심 논리: 세 가지의 결정

비중을 맞추세요!이 전략의 핵심은 다음과 같습니다.

  • 🎯 지능 축 인식: 자동으로 시장의 우여곡절을 찾아내고, 그 우여곡절이 번갈아 나타나지 않도록 한다.
  • 📐 삼각대 건설3개의 점으로 중앙선, 상단선, 하단선을 그려서 가격 통로를 형성합니다.
  • 💥 브레이크 신호“가격이 상승하면 더 많이 하고, 하락하면 더 적게 한다”.
  • 🛡️ 위험 관리: 중선으로 설정, 1:1 비율로 정지 버튼 설정

이것은 마치 붐비는 지하철역에서 세 가지 중요한 지점을 보고 사람들이 어떤 방향으로 몰려갈지 예측하는 것과 같습니다.

이 들어온 순간: 이 순간의 돌파구를 포착하라

구덩이 피하기 위한 지침모든 돌파구가 추구할 가치가 있는 것은 아닙니다!

더 많은 조건

  • ️ ️ ️
  • 전체적인 상승 경향 (중선 기울기는 양수)
  • 은 차에 서 있는 것처럼, 은 차에 서 있는 것처럼, 은 차에 서 있는 것처럼, 은 차에 서 있는 것처럼, 은 차에 서 있는 것처럼.

공백 조건

  • ️ ️ ️ ️
  • 전체적인 추세는 하향 (중간 선의 기울기는 마이너스)
  • 콘서트장과 같이 사람들이 출구로 몰려들기 시작했고,

위험 관리: 거래 당 1%만 위험

이 전략에서 가장 좋은 점은 과학 자금 관리가 내장되어 있다는 것입니다!

  • 위험 관리거래 당 계좌 자금의 1%만 위험을 감수합니다.
  • 정지 위치[삼각형의 중앙선에서 가격의 회전 공간을 부여합니다.]
  • 목표 지연1:1의 위험과 보상 비율, 건전하고 탐욕스럽지 않습니다.
  • 포지션 계산: 스톱로즈 거리에 따라 거래량을 자동으로 조정합니다.

마치 놀이기구에 가서 산악자전거를 타는 것과 같죠. 안전벨트를 잘 매고 있으면서도 스스로에게 조금이라도 자극을 줄 수 있는 공간을 남겨두세요!

의 전략적 장점: 왜 그렇게 인기가 있습니까?

  1. 객관성“전체적으로 가격행동에 기반을 두고 있으며, 감정적 영향을 받지 않습니다.
  2. 적응력이 좋죠.“분기”부터 “주경”까지의 모든 주기를 사용할 수 있습니다.
  3. 위험은 통제할 수 있습니다.‘부턴금 관리’는 ‘한 번의 실수로 인해 흔들리지 않는다’는 의미입니다.
  4. 작동이 간단합니다.“신호가 맑고 명확해서 초보자도 빠르게 알 수 있다”.

기억하세요, 거래는 자전거를 타는 것과 같습니다. ♀️, 처음에는 고생할 수 있지만, 균형을 잡으면 자유롭습니다! 이 삼각대 전략은 당신의 “보조 바퀴”이며, 시장에서 균형을 유지하도록 도와줍니다.

전략 소스 코드
/*backtest
start: 2024-10-29 00:00:00
end: 2025-10-27 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"SOL_USDT"}]
*/

//@version=5
strategy("Pitchfork Trading Friends", 
     overlay=true, 
     default_qty_type=strategy.percent_of_equity, 
     default_qty_value=100) // We will calculate size manually

// === 1. INPUTS ===
leftBars  = input.int(10, "Pivot Left Bars", minval=1)
rightBars = input.int(10, "Pivot Right Bars", minval=1)
riskPercent = input.float(1.0, "Risk Per Trade %", minval=0.1, step=0.1)

// === 2. PIVOT DETECTION & STORAGE ===
// Find pivot points
float ph = ta.pivothigh(high, leftBars, rightBars)
float pl = ta.pivotlow(low, leftBars, rightBars)

// Store the last 3 pivots (P1, P2, P3)
var float p1_price = na
var int   p1_bar   = na
var float p2_price = na
var int   p2_bar   = na
var float p3_price = na
var int   p3_bar   = na
var int   lastPivotType = 0 // 0=none, 1=high, -1=low

// Update pivots when a new one is found, ensuring they alternate
if not na(ph) and lastPivotType != 1
    p1_price := p2_price
    p1_bar   := p2_bar
    p2_price := p3_price
    p2_bar   := p3_bar
    p3_price := ph
    p3_bar   := bar_index[rightBars]
    lastPivotType := 1

if not na(pl) and lastPivotType != -1
    p1_price := p2_price
    p1_bar   := p2_bar
    p2_price := p3_price
    p2_bar   := p3_bar
    p3_price := pl
    p3_bar   := bar_index[rightBars]
    lastPivotType := -1

// === 3. PITCHFORK CALCULATION & DRAWING ===
// We need 3 valid points to draw
bool has3Pivots = not na(p1_bar) and not na(p2_bar) and not na(p3_bar)

// Declare lines
var line medianLine = na
var line upperLine = na
var line lowerLine = na

// Declare line prices for strategy logic
var float ml_price = na
var float ul_price = na
var float ll_price = na

if (has3Pivots)
    // P1, P2, P3 coordinates
    p1_y = p1_price
    p1_x = p1_bar
    p2_y = p2_price
    p2_x = p2_bar
    p3_y = p3_price
    p3_x = p3_bar

    // Calculate midpoint of P2-P3
    mid_y = (p2_y + p3_y) / 2.0
    mid_x = (p2_x + p3_x) / 2.0
    
    // Calculate Median Line (ML) slope
    float ml_slope = (mid_y - p1_y) / (mid_x - p1_x)
    
    // Calculate price on current bar for each line
    // y = m*(x - x_n) + y_n
    ml_price := ml_slope * (bar_index - p1_x) + p1_y
    
    // Identify which pivot is high (P2 or P3)
    float highPivot_y = p2_y > p3_y ? p2_y : p3_y
    int   highPivot_x = p2_y > p3_y ? p2_x : p3_x
    float lowPivot_y  = p2_y < p3_y ? p2_y : p3_y
    int   lowPivot_x  = p2_y < p3_y ? p2_x : p3_x

    // Upper/Lower line prices
    ul_price := ml_slope * (bar_index - highPivot_x) + highPivot_y
    ll_price := ml_slope * (bar_index - lowPivot_x) + lowPivot_y

    // === 4. STRATEGY LOGIC ===
    
    // Define trend by pitchfork slope
    bool trendUp = ml_slope > 0
    bool trendDown = ml_slope < 0
    
    // Entry Conditions
    bool longEntry  = ta.crossover(close, ul_price)  // Breakout
    bool shortEntry = ta.crossunder(close, ll_price) // Breakdown
    
    // Risk Calculation
    float capital = strategy.equity
    float riskAmount = (capital * riskPercent) / 100
    
    // --- LONG TRADE ---
    if (longEntry and trendUp)
        float sl_price = ml_price // SL at median line
        float stop_loss_pips = close - sl_price
        float tp_price = close + stop_loss_pips // 1:1 TP
        
        // Calculate position size
        float positionSize = riskAmount / (stop_loss_pips * syminfo.pointvalue)
        
        if (positionSize > 0)
            strategy.entry("Long", strategy.long, qty=positionSize)
            strategy.exit("SL/TP Long", from_entry="Long", stop=sl_price, limit=tp_price)
            
    // --- SHORT TRADE ---
    if (shortEntry and trendDown)
        float sl_price = ml_price // SL at median line
        float stop_loss_pips = sl_price - close
        float tp_price = close - stop_loss_pips // 1:1 TP
        
        // Calculate position size
        float positionSize = riskAmount / (stop_loss_pips * syminfo.pointvalue)
        
        if (positionSize > 0)
            strategy.entry("Short", strategy.short, qty=positionSize)
            strategy.exit("SL/TP Short", from_entry="Short", stop=sl_price, limit=tp_price)