
이 전략은 트렌드 라인, 피포나치 리트랙 레벨 및 이동 평균을 결합하여 돌파 거래 기회를 잡기 위해 고안되었습니다. 전략은 먼저 빠른 EMA와 느린 EMA 사이의 교차를 식별하여 잠재적인 트렌드 라인 돌파를 표시합니다.
금과의 브레이크 전략은 트렌드 라인 브레이크 트레이딩 기회를 포착하는 체계적인 방법을 제공합니다. 이 전략은 EMA, 피보나치 레벨 및 이동 평균과 같은 여러 기술적 지표를 결합하여 높은 확률의 거래 신호를 생성하는 것을 목표로합니다. 이 전략은 여러 번의 확인과 트렌드 추적의 장점이 있음에도 불구하고, 거래자는 여전히 가짜 브레이크, 지연 신호 및 예상치 못한 사건의 위험을 경계해야합니다.
/*backtest
start: 2023-05-22 00:00:00
end: 2024-05-27 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © spikeroy123
//@version=5
strategy("Golden Pocket Trendline Breakout Strategy", overlay=true, max_bars_back=500, max_lines_count=500)
// Core settings
int Period = input.int(10, title='Period')
bool Trendtype = input.string(title="Type", defval='Wicks', options=['Wicks', 'Body']) == 'Wicks'
string Extensions = input.string(title='Extend', defval='25', options=['25', '50', '75'])
color LineCol1 = input.color(color.rgb(109, 111, 111, 19), title="Line Color")
bool ShowTargets = input.bool(true, title="Show Targets")
// Fibonacci settings
bool ShowFib = input.bool(true, title="Show Golden Pocket")
color gp_color_618 = input.color(color.new(color.yellow, 0), title="0.618 Level Color")
color gp_color_65 = input.color(color.new(color.orange, 0), title="0.65 Level Color")
// Calculate EMAs and HMA
fast_ema = ta.ema(close, 9)
slow_ema = ta.ema(close, 21)
ema_200 = ta.ema(close, 200)
hma_300 = ta.hma(close, 300)
ma_18 = ta.sma(close, 18)
// Plot EMAs and HMA
plot(fast_ema, color=color.blue, title="Fast EMA (9)")
plot(slow_ema, color=color.red, title="Slow EMA (21)")
plot(ema_200, color=color.orange, title="EMA 200")
plot(hma_300, color=color.green, title="HMA 300")
plot(ma_18, color=color.purple, title="MA 18") // Plot 18-day moving average
// Calculate and plot Golden Pocket
var float low = na
var float high = na
var float fib_618 = na
var float fib_65 = na
if (ta.crossover(fast_ema, slow_ema)) // Example condition to reset high and low
low := na(low) ? close : math.min(low, close)
high := na(high) ? close : math.max(high, close)
else if (ta.crossunder(fast_ema, slow_ema)) // Example condition to plot the golden pocket
low := na
high := na
if (ShowFib and not na(low) and not na(high))
fib_618 := high - (high - low) * 0.618
fib_65 := high - (high - low) * 0.65
if (ShowFib and not na(fib_618) and close > fib_618 and ta.crossover(close, fib_618))
strategy.entry("Buy", strategy.long)
if (ShowFib and not na(fib_618) and close < fib_618 and ta.crossunder(close, fib_618))
strategy.entry("Sell", strategy.short)