Re: Unlocking the Smart Money Play: Why You Need a Liquidity Sweep Detector for Forex Scalping
Posted: Sat Sep 12, 2026 4:41 pm
Key additions to note:
request.security(): This line (htfEma = request.security(...)) calculates the 50 EMA on the 4-hour chart and maps that exact value down to your 15-minute or 5-minute candles.
The Bypass Toggle (useFilter): The variables htfBullish and htfBearish are designed so that if you uncheck "Enable HTF Filter" in the script settings, the variables default to true. This bypasses the logic without requiring you to delete code, allowing you to seamlessly test the strategy with and without the trend filter.
Execution Gating: The execution signals at the very bottom now require both the structural reclaim (isHighReclaim / isLowReclaim) and the trend alignment (htfBearish / htfBullish) to evaluate as true before painting an arrow.
request.security(): This line (htfEma = request.security(...)) calculates the 50 EMA on the 4-hour chart and maps that exact value down to your 15-minute or 5-minute candles.
The Bypass Toggle (useFilter): The variables htfBullish and htfBearish are designed so that if you uncheck "Enable HTF Filter" in the script settings, the variables default to true. This bypasses the logic without requiring you to delete code, allowing you to seamlessly test the strategy with and without the trend filter.
Execution Gating: The execution signals at the very bottom now require both the structural reclaim (isHighReclaim / isLowReclaim) and the trend alignment (htfBearish / htfBullish) to evaluate as true before painting an arrow.