기관 유동성 매트릭스 전략


생성 날짜: 2025-12-22 17:47:03 마지막으로 수정됨: 2026-01-07 11:20:40
복사: 12 클릭수: 165
avatar of ianzeng123 ianzeng123
2
집중하다
413
수행원

기관 유동성 매트릭스 전략 기관 유동성 매트릭스 전략

IDM, BOS, CHOCH, ATR, RSI, MACD, EMA, HTF

이것은 일반적인 해킹 전략이 아닙니다. 이것은 기관 차원의 유동성 사냥 시스템입니다.

회수 데이터는 전통적 기술 분석을 직접 대면합니다: 8 인자 집합 모델 + 시장 구조 인식 + IDM 유도 검출, 최소 68 분만 포지션을 개설하십시오. 어떤 지표도 “기구적 사고”라고 할 수 없습니다. 이 시스템은 BOS (구조 돌파) 와 CHoCH (성질 변경) 을 전문적으로 식별합니다.

핵심 논리는 잔인하고 직접적입니다: 기관들은 소매 상장자를 제거하고, 상장자를 뒤집어 놓습니다. 가격이 잠시 떨어지기 전에 낮아지고 빠르게 회복되면, 그것은 전형적인 유동성 청소입니다. 소매가 씻어 내린 순간이 우리의 입점입니다.

2배의 ATR 상쇄 설계가 합리적이지만, 풍력 조절 파라미터가 너무 급진적이었습니다.

일일 리스크 제한은 6%, 주간 리스크 제한은 12%, 단위 리스크는 1.5%이다. 수학은 간단하다: 연속적으로 4개의 풀 포지션 손실이 일일 독점과 연속적으로 8개의 주간 독점이다. 문제는 암호화폐 시장의 변동률이 보통 전통적인 자산의 3~5배이고, 이 리스크 은 불안정한 상황에서 빠르게 소모된다.

ATR 배수는 2.0배의 스톱로스 + 2.0배의 리스크비율이 이론적으로 타당하지만 실제 실행에서는 슬라이드 포인트 비용을 고려해야 한다. 0.05%의 수수료 설정은 현금 거래에 적합하며, 계약 거래의 경우 0.1% 이상으로 조정하는 것이 좋습니다.

8 요소 집합 시스템은 전통적인 단일 지표보다 우수하지만 과도한 최적화 위험이 있습니다.

