OPEN-SOURCE SCRIPT

GLOBAL 3H SCALPING (BTC FILTER)

49
글로벌 멀티 세션 & BTC 필터 고강도 스캘핑 알고리즘 기술 보고서
파인 스크립트 v5의 기술적 패러다임과 알고리즘 트레이딩의 진화
금융 시장의 디지털화가 가속화됨에 따라 개인 트레이더와 기관 투자자 모두 정교한 알고리즘을 활용하여 시장의 비효율성을 포착하려는 시도를 지속하고 있다. 파인 스크립트 v5는 네임스페이스 기반 아키텍처를 도입하여 코드의 가독성과 실행 효율성을 극대화하였습니다. 본 보고서에서는 기존 코드의 구문 오류를 수정하고, 아시아·유럽·미국 세션 및 비트코인(BTC) 커플링 필터를 포함한 최적화된 스크립트를 제공합니다.

🚀 GLOBAL 3H SCALPING (BTC FILTER) 전체 코드
이 코드는 모든 세션(아시아/유럽/미국)의 3시간 골든 아워를 포착하며, 비트코인의 추세가 알트코인과 일치할 때만 신호를 생성하는 '커플링 필터'가 내장된 최종 버전입니다.

Pine Script
//version=5
indicator("GLOBAL 3H SCALPING (BTC FILTERED)", overlay=true, max_lines_count=300, max_labels_count=100)

//────────────────────
// ⏰ 세션 정의 (한국 시간 KST 기준)
//────────────────────
string tz = "Asia/Seoul"
string asiaSess = "0900-1200"
string euSess = "1600-1900"
string usSess = "2300-0200"

f_getFocus(sessionStr) =>
inSess = not na(time(timeframe.period, sessionStr, tz))
start = inSess and not nz(inSess[1], false)
float tfInSec = timeframe.in_seconds()
int bars3H = math.max(1, math.round(10800 / tfInSec))
int barsSinceStart = ta.barssince(start)
bool focus = inSess and (not na(barsSinceStart) and barsSinceStart < bars3H)
focus

bool asiaFocus = f_getFocus(asiaSess)
bool euFocus = f_getFocus(euSess)
bool usFocus = f_getFocus(usSess)
bool totalFocus = asiaFocus or euFocus or usFocus

bgcolor(asiaFocus? color.new(color.green, 92) : na, title="Asia Focus")
bgcolor(euFocus? color.new(color.blue, 92) : na, title="EU Focus")
bgcolor(usFocus? color.new(color.red, 92) : na, title="US Focus")

//────────────────────
// 🟠 BTC 커플링 필터 (BTC Trend Filter)
//────────────────────
// 비트코인의 추세를 실시간으로 가져와 알트코인 매매의 안전장치로 활용함
float btcPrice = request.security("BINANCE:BTCUSDT", timeframe.period, close)
float btcEMA = request.security("BINANCE:BTCUSDT", timeframe.period, ta.ema(close, 200))

bool btcBullish = btcPrice > btcEMA
bool btcBearish = btcPrice < btcEMA

//────────────────────
// 📈 기술적 지표 (Altcoin 자체 지표)
//────────────────────
float ema200 = ta.ema(close, 200)
plot(ema200, title="EMA200", color=color.new(color.yellow, 0), linewidth=2)

float vwapVal = ta.vwap(hlc3)
plot(vwapVal, title="VWAP", color=color.new(color.aqua, 0), linewidth=2)

float volMA = ta.sma(volume, 20)
bool volOK = volume > volMA

bool longVWAP = low <= vwapVal and close > vwapVal
bool shortVWAP = high >= vwapVal and close < vwapVal

//────────────────────
// 🚀 진입 조건 (BTC 필터 통합)
//────────────────────
bool longCond = totalFocus and close > ema200 and close > vwapVal and longVWAP and volOK and btcBullish
bool shortCond = totalFocus and close < ema200 and close < vwapVal and shortVWAP and volOK and btcBearish

plotshape(longCond, title="LONG", location=location.belowbar, style=shape.triangleup, size=size.small, color=color.lime, text="LONG")
plotshape(shortCond, title="SHORT", location=location.abovebar, style=shape.triangledown, size=size.small, color=color.red, text="SHORT")

//────────────────────
// 🧠 실시간 통합 대시보드
//────────────────────
var label infoLabel = na
if barstate.islast
label.delete(infoLabel)

string sessName = asiaFocus? "ASIA" : euFocus? "EUROPE" : usFocus? "US" : "WAITING"
string labelText = "GLOBAL ALGO (BTC FILTERED) 🌍\n" +
"--------------------------\n" +
"Active Session: " + sessName + "\n" +
"BTC Trend: " + (btcBullish? "BULLISH 🟢" : "BEARISH 🔴") + "\n" +
"Alt Trend: " + (close > ema200? "BULLISH" : "BEARISH") + "\n" +
"Volume: " + (volOK? "STRONG" : "WEAK")

infoLabel := label.new(
x = bar_index,
y = high,
text = labelText,
style = label.style_label_left,
color = color.new(color.black, 20),
textcolor = color.white
)
📘 Comprehensive User Manual (EN/KR)
1. English: Multi-Session & BTC Filtered Scalping Guide
Core Philosophy
The "Golden Hours" strategy focuses on the first 3 hours of global market openings when volatility and liquidity are at their peak . By filtering altcoin signals with the Bitcoin (BTC) trend, we ensure high-probability entries aligned with the overall market momentum .

Session Schedule (Korea Standard Time - KST)
The indicator highlights three major trading windows :

Asia Focus (Green): 09:00 – 12:00 KST (Tokyo/Seoul opening).

Europe Focus (Blue): 16:00 – 19:00 KST (London opening).

US Focus (Red): 23:00 – 02:00 KST (New York opening).

Trading Rules
Long (Buy) Entry Conditions:

Zone: Price must be within one of the colored Focus Zones.

BTC Filter: BTC must be trading above its EMA 200 (Market Sentiment: Bullish) .

Alt Trend: Altcoin price must be above its own EMA 200.

Value: Price is above VWAP.

Reaction: Candle low touches or dips below VWAP, then closes above it (Pullback) .

Volume: Current volume is higher than the 20-period average.

Short (Sell) Entry Conditions:

Zone: Price must be within one of the colored Focus Zones.

BTC Filter: BTC must be trading below its EMA 200 (Market Sentiment: Bearish).

Alt Trend: Altcoin price must be below its EMA 200.

Value: Price is below VWAP.

Reaction: Candle high touches or goes above VWAP, then closes below it (Rejection).

Volume: Current volume is higher than the 20-period average.

Professional Risk Management
1% Rule: Never risk more than 1% of your total capital on a single trade .

Leverage: Use 1x–5x for beginners, and 5x–20x for advanced traders only with tight stop-losses .

Stop-Loss: Place stop-losses 0.1%–0.5% away from the entry point or at the most recent swing high/low .

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。