多次元トレンド捕捉マシン


作成日: 2026-03-17 11:43:45 最終変更日: 2026-03-17 11:43:45
コピー: 13 クリック数: 179
2
フォロー
451
フォロワー

多次元トレンド捕捉マシン 多次元トレンド捕捉マシン

EMA, ATR, MOMENTUM, EFFICIENCY, BREAKOUT

これは普通の三等線戦略ではなく,多次元的なトレンドキャプチャマシンです.

表面上の18/50/120三均線設定に騙されないでください. この戦略の核心は,8つの独立した次元でトレンド検証システムであり,各次元には明確な数値基準があります. 単純な金叉のデッドフォークではなく,重量付けのスコアメカニズム ((最低5.0ポイント入場,2.5ポイント以下出場) によってトレンドの質を判断します.

伝統的な均線戦略の問題は,偽信号が多すぎることであり,このシステムは,経路効率 ((最低33%),動力の持続性 ((K線比が57%以上上昇),波動率状態 ((ATR比が95%以上) などを複数フィルターすることで,入場成功率を新たなレベルに引き上げている.

質量検定の突破点:0.15倍ATRが本当の突破点である

市場におけるブレイクの90%は偽ブレイクである.この戦略では,ブレイクの強さが0.15倍ATRに達しなければならない.これは,近期平均波動の15%を超えるブレイクの幅が有効な信号と認められることを意味する.

調整再獲得のメカニズムはより精巧です. 価格が速線から少なくとも0.9倍ATRの深さでの調整を要求し,その後,平均線に戻ると0.15倍ATRの強さに達します. このデザインは,浅層の偽突破を効果的にフィルターし,本当に資金があるトレンドの起動のみを捕捉します.

2倍レバレッジ+2.8倍ATR ストップ・ロスを追跡するリスクコントロールの論理

2倍のレバレッジ設定は激進的に見えますが,2%のハードストップと2.8倍のATRのダイナミック・トラッキングと組み合わせると,実際のリスクは制御できます.さらに重要なことは20.8倍のATRの利潤ロックメカニズムで,浮動がこのレベルに達すると自動的にストップ・ロスを上昇させ,大トレンドの利潤が反転しないことを保証します.

強制保持1つの完全なK線設計は高周波の出入を防止し,5つのK線の冷却期は,感情的な連続取引を回避する.この節奏制御は,純粋な技術指標よりも重要である.

3つのエントリーモードが異なる市場状態をカバーする

トレンド継続入場:確立された強気なトレンドに適用し,突破+傾き+効率+動力の全達成を要求する. 調整再入場:健康なトレンドに対する調整,十分な深さと力を取り戻す要求する. 早期トレンド入場:トレンド転換の黄金14根K線ウィンドウ期を捕捉する.

この複数モードのデザインの利点は,あらゆる種類のトレンドの機会を逃さないことであり,それぞれのモードには厳格な品質基準があります. 広範囲の網ではなく,精密の狙撃です.

効率の指標は,最も過小評価されているトレンドの品質判断ツールです.

経路効率は,18周期間の純位移と累積位移の比率を計算し,33%未満のトレンドは一貫して接触しない.この指標は,振動的な状況における偽のトレンドを効果的に識別し,横断市場で繰り返し止損を回避する.

動力の持続性には57%以上のK線の収束が求められ,12周期の動力に対応する場合は正である必要があります.この二重検証は,価格の表面的な突破ではなく,トレンドの内在的な強さを保証します.

適用性分析:万能策ではないが,トレンドマーケットで優れている

この戦略は明らかにトレンド市場を偏っており,変動状況で頻繁に出場シグナルを誘発する.ATR状態が80%以下で,効率が25%以下であるときに出場を強制する設計は,戦略が市場環境に明確な要求を持っていることを示している.

最大のリスクは,トレンド転換期における遅滞性であり,急速なEMA交差などの早期警告があるにもかかわらず,急速な逆転では依然として大きな引き下がりが起こり得る. 変動率が高い成長株または暗号通貨市場で使用することを推奨し,大盤ブルーチップなどの低変動品種に適用することを避ける.

リスクヒント: 過去の反転は将来の利益を意味しない. 戦略には連続した損失のリスクがあり,リスク管理を厳格に実行する必要があります. 異なる市場環境でパフォーマンスの違いは顕著です.

ストラテジーソースコード
/*backtest
start: 2026-01-07 15:30:00
end: 2026-03-15 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"XAG_USDT","balance":500000}]
*/

//@version=5
strategy("Quant Trend Engine Long Only v2 - Manual Leverage Fixed", overlay=true)

// === Core lengths ===
fastLen = input.int(18, "Fast EMA")
midLen = input.int(50, "Mid EMA")
slowLen = input.int(120, "Slow EMA")
smoothLen = input.int(3, "EMA Smoothing")
pullbackLen = input.int(8, "Pullback Lookback")
breakoutLen = input.int(20, "Breakout Length")
effLen = input.int(18, "Efficiency Length")
persistLen = input.int(7, "Persistence Length")
momLen = input.int(12, "Momentum Length")
slopeLen = input.int(10, "Slope Length")
atrLen = input.int(14, "ATR Length")
atrBaseLen = input.int(40, "ATR Baseline Length")

// === Thresholds ===
minScore = input.float(5.0, "Minimum Entry Score", step=0.25)
exitScore = input.float(2.5, "Weak Trend Exit Score", step=0.25)
minSepPerc = input.float(0.30, "Min EMA Separation %", step=0.05)
minSlowSlopePerc = input.float(0.03, "Min Slow Slope %", step=0.01)
minEff = input.float(0.33, "Min Efficiency", step=0.01)
minAtrRegime = input.float(0.95, "Min ATR Regime", step=0.05)
minBreakoutAtr = input.float(0.15, "Min Breakout ATR Strength", step=0.05)
pullbackAtrMult = input.float(0.90, "Pullback Distance ATR", step=0.05)
reclaimAtrMult = input.float(0.15, "Reclaim Distance ATR", step=0.05)
cooldownBars = input.int(5, "Cooldown Bars After Exit")

// === Risk ===
leverage = input.float(2.0, "Leverage", step=0.1, minval=0.1)
hardStopPerc = input.float(2.0, "Hard Stop %", step=0.1)
trailAtrMult = input.float(2.8, "ATR Trail Mult", step=0.1)
profitLockAtrMult = input.float(20.8, "Profit Lock ATR Mult", step=0.1)

// === Smoothed EMAs ===
fast = ta.ema(ta.ema(close, fastLen), smoothLen)
mid = ta.ema(ta.ema(close, midLen), smoothLen)
slow = ta.ema(ta.ema(close, slowLen), smoothLen)

// === Regime structure ===
bullStack = fast > mid and mid > slow
sepPerc = slow != 0 ? math.abs(fast - slow) / slow * 100 : 0.0
sepOk = sepPerc >= minSepPerc

fastSlope = fast[slopeLen] != 0 ? (fast - fast[slopeLen]) / fast[slopeLen] * 100 : 0.0
midSlope = mid[slopeLen] != 0 ? (mid - mid[slopeLen]) / mid[slopeLen] * 100 : 0.0
slowSlope = slow[slopeLen] != 0 ? (slow - slow[slopeLen]) / slow[slopeLen] * 100 : 0.0
slopeOk = slowSlope >= minSlowSlopePerc and midSlope > 0 and fastSlope > 0

// === Path efficiency ===
netMove = math.abs(close - close[effLen])
stepMove = 0.0
for i = 1 to effLen
    stepMove += math.abs(close[i - 1] - close[i])
efficiency = stepMove != 0 ? netMove / stepMove : 0.0
effOk = efficiency >= minEff

// === Momentum persistence ===
upBars = 0.0
for i = 0 to persistLen - 1
    upBars += close[i] > close[i + 1] ? 1 : 0
persistRatio = persistLen > 0 ? upBars / persistLen : 0.0
momRaw = close[momLen] != 0 ? (close - close[momLen]) / close[momLen] * 100 : 0.0
momOk = momRaw > 0 and persistRatio >= 0.57

// === Volatility regime ===
atr = ta.atr(atrLen)
atrBase = ta.sma(atr, atrBaseLen)
atrRegime = atrBase != 0 ? atr / atrBase : 0.0
atrOk = atrRegime >= minAtrRegime

// === Breakout quality ===
hh = ta.highest(high, breakoutLen)[1]
breakoutDist = close - hh
breakoutStrength = atr != 0 ? breakoutDist / atr : 0.0
breakoutOk = close > hh and breakoutStrength >= minBreakoutAtr

// === Pullback / reclaim logic ===
pullbackLow = ta.lowest(low, pullbackLen)
distFromFastAtr = atr != 0 ? (fast - pullbackLow) / atr : 0.0
deepEnoughPullback = distFromFastAtr >= pullbackAtrMult
reclaimFast = close > fast and close[1] <= fast[1]
reclaimMid = close > mid and close[1] <= mid[1]
reclaimStrength = atr != 0 ? (close - fast) / atr : 0.0
reclaimOk = (reclaimFast or reclaimMid) and reclaimStrength >= reclaimAtrMult

// === Transition memory ===
bullCross = ta.crossover(fast, mid) or ta.crossover(fast, slow) or ta.crossover(mid, slow)
barsSinceBullCross = ta.barssince(bullCross)
recentTrendBirth = barsSinceBullCross >= 0 and barsSinceBullCross <= 14

// === Weighted score ===
trendScore = 0.0
trendScore += bullStack ? 1.50 : 0.0
trendScore += sepOk ? 0.90 : 0.0
trendScore += slopeOk ? 1.10 : 0.0
trendScore += effOk ? 1.00 : 0.0
trendScore += atrOk ? 0.80 : 0.0
trendScore += momOk ? 1.00 : 0.0
trendScore += breakoutOk ? 1.25 : 0.0
trendScore += reclaimOk ? 1.10 : 0.0

// === Entry models ===
trendContinuationEntry = bullStack and breakoutOk and slopeOk and effOk and momOk
pullbackReentry = bullStack and sepOk and slopeOk and deepEnoughPullback and reclaimOk and effOk
earlyTrendEntry = recentTrendBirth and bullStack and sepOk and slopeOk and atrOk and momOk

// === Cooldown ===
var int lastExitBar = na
cooldownOk = na(lastExitBar) or bar_index - lastExitBar > cooldownBars

// === Final entry ===
enterLong = strategy.position_size == 0 and cooldownOk and trendScore >= minScore and close > slow and (trendContinuationEntry or pullbackReentry or earlyTrendEntry)

// === Manual leveraged sizing only ===
equity = math.max(strategy.equity, 0)
positionValue = equity * leverage
qty = positionValue > 0 ? positionValue / (close * syminfo.pointvalue) : 0.0

// === Entry tracking / mandatory 1 full candle hold ===
var int entryBarIndex = na
justOpened = strategy.position_size > 0 and strategy.position_size[1] == 0
if justOpened
    entryBarIndex := bar_index

canExitNow = strategy.position_size > 0 and not na(entryBarIndex) and bar_index > entryBarIndex

// === Entry order ===
if enterLong and qty > 0
    strategy.entry("Long", strategy.long, qty=qty)

// === Risk logic ===
hardStopPrice = strategy.position_size > 0 ? strategy.position_avg_price * (1 - hardStopPerc / 100) : na

var float trailStop = na
var float highSinceEntry = na
highSinceEntry := strategy.position_size > 0 ? (na(highSinceEntry) ? high : math.max(highSinceEntry, high)) : na

rawTrail = strategy.position_size > 0 ? close - atr * trailAtrMult : na
profitLock = strategy.position_size > 0 ? highSinceEntry - atr * profitLockAtrMult : na
combinedTrail = strategy.position_size > 0 ? math.max(rawTrail, profitLock) : na
trailStop := strategy.position_size > 0 ? (na(trailStop) ? combinedTrail : math.max(trailStop, combinedTrail)) : na

// === Exit logic ===
bearCross = ta.crossunder(fast, mid) or ta.crossunder(fast, slow)
structureBreak = close < mid and fast < mid
scoreWeak = trendScore <= exitScore
momentumFailure = persistRatio < 0.40 and momRaw < 0
regimeFailure = atrRegime < 0.80 and efficiency < 0.25

exitLong = strategy.position_size > 0 and canExitNow and (bearCross or structureBreak or scoreWeak or momentumFailure or regimeFailure)

// Only allow stop/trailing exits after 1 full candle has passed
if strategy.position_size > 0 and canExitNow
    strategy.exit("Risk Exit", from_entry="Long", stop=math.max(hardStopPrice, trailStop))

justClosed = strategy.position_size[1] > 0 and strategy.position_size == 0
if justClosed
    lastExitBar := bar_index
    trailStop := na
    highSinceEntry := na
    entryBarIndex := na

if exitLong
    strategy.close("Long")

// === Plots ===
plot(fast, color=color.green, linewidth=2, title="Fast EMA")
plot(mid, color=color.orange, linewidth=2, title="Mid EMA")
plot(slow, color=color.red, linewidth=2, title="Slow EMA")
plot(strategy.position_size > 0 ? trailStop : na, color=color.blue, linewidth=2, title="Adaptive Trail")
plot(trendScore, title="Trend Score", color=color.aqua)
plot(efficiency, title="Efficiency", color=color.fuchsia)
plot(atrRegime, title="ATR Regime", color=color.yellow)
plot(breakoutStrength, title="Breakout Strength", color=color.lime)
plot(persistRatio, title="Persistence Ratio", color=color.white)