
이 전략은 파동 트렌드 지표 (WaveTrend) 를 기반으로 한 동적 거래 시스템으로, 가격의 동적 변화를 계산하여 시장의 과매매 상태를 식별하고, 중요한 가격 수준이 돌파될 때 거래 신호를 발생시킵니다. 이 전략은 쌍방향 처리 된 동적 곡선을 (WT1 및 WT2) 사용하여 시장 소음을 필터링하여 신호의 신뢰성을 향상시킵니다.
전략의 핵심은 다음과 같은 단계를 통해 파동 트렌드 지표를 구축하는 것입니다.
이는 합리적인 트렌드 동력 거래 전략을 설계하여 파동 트렌드 지표를 통해 시장의 역전 기회를 효과적으로 포착하는 것이다. 전략의 핵심 장점은 안정적인 신호 생성 메커니즘과 좋은 조정성이다. 제안된 최적화 방향을 통해 전략의 안정성과 수익성을 더욱 향상시킬 수 있다. 중·장기 거래 기회를 찾는 투자자들에게는 고려할 만한 거래 시스템이다.
/*backtest
start: 2024-02-19 00:00:00
end: 2025-02-16 08:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy(title="WaveTrend [LazyBear] Strategy", shorttitle="WT_LB_Strategy", overlay=true)
// Pôvodné vstupné parametre
n1 = input.int(10, title="Channel Length")
n2 = input.int(21, title="Average Length")
obLevel1 = input.int(60, title="Over Bought Level 1")
obLevel2 = input.int(53, title="Over Bought Level 2")
osLevel1 = input.int(-60, title="Over Sold Level 1")
osLevel2 = input.int(-53, title="Over Sold Level 2")
// Výpočet WaveTrendu
ap = hlc3
esa = ta.ema(ap, n1)
d = ta.ema(math.abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ta.ema(ci, n2)
// Vyhladené krivky
wt1 = tci
wt2 = ta.sma(wt1, 4)
// Plotovanie nulovej línie a OB/OS úrevní
plot(0, color=color.gray, linewidth=1)
plot(obLevel1, color=color.red)
plot(osLevel1, color=color.green)
plot(obLevel2, color=color.red)
plot(osLevel2, color=color.green)
// Plot WaveTrendu
plot(wt1, color=color.green, title="WT1")
plot(wt2, color=color.red, title="WT2")
plot(wt1 - wt2, color=color.blue, style=plot.style_area, title="WT Fill")
//------------------------------------------------------
// STRATEGY LOGIC (ukážková)
//------------------------------------------------------
if ta.crossover(wt1, wt2) and wt1 <= osLevel1
strategy.close("Short")
strategy.entry("Long", strategy.long)
if ta.crossunder(wt1, wt2) and wt1 >= obLevel1
strategy.close("Long")
strategy.entry("Short", strategy.short)