OPEN-SOURCE SCRIPT
更新済 CRMI v6 BETA

CRMI v6 BETA (Refined Version) with all the upgrades applied:
✅ Impulse strength filter
✅ Reduced trade frequency
✅ Hybrid tightened
✅ Anti-chop applied to FAST + HYBRID
✅ Distance-from-equilibrium filter
✅ Cleaner execution behavior
A. Higher Timeframe Bias Engine (CRITICAL for LONG)
Use HTF (1H / 4H) to define:
Trend direction
Strength
Structure (HH/HL or LH/LL)
Outputs:
htf_bias = BULL / BEAR / NEUTRAL
htf_strength = 0 → 1
👉 LONG mode MUST depend heavily on this.
B. Liquidity + Sweep Detection (Keep from v6 Alpha)
Identify:
Equal highs/lows
Previous session highs/lows
Stop clusters
Outputs:
liquidity_swept = true/false
sweep_direction = up/down
C. Momentum / Displacement Engine
Detect real moves vs noise
Use:
Candle expansion
Volume spike
ATR expansion
Outputs:
impulse_detected = true/false
impulse_strength = 0 → 1
D. Anti-Chop Filter (NEW — VERY IMPORTANT)
This fixes FAST + HYBRID issues.
Detect:
Low ATR
EMA compression
No structure breaks
Outputs:
market_state = TRENDING / CHOPPY
👉 If CHOPPY → restrict entries heavily
⚙️ 2. MODE EXECUTION LAYER (REWRITE THIS)
Now modes become behavior profiles, not separate logic.
⚡ FAST MODE = “Trade the Move”
Needs:
impulse_detected = true
liquidity sweep optional
Ignores HTF bias partially
Behavior:
Quick entries
Tight SL
Fast TP
Short hold
Fix from your observation:
👉 Add minimum hold bars (3–8 candles) to stop micro-scalping spam
🧠 LONG MODE = “Trade the Thesis” (MOST IMPORTANT)
Only enter if:
HTF bias aligned
Liquidity sweep confirms direction
Market NOT choppy
Behavior:
Wider SL
Hold longer
Trail based on structure, NOT price ticks
NEW:
👉 Add Thesis Lock
Once in trade → ignore small pullbacks
Exit ONLY if:
HTF bias flips
Structure breaks
🔁 HYBRID MODE = “Sniper + Runner”
Fix inconsistency by splitting position:
Entry = same as FAST (good timing)
Then:
50% = FAST TP
50% = LONG hold
👉 This alone will stabilize HYBRID massively
🧩 3. SMART RE-ENTRY MEMORY (NEW EDGE)
This is what most retail systems DON’T have.
Track:
last_trade_direction
last_trade_result (win/loss)
last_entry_zone
Logic:
If stopped out BUT bias still valid → allow re-entry
If 2 losses in chop → pause trading
🛡️ 4. TRADE FILTER STACK (FINAL LAYER)
Only allow trades if:
NOT CHOPPY
AND (impulse_detected OR liquidity_swept)
AND HTF alignment (for LONG / HYBRID runner)
🎯 5. EXPECTED RESULTS AFTER BETA
FAST → fewer but cleaner trades
LONG → higher win rate + bigger RR
HYBRID → becomes your best mode overall
✅ Impulse strength filter
✅ Reduced trade frequency
✅ Hybrid tightened
✅ Anti-chop applied to FAST + HYBRID
✅ Distance-from-equilibrium filter
✅ Cleaner execution behavior
A. Higher Timeframe Bias Engine (CRITICAL for LONG)
Use HTF (1H / 4H) to define:
Trend direction
Strength
Structure (HH/HL or LH/LL)
Outputs:
htf_bias = BULL / BEAR / NEUTRAL
htf_strength = 0 → 1
👉 LONG mode MUST depend heavily on this.
B. Liquidity + Sweep Detection (Keep from v6 Alpha)
Identify:
Equal highs/lows
Previous session highs/lows
Stop clusters
Outputs:
liquidity_swept = true/false
sweep_direction = up/down
C. Momentum / Displacement Engine
Detect real moves vs noise
Use:
Candle expansion
Volume spike
ATR expansion
Outputs:
impulse_detected = true/false
impulse_strength = 0 → 1
D. Anti-Chop Filter (NEW — VERY IMPORTANT)
This fixes FAST + HYBRID issues.
Detect:
Low ATR
EMA compression
No structure breaks
Outputs:
market_state = TRENDING / CHOPPY
👉 If CHOPPY → restrict entries heavily
⚙️ 2. MODE EXECUTION LAYER (REWRITE THIS)
Now modes become behavior profiles, not separate logic.
⚡ FAST MODE = “Trade the Move”
Needs:
impulse_detected = true
liquidity sweep optional
Ignores HTF bias partially
Behavior:
Quick entries
Tight SL
Fast TP
Short hold
Fix from your observation:
👉 Add minimum hold bars (3–8 candles) to stop micro-scalping spam
🧠 LONG MODE = “Trade the Thesis” (MOST IMPORTANT)
Only enter if:
HTF bias aligned
Liquidity sweep confirms direction
Market NOT choppy
Behavior:
Wider SL
Hold longer
Trail based on structure, NOT price ticks
NEW:
👉 Add Thesis Lock
Once in trade → ignore small pullbacks
Exit ONLY if:
HTF bias flips
Structure breaks
🔁 HYBRID MODE = “Sniper + Runner”
Fix inconsistency by splitting position:
Entry = same as FAST (good timing)
Then:
50% = FAST TP
50% = LONG hold
👉 This alone will stabilize HYBRID massively
🧩 3. SMART RE-ENTRY MEMORY (NEW EDGE)
This is what most retail systems DON’T have.
Track:
last_trade_direction
last_trade_result (win/loss)
last_entry_zone
Logic:
If stopped out BUT bias still valid → allow re-entry
If 2 losses in chop → pause trading
🛡️ 4. TRADE FILTER STACK (FINAL LAYER)
Only allow trades if:
NOT CHOPPY
AND (impulse_detected OR liquidity_swept)
AND HTF alignment (for LONG / HYBRID runner)
🎯 5. EXPECTED RESULTS AFTER BETA
FAST → fewer but cleaner trades
LONG → higher win rate + bigger RR
HYBRID → becomes your best mode overall
リリースノート
After this version:📉 Trade Frequency
Noticeably reduced ✅
Especially in HYBRID & FAST
🎯 Trade Quality
Stronger entries (impulse + displacement)
Less noise trades
🧠 Mode Behavior
LONG → still dominant
HYBRID → more stable now
FAST → no longer spamming
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。