
골드 쇼트 라인 트레이딩 전략은 XAUUSD 외환 통화 쌍을 위해 특별히 설계된 1분짜리 쇼트 라인 트레이딩 전략이다. 이 전략은 평균 실제 파동량 (ATR) 과 지수 이동 평균 (EMA) 의 조합을 사용하여 변동하는 시장 환경에서 가격 변화를 포착하여 안정적인 수익을 얻기 위해 신속한 입출장 거래를 구현한다. 전략은 스톱 로즈 (SL) 및 스톱 로즈 (TP) 수준을 동적으로 조정하며 동시에 빠른 두 개의 EMA 라인의 교차 신호를 입출장 신호로 사용하며 위험을 통제하면서 수익을 극대화하려고 노력한다.
이 정책은 다음과 같은 원칙에 기초합니다.
전략은 Pine Script을 사용하여 작성되었으며, 주요 논리는 다음과 같습니다:
전반적으로, 이 전략은 기술 지표의 유기적 결합을 통해 짧은 시간에 가격 변동을 포착하여, 고주파 거래를 추구하는 투자자에게 적합합니다.
“골드 쇼트 라인 트레이딩 전략”은 ATR 및 EMA 지표에 기반한 1분 단축 트레이딩 전략으로, 금 (XAUUSD) 거래에 적용된다. 이 전략은 동적 스톱 로즈 스과 트렌드 추적의 원리를 활용하여 가격 변동을 빠르게 포착하고, 명확한 거래 신호 표시와 고정 비율 자금 관리를 통해 위험을 통제한다. 이 전략의 장점은 짧은 라인 트레이딩, 동적 조정 및 직관적인 표현에 적응하는 데 있습니다. 그러나 동시에 빈번한 거래, 변동 시장 오도 및 변수 손실 등의 위험에 직면하고 있습니다.
/*backtest
start: 2024-02-27 00:00:00
end: 2024-03-28 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("XAUUSD Scalper 1m Revisi", overlay=true)
// Menggunakan ATR untuk SL dan TP dinamis
float atr = ta.atr(14)
float slMultiplier = 30
float tpMultiplier = 30
float slPrice = atr * slMultiplier
float tpPrice = atr * tpMultiplier
// Menggunakan EMA untuk respons yang lebih cepat
int shortEmaLength = 14
int longEmaLength = 28
emaShort = ta.ema(close, shortEmaLength)
emaLong = ta.ema(close, longEmaLength)
// Kondisi untuk entry
longCondition = ta.crossover(emaShort, emaLong)
shortCondition = ta.crossunder(emaShort, emaLong)
// Fungsi untuk menggambar garis stop loss dan take profit
drawLines(entryPrice, isLong) =>
slLevel = isLong ? entryPrice - slPrice : entryPrice + slPrice
tpLevel = isLong ? entryPrice + tpPrice : entryPrice - tpPrice
// line.new(bar_index, slLevel, bar_index + 1, slLevel, width=2, color=color.red)
// line.new(bar_index, tpLevel, bar_index + 1, tpLevel, width=2, color=color.green)
// Plot panah untuk entry dan menggambar garis SL dan TP
if (longCondition)
// label.new(bar_index, low, "⬆️", color=color.green, size=size.large, textcolor=color.white, style=label.style_label_up)
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", "Long", loss=slPrice, profit=tpPrice)
drawLines(close, true)
if (shortCondition)
// label.new(bar_index, high, "⬇️", color=color.red, size=size.large, textcolor=color.white, style=label.style_label_down)
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", "Short", loss=slPrice, profit=tpPrice)
drawLines(close, false)