
이것은 차트 가격 형태를 인식하는 것에 기반한 자동화 거래 전략이다. 이 전략은 주로 시장에서 쌍보단과 쌍탑 형태를 식별하여 거래 결정을 내리고, 특정 시간 주기 설정하여 가격 움직임을 모니터링하고, 조건형 형태가 나타나면 자동으로 거래 지시를 실행한다. 이 전략은 지그자그 지표를 사용하여 이러한 중요한 가격 형태를 시각적으로 표시하여 거래자가 시장 움직임을 직관적으로 이해할 수 있도록 돕는다.
이 전략의 핵심 논리는 기술 분석 방법을 통해 시장의 양쪽 바닥과 양쪽 꼭대기 형태를 식별하는 것입니다. 구체적으로 구현하는 데는 다음과 같은 몇 가지 중요한 단계가 포함됩니다:
이것은 합리적이고 실용적으로 설계된 자동화 거래 전략이다. 시장의 쌍방향 형태를 정확하게 식별하여, 유연한 파라미터 설정과 완벽한 풍력 제어 메커니즘과 결합하여, 시장의 단기 반전 기회를 효과적으로 포착할 수 있다. 약간의 위험이 있지만, 지속적인 최적화와 개선으로, 이 전략은 신뢰할 수 있는 거래 도구가 될 전망이다.
/*backtest
start: 2024-12-04 00:00:00
end: 2024-12-11 00:00:00
period: 3m
basePeriod: 3m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Double Bottom and Top Hunter", overlay=true)
// Parametreler
length = input.int(100, title="Dönem Uzunluğu", defval=100)
lookback = input.int(100, title="Geriye Dönük Kontrol Süresi", defval=100)
// İkili Dip ve Tepe Bulma
low1 = ta.lowest(low, length)
high1 = ta.highest(high, length)
low2 = ta.valuewhen(low == low1, low, 1)
high2 = ta.valuewhen(high == high1, high, 1)
doubleBottom = (low == low1 and ta.lowest(low, lookback) == low1 and low == low2)
doubleTop = (high == high1 and ta.highest(high, lookback) == high1 and high == high2)
// İşlem Açma Koşulları
longCondition = doubleBottom
shortCondition = doubleTop
// İşlem Kapatma Koşulları
closeLongCondition = ta.highest(high, length) > high1 and low < low1
closeShortCondition = ta.lowest(low, length) < low1 and high > high1
// İşlem Açma
if (longCondition)
strategy.entry("Long", strategy.long, qty=1)
if (shortCondition)
strategy.entry("Short", strategy.short, qty=1)
// İşlem Kapatma
if (closeLongCondition)
strategy.close("Long")
if (closeShortCondition)
strategy.close("Short")
// Grafik Üzerinde Göstergeler ve ZigZag Çizimi
plotshape(series=longCondition, title="İkili Dip Bulundu", location=location.belowbar, color=color.green, style=shape.labelup, text="LONG")
plotshape(series=shortCondition, title="İkili Tepe Bulundu", location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT")
// var line zigzagLine = na
// if (doubleBottom or doubleTop)
// zigzagLine := line.new(x1=bar_index[1], y1=na, x2=bar_index, y2=doubleBottom ? low : high, color=doubleBottom ? color.green : color.red, width=2)
// Zigzag çizgisini sürekli güncelleme
// line.set_xy1(zigzagLine, bar_index[1], na)
// line.set_xy2(zigzagLine, bar_index, doubleBottom ? low : high)