The Range Position Gate filter is a pass/block gate on where close sits in the lookback high–low range (Donchian location, 0–100): (close − minLow) / (maxHigh − minLow) × 100. When that position meets your compare condition against a threshold, the filter passes; otherwise it blocks. It never fires a buy or sell by itself.
0 is the bottom of the range; 100 is the top. Default position ≤ 80 avoids chasing tops; flip to position ≥ 20 when you want dips only.
When to use it
- Block breakout longs that open too close to the recent high
- Allow mean-reversion buys only when price is still in the lower part of the range
- Cap chase risk without inventing a second directional rule
What you’ll set in the app
Add Range position gate under filters.
- Lookback bars — bars for the high–low window (default 20)
- Compare — position >, <, ≥, ≤, or ≈
- Threshold — e.g.
80(default)
Warm-up history or a flat range (maxHigh ≤ minLow) blocks the gate. Disabled passes.
Tips
- Defaults use position ≤ 80 so entries near the top of the range fail.
- There is no “side when true”—pair with RSI, breakout, or other signal rules for direction.
- Pair with Percentile Rank when you want distribution rank instead of high–low location.
Example
Entry filters: Range position gate, lookback 20, position ≤ 80. A breakout long only passes when close is not already sitting in the top fifth of the recent range.