RSI ((14) + MACD ((12,26,9) + EMA ((200) + 거래량 + 시장 구조 + 시간 창 + 변동률 + 높은 시간 프레임 확인. 각 요소의 무게는 동등하다 ((각 1 포인트), 최소 6 포인트는 75%의 요소가 동시에 충족되어야 함을 의미합니다.

이 디자인은 트렌드 상황에서는 잘 작동하지만 수평 변동에서는 신호가 희귀하다. 역사적인 회귀는 전통적인 주식 시장의 신호 주파수가 현저하게 감소하는 것보다 높은 변동률의 암호화폐 시장에 더 적합하다는 것을 보여줍니다.

시장 구조를 식별하는 것이 좋지만 IDM 탐지 논리는 최적화해야 합니다.

BOS와 CHoCH는 5주기 피벗 포인트를 기반으로 인식되며, 이 매개 변수는 1시간 차트 이상의 시간 프레임에서 안정적으로 동작한다. 그러나 IDM는 3개의 K선으로만 판단하여, 고주파 노이즈 환경에서는 잘못된 신호를 발생시킬 수 있다.

IDM 탐지 주기를 5-7K선으로 조정하고, 트래픽 확인 조건을 추가하는 것이 좋습니다. 현재 버전은 15분 차트 이하의 시간 프레임에서는 사용하지 않는 것이 권장되며, 신호 잡음 비율은 너무 낮습니다.

위험 관리의 치명적인 결함: 관련성 통제의 부재

전략은 동시에 여러 개의 연관성이 높은 품종을 보유하도록 허용하며, 이는 체계적인 위험 사건에서 위험 구멍을 배가하게 만듭니다. 3 K 선의 연관성 냉각 기간은 완전히 충분하지 않으며, 20 ~ 50 K 선으로 조정하는 것이 좋습니다.

최대 회수 독점 10% 설정은 합리적이지만 동적 조정 장치가 부족합니다. 황소 시장에서는 15%로 적절하게 완화 될 수 있으며, 곰 시장에서는 5-7%로 강화되어야합니다. 현재 고정 파라미터 디자인은 다양한 시장 환경에 적응 할 수 없습니다.

적용 시나리오의 명확성: 트렌드 상황에서 기관 차원의 동작

최적의 사용 환경: 암호화폐 주류 통화 ((BTC/ETH), 1~4시간 시간 프레임, 트렌드 명확한 상황. 예상 연간 수익률은 황시에서 30~50%에 달할 수 있지만, 곰시에서 15~25%의 회수와 마주할 수 있다.

적용되지 않는 시나리오: 흔들리는 시장, 낮은 변동률 환경, 15분 이하의 고주파 거래. 전통적인 주식 시장은 변동률이 낮기 때문에 신호 주파수가 현저하게 감소하여 직접 활용하는 것은 권장하지 않습니다.

실전 추천: 위험 요소를 낮추고 필터링 조건을 높여라

  1. 단위 위험은 1.5%에서 1.0%로 낮춰졌고, 일일 위험 제한은 6%에서 4%로 낮춰졌다.
  2. ATR 변동율 필터를 추가: ATR이 20일 평균보다 높을 때만 포지션을 개시
  3. 대차 트렌드 필터 추가: 일간 EMA200 방향이 일치할 때만 거래
  4. IDM 검사를 최적화: 거래량을 늘려 확인 조건을 확대

기억하세요: 역사적인 회귀는 미래의 수익을 나타내지 않습니다. 이 전략은 시장 환경의 차이에 따라 매우 다양하게 작동하며, 엄격한 위험 관리와 주기적인 매개 변수 최적화가 필요합니다.

전략 소스 코드
/*backtest
start: 2024-12-21 00:00:00
end: 2025-12-20 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/

//@version=6
strategy("Liquidity Maxing: Institutional Liquidity Matrix", shorttitle="LIQMAX", overlay=true)

// =============================================================================
// 1. TYPE DEFINITIONS 
// =============================================================================

type Pivot
    float price
    int index
    bool isHigh

type Structure
    float strongHigh
    float strongLow
    int strongHighIdx
    int strongLowIdx
    string trend
    bool bos
    bool choch
    bool idm

// =============================================================================
// 2. INPUTS
// =============================================================================

// --- Market Structure ---
grp_struct = "Market Structure"
int pivotLen = input.int(5, "Pivot Length", minval=1, group=grp_struct)
bool useIdm = input.bool(true, "Filter by Inducement (IDM)", group=grp_struct)

// --- Risk Management ---
grp_risk = "Risk Management"
float riskReward = input.float(2.0, "Risk:Reward Ratio", step=0.1, group=grp_risk)
int atrPeriod = input.int(14, "ATR Period", group=grp_risk)
float atrMult = input.float(2.0, "ATR Multiplier (Stop)", step=0.1, group=grp_risk)
float maxDrawdown = input.float(10.0, "Max Drawdown (%)", group=grp_risk)
float riskPerTrade = input.float(1.5, "Risk per Trade (%)", minval=0.1, maxval=10, step=0.1, group=grp_risk)
float dailyRiskLimit = input.float(6.0, "Daily Risk Limit (%)", minval=1.0, step=0.5, group=grp_risk)
float weeklyRiskLimit = input.float(12.0, "Weekly Risk Limit (%)", minval=2.0, step=0.5, group=grp_risk)
float minPositionPercent = input.float(0.25, "Min Position Size (%)", minval=0.1, step=0.05, group=grp_risk)
float maxPositionPercent = input.float(5.0, "Max Position Size (%)", minval=0.5, step=0.5, group=grp_risk)
int correlationBars = input.int(3, "Correlation Cooldown (bars)", minval=0, group=grp_risk)
bool killSwitch = input.bool(false, "Emergency Kill Switch", group=grp_risk)

// --- Confluence Filters ---
grp_filter = "Confluence Filters"
int rsiLen = input.int(14, "RSI Length", group=grp_filter)
float rsiOb = input.float(70.0, "RSI Overbought", group=grp_filter)
float rsiOs = input.float(30.0, "RSI Oversold", group=grp_filter)
int emaLen = input.int(50, "Trend EMA", group=grp_filter)
string htfTf = input.timeframe("D", "HTF Timeframe", group=grp_filter)
float volMult = input.float(1.2, "Volume Multiplier", step=0.1, group=grp_filter)
bool allowWeekends = input.bool(true, "Allow Weekend Trading", group=grp_filter)
int confThreshold = input.int(6, "Min Confluence Score (0-8)", minval=1, maxval=8, group=grp_filter)

// =============================================================================
// 3. HELPER FUNCTIONS
// =============================================================================

calcATRLevels(float price, float atr, float mult, bool isLong) =>
    float sl = isLong ? price - (atr * mult) : price + (atr * mult)
    float tp = isLong ? price + (atr * mult * riskReward) : price - (atr * mult * riskReward)
    [sl, tp]

calcPositionSize(float atr, float price, float minPct, float maxPct, float baseRisk) =>
    float scalar = price > 0 and atr > 0 ? atr / price : 0.0
    float adjustedRiskPct = scalar > 0 ? baseRisk / (scalar * 10) : baseRisk
    float finalRiskPct = math.max(minPct, math.min(maxPct, adjustedRiskPct))
    
    float equity = strategy.equity
    float dollarAmount = equity * (finalRiskPct / 100.0)
    float qty = price > 0 ? dollarAmount / price : 0.0
    qty  

isSessionAllowed(bool allowWknd) =>
    bool weekend = dayofweek == dayofweek.saturday or dayofweek == dayofweek.sunday
    allowWknd ? true : not weekend

// =============================================================================
// 4. STATE VARIABLES
// =============================================================================

var Structure mStruct = Structure.new(na, na, 0, 0, "neutral", false, false, false)
var Pivot lastHigh = Pivot.new(na, na, true)
var Pivot lastLow = Pivot.new(na, na, false)

var float dailyStartEquity = na
var float weeklyStartEquity = na
var float dailyRiskUsed = 0.0
var float weeklyRiskUsed = 0.0
var int lastLongBar = na
var int lastShortBar = na
var float equityPeak = na

// Initialize
if bar_index == 0
    dailyStartEquity := strategy.equity
    weeklyStartEquity := strategy.equity
    equityPeak := strategy.equity

// Reset tracking
if ta.change(time("D")) != 0
    dailyStartEquity := strategy.equity
    dailyRiskUsed := 0.0

if ta.change(time("W")) != 0
    weeklyStartEquity := strategy.equity
    weeklyRiskUsed := 0.0

if na(equityPeak) or strategy.equity > equityPeak
    equityPeak := strategy.equity

// =============================================================================
// 5. MARKET STRUCTURE DETECTION(1)
// =============================================================================

// Pivot Detection
float ph = ta.pivothigh(high, pivotLen, pivotLen)
float pl = ta.pivotlow(low, pivotLen, pivotLen)

if not na(ph)
    lastHigh.price := ph
    lastHigh.index := bar_index - pivotLen

if not na(pl)
    lastLow.price := pl
    lastLow.index := bar_index - pivotLen

// Structure Breaks
bool bullCross = ta.crossover(close, lastHigh.price)
bool bearCross = ta.crossunder(close, lastLow.price)
bool isBullishBreak = not na(lastHigh.price) and bullCross
bool isBearishBreak = not na(lastLow.price) and bearCross

mStruct.bos := false
mStruct.choch := false

// =============================================================================
// 6. MARKET STRUCTURE DETECTION(2)
// =============================================================================

// Bullish Break
if isBullishBreak
    if mStruct.trend == "bearish"
        mStruct.choch := true
        mStruct.trend := "bullish"
    else
        mStruct.bos := true
        mStruct.trend := "bullish"
    mStruct.strongLow := lastLow.price
    mStruct.strongLowIdx := lastLow.index

// Bearish Break
if isBearishBreak
    if mStruct.trend == "bullish"
        mStruct.choch := true
        mStruct.trend := "bearish"
    else
        mStruct.bos := true
        mStruct.trend := "bearish"
    mStruct.strongHigh := lastHigh.price
    mStruct.strongHighIdx := lastHigh.index

// IDM (Inducement) Detection
float swingLowPrev = ta.lowest(low, 3)[1]
float swingHighPrev = ta.highest(high, 3)[1]
bool idmBullish = mStruct.trend == "bullish" and not na(swingLowPrev) and low < swingLowPrev and close > swingLowPrev
bool idmBearish = mStruct.trend == "bearish" and not na(swingHighPrev) and high > swingHighPrev and close < swingHighPrev
mStruct.idm := idmBullish or idmBearish

// =============================================================================
// 7. CONFLUENCE ENGINE (8 Factors)
// =============================================================================

// Technical Indicators
float rsi = ta.rsi(close, rsiLen)
float ema = ta.ema(close, emaLen)
[macdLine, sigLine, _] = ta.macd(close, 12, 26, 9)
float volAvg = ta.sma(volume, 20)
float baseAtr = ta.atr(atrPeriod)
float atr = baseAtr
float htfEma = request.security(syminfo.tickerid, htfTf, ta.ema(close, emaLen), gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
bool sessionOk = isSessionAllowed(allowWeekends)

// Confluence Checks (8 Factors)
bool c1_trend = (mStruct.trend == "bullish" and close > ema) or (mStruct.trend == "bearish" and close < ema)
bool c2_rsi = (mStruct.trend == "bullish" and rsi > 40 and rsi < rsiOb) or (mStruct.trend == "bearish" and rsi < 60 and rsi > rsiOs)
bool c3_macd = (mStruct.trend == "bullish" and macdLine > sigLine) or (mStruct.trend == "bearish" and macdLine < sigLine)
bool c4_volume = volume > (volAvg * volMult)
bool c5_htf = (mStruct.trend == "bullish" and close >= htfEma) or (mStruct.trend == "bearish" and close <= htfEma)
bool c6_session = sessionOk
bool c7_volatility = baseAtr > baseAtr[1]
bool c8_structure = mStruct.bos or mStruct.choch

// Calculate Score
int score = (c1_trend ? 1 : 0) + (c2_rsi ? 1 : 0) + (c3_macd ? 1 : 0) + (c4_volume ? 1 : 0) + (c5_htf ? 1 : 0) + (c6_session ? 1 : 0) + (c7_volatility ? 1 : 0) + (c8_structure ? 1 : 0)

// =============================================================================
// 8. RISK MANAGEMENT
// =============================================================================

// Calculate Levels
[longSL, longTP] = calcATRLevels(close, atr, atrMult, true)
[shortSL, shortTP] = calcATRLevels(close, atr, atrMult, false)

// Drawdown Tracking
float globalDD = equityPeak > 0 ? (equityPeak - strategy.equity) / equityPeak * 100 : 0.0
float dailyDD = dailyStartEquity > 0 ? (dailyStartEquity - strategy.equity) / dailyStartEquity * 100 : 0.0
float weeklyDD = weeklyStartEquity > 0 ? (weeklyStartEquity - strategy.equity) / weeklyStartEquity * 100 : 0.0

// Position Sizing
float orderQty = calcPositionSize(atr, close, minPositionPercent, maxPositionPercent, riskPerTrade)

// Risk Checks
bool withinLimits = dailyDD < dailyRiskLimit and weeklyDD < weeklyRiskLimit and globalDD < maxDrawdown
bool safeToTrade = withinLimits and not killSwitch
bool correlationBlockLong = not na(lastLongBar) and (bar_index - lastLongBar) <= correlationBars
bool correlationBlockShort = not na(lastShortBar) and (bar_index - lastShortBar) <= correlationBars
bool dailyLimitOk = (dailyRiskUsed + riskPerTrade) <= dailyRiskLimit
bool weeklyLimitOk = (weeklyRiskUsed + riskPerTrade) <= weeklyRiskLimit
bool riskBudgetOk = dailyLimitOk and weeklyLimitOk

// =============================================================================
// 9. ENTRY SIGNALS
// =============================================================================

// Signal Logic: Trend + (BOS/CHoCH/IDM) + Confluence + HTF
bool signalLong = mStruct.trend == "bullish" and (mStruct.bos or mStruct.choch or (useIdm and idmBullish)) and score >= confThreshold and c5_htf
bool signalShort = mStruct.trend == "bearish" and (mStruct.bos or mStruct.choch or (useIdm and idmBearish)) and score >= confThreshold and c5_htf

// Final Entry Conditions
bool allowLong = signalLong and strategy.position_size == 0 and safeToTrade and not correlationBlockLong and riskBudgetOk and orderQty > 0
bool allowShort = signalShort and strategy.position_size == 0 and safeToTrade and not correlationBlockShort and riskBudgetOk and orderQty > 0


if allowLong
    strategy.entry("Long", strategy.long, qty=orderQty, comment="LIQMAX LONG")
    strategy.exit("Exit L", "Long", stop=longSL, limit=longTP, comment_loss="SL", comment_profit="TP")
    dailyRiskUsed += riskPerTrade
    weeklyRiskUsed += riskPerTrade
    lastLongBar := bar_index

if allowShort
    strategy.entry("Short", strategy.short, qty=orderQty, comment="LIQMAX SHORT")
    strategy.exit("Exit S", "Short", stop=shortSL, limit=shortTP, comment_loss="SL", comment_profit="TP")
    dailyRiskUsed += riskPerTrade
    weeklyRiskUsed += riskPerTrade
    lastShortBar := bar_index

// =============================================================================
// 10. VISUALIZATION (Optional - 可选启用)
// =============================================================================

// 绘制市场结构水平线
plot(mStruct.strongHigh, "Strong High", color=color.red, linewidth=1, style=plot.style_linebr)
plot(mStruct.strongLow, "Strong Low", color=color.green, linewidth=1, style=plot.style_linebr)

// 绘制趋势 EMA
plot(ema, "Trend EMA", color=color.new(color.blue, 50), linewidth=2)

// 背景颜色标记风险状态
bgcolor(not safeToTrade ? color.new(color.red, 90) : na, title="Risk Alert")
bgcolor(score >= confThreshold ? color.new(color.green, 95) : na, title="High Confluence")

// 标记入场信号
plotshape(allowLong, "Long Signal", shape.triangleup, location.belowbar, color.green, size=size.small)
plotshape(allowShort, "Short Signal", shape.triangledown, location.abovebar, color.red, size=size.small)