124 lines
4.9 KiB
Markdown
124 lines
4.9 KiB
Markdown
|
|
---
|
||
|
|
noteId: "278028a005a111f1af33fb18ab0fc1c3"
|
||
|
|
tags: []
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# SMC Narrative v1.7 (Liquidity Hunter) - Changelog
|
||
|
|
|
||
|
|
## Overview
|
||
|
|
This update transforms the strategy from v1.6 (Sniper Logic) to v1.7 (Liquidity Hunter) by implementing more sophisticated runner management and structural filters.
|
||
|
|
|
||
|
|
## Key Changes
|
||
|
|
|
||
|
|
### 1. **M15 Structure Shift (CHoCH Detection)**
|
||
|
|
- **Previous**: Used M5 for execution and CHoCH detection
|
||
|
|
- **New**: Uses M15 timeframe for CHoCH signals
|
||
|
|
- **Benefit**: Filters out ~70% of "fake" reversals that occur inside H4 POI
|
||
|
|
- **Implementation**:
|
||
|
|
- New input: `ltfTf = input.timeframe("15", "LTF (Execution Timeframe)")`
|
||
|
|
- CHoCH detection now uses M15 pivots via `request.security(syminfo.tickerid, ltfTf, f_ltfStructure())`
|
||
|
|
|
||
|
|
### 2. **"Lox-In" Breakeven Logic**
|
||
|
|
- **Previous**: Immediately started ATR trailing after TP1 hit
|
||
|
|
- **New**: Moves SL to Entry + 0.5R (breakeven lock) instead of ATR trail
|
||
|
|
- **Implementation**:
|
||
|
|
```
|
||
|
|
if not tp1LongHit and high >= longTp1:
|
||
|
|
runnerSlLong := longEntry + (longSlDist * 0.5)
|
||
|
|
```
|
||
|
|
- **Benefit**: Prevents "strangle" effect and protects profits while allowing runner to reach HTF liquidity
|
||
|
|
|
||
|
|
### 3. **No-Strangle ATR Trail (4R Threshold)**
|
||
|
|
- **Previous**: ATR trail started at 3R
|
||
|
|
- **New**: ATR trail only activates after price reaches 4R profit
|
||
|
|
- **Implementation**:
|
||
|
|
```
|
||
|
|
if tp1LongHit and high >= (strategy.position_avg_price + (slDist * 4.0)):
|
||
|
|
runnerSlLong := math.max(runnerSlLong, low - (atrTrail * 2.5))
|
||
|
|
```
|
||
|
|
- **Benefit**: Gives the runner space to reach external HTF liquidity without being stopped out prematurely
|
||
|
|
|
||
|
|
### 4. **Daily Bias Filter (HTF Swing Filter)**
|
||
|
|
- **Previous**: No Daily check; could trade corrections on H4 while D1 crashing
|
||
|
|
- **New**: Only takes Longs if Daily candle is bullish; Shorts if Daily is bearish
|
||
|
|
- **Implementation**:
|
||
|
|
```
|
||
|
|
f_dailyBias() =>
|
||
|
|
d1Bullish = close > open
|
||
|
|
d1Bearish = close < open
|
||
|
|
|
||
|
|
validLong = chochLong and isVolSpike and isDisplaced and vfiLong and (not useD1Filter or d1Bullish)
|
||
|
|
validShort = chochShort and isVolSpike and isDisplaced and vfiShort and (not useD1Filter or d1Bearish)
|
||
|
|
```
|
||
|
|
- **Benefit**: Ensures you're not trading corrections; alignsLTF trades with HTF bias
|
||
|
|
|
||
|
|
### 5. **Hard Target for Runner (HTF Liquidity Limit Orders)**
|
||
|
|
- **Previous**: Runner exit was only stop-based; no profit targets
|
||
|
|
- **New**: Sets limit orders at External HTF Liquidity levels
|
||
|
|
- **Implementation**:
|
||
|
|
```
|
||
|
|
// Long runner
|
||
|
|
strategy.exit("Runner Long", "Long", stop=longStop, limit=htfLiqHigh)
|
||
|
|
|
||
|
|
// Short runner
|
||
|
|
strategy.exit("Runner Short", "Short", stop=shortStop, limit=htfLiqLow)
|
||
|
|
```
|
||
|
|
- **Benefit**: Captures full runner extension to HTF swing highs/lows instead of random ATR trail exits
|
||
|
|
|
||
|
|
## Position State Management Changes
|
||
|
|
|
||
|
|
### New Variables (v1.7)
|
||
|
|
- `runnerSlLong` / `runnerSlShort`: Tracks the runner SL (Lox-In breakeven, then ATR trail after 4R)
|
||
|
|
- Variables now use `request.security()` with `ltfTf` instead of hardcoded M5
|
||
|
|
|
||
|
|
### Entry Logic (Unchanged Core)
|
||
|
|
- Entries still require: CHOCH + Volume Spike + Displacement + VFI + **NEW: Daily Bias**
|
||
|
|
|
||
|
|
### Exit Logic (Completely Rewritten)
|
||
|
|
**Long Position Flow**:
|
||
|
|
1. TP1 (2R) triggered → Sell 50% at limit
|
||
|
|
2. TP1 hit → Move runner SL to Entry + 0.5R (Lox-In)
|
||
|
|
3. Price reaches 4R → Start ATR trailing from there
|
||
|
|
4. Runner exits at either: Stop (SL) or Limit (htfLiqHigh)
|
||
|
|
|
||
|
|
**Short Position Flow**:
|
||
|
|
1. TP1 (-2R) triggered → Sell 50% at limit
|
||
|
|
2. TP1 hit → Move runner SL to Entry - 0.5R (Lox-In)
|
||
|
|
3. Price reaches -4R → Start ATR trailing from there
|
||
|
|
4. Runner exits at either: Stop (SL) or Limit (htfLiqLow)
|
||
|
|
|
||
|
|
## Configuration Updates
|
||
|
|
|
||
|
|
### New Inputs
|
||
|
|
- `ltfTf`: LTF Execution Timeframe (default: "15" for M15)
|
||
|
|
- `useD1Filter`: Enable/disable Daily bias filter (default: true)
|
||
|
|
- `d1PivotLen`: Daily pivot length (default: 2)
|
||
|
|
|
||
|
|
### Removed Inputs
|
||
|
|
- None (all v1.6 inputs remain)
|
||
|
|
|
||
|
|
## Testing Checklist
|
||
|
|
|
||
|
|
- [ ] Verify strategy compiles without errors
|
||
|
|
- [ ] Backtest on EURUSD H4 with M15 LTF
|
||
|
|
- [ ] Check that runners reach HTF liquidity levels more frequently
|
||
|
|
- [ ] Verify Daily filter reduces fake reversal entries
|
||
|
|
- [ ] Monitor that Lox-In breakeven prevents premature exits
|
||
|
|
- [ ] Confirm ATR trail only activates after 4R profit
|
||
|
|
- [ ] Compare runner win rate vs v1.6 (expect improvement)
|
||
|
|
|
||
|
|
## Notes
|
||
|
|
|
||
|
|
- **Displacement Filter**: Remains unchanged at 1.5x average body size
|
||
|
|
- **VFI Indicator**: No changes; still uses fast length of 50
|
||
|
|
- **Risk Management**: Position sizing formula unchanged
|
||
|
|
- **POI Invalidation**: Still closes all trades if POI fails
|
||
|
|
- **Pyramiding**: Still allows max 2 concurrent trades per direction
|
||
|
|
|
||
|
|
## Future Optimization Ideas
|
||
|
|
|
||
|
|
1. Make the 4R threshold configurable (currently hardcoded)
|
||
|
|
2. Add option to scale into runner position at HTF liquidity breakout
|
||
|
|
3. Implement partial profits at intermediate levels (e.g., 6R, 8R)
|
||
|
|
4. Add trend confirmation from higher timeframes (W1, Monthly)
|