
이 전략은 평행선 교차를 기반으로 시장의 경향 방향을 판단하고 트렌드를 추적하는 양적 거래 전략이다. 이 전략은 여러 개의 다른 파라미터의 간단한 이동 평균의 교차를 사용하여 구매와 판매의 시간을 판단한다.
이 전략의 주요 판단 규칙은 다음과 같습니다.
구체적으로, 전략은 20 일선, 30 일선, 50 일선, 60 일선 및 200 일선 5 개의 이동 평균을 사용합니다. 20 일선이 50 일선을 상향으로 가로질러 구매 신호로 판단하고, 10 일선이 30 일선을 하향으로 가로질러 판매 신호로 판단합니다. 다른 매개 변수의 평균선을 사용하여 더 장기 및 더 단기 경향 방향을 판단 할 수 있습니다.
이 평행선 교차에 기반한 트렌드 추적 전략은 다음과 같은 장점이 있습니다.
이 전략에는 몇 가지 위험도 있습니다.
위험을 줄이기 위해, 우리는 평균선 변수를 조정하고, 변수 설정을 최적화할 수 있으며, 다른 지표들을 사용하여 의사결정을 보조할 수 있습니다.
우리는 다음과 같은 몇 가지 측면에서 이 전략을 개선할 수 있습니다.
이 전략은 매우 기초적인 트렌드 추적 전략이다. 이 전략은 평행선 교차 원칙을 사용하여 시장의 트렌드 방향을 판단하고, 간단하고 효과적이며 이해하기 쉬운 구현이다. 우리는 이 기초를 기반으로 더 복잡한 양적 거래에 적용할 수 있도록 많은 확장과 최적화를 할 수 있다.
/*backtest
start: 2024-01-01 00:00:00
end: 2024-01-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Grafik Formasyonları Alım-Satım Stratejisi", overlay=true)
// Inverse Head and Shoulders (İnverse Omuz-Baş-Omuz)
ihs_condition = ta.crossover(ta.sma(close, 50), ta.sma(close, 200))
// Head and Shoulders (Omuz-Baş-Omuz)
hs_condition = ta.crossunder(ta.sma(close, 50), ta.sma(close, 200))
// Flag Pattern (Bayrak Formasyonu)
flag_condition = ta.crossover(ta.sma(close, 10), ta.sma(close, 30))
// Triangle Pattern (Trekgen Formasyonu)
triangle_condition = ta.crossover(ta.sma(close, 20), ta.sma(close, 50))
// Pennant Pattern (Ters Bayrak Formasyonu)
pennant_condition = ta.crossunder(ta.sma(close, 10), ta.sma(close, 20))
// Inverse Triangle Pattern (Ters Üçgen Formasyonu)
inverse_triangle_condition = ta.crossunder(ta.sma(close, 30), ta.sma(close, 60))
// Alım-Satım Sinyalleri
if (ihs_condition)
strategy.entry("İHS_Long", strategy.long)
if (hs_condition)
strategy.close("İHS_Long")
if (flag_condition)
strategy.entry("Flag_Long", strategy.long)
if (triangle_condition)
strategy.entry("Triangle_Long", strategy.long)
if (pennant_condition)
strategy.entry("Pennant_Short", strategy.short)
if (inverse_triangle_condition)
strategy.close("Pennant_Short")