Range trading describes a family of rules that act within an identified price interval. The hard part is defining the range before seeing whether it held. “Buy support and sell resistance” is not yet a reproducible rule: it leaves the boundary, test frequency, invalidation and behavior after a break to judgment.
Define the interval mechanically
Choose a market, instrument, venue, timeframe, data source and UTC date range. A boundary might use the highest high and lowest low of the prior n completed bars, or an explicitly drawn level recorded before the test period. State whether a close, wick or touch constitutes a test. Define the minimum separation or duration required for a range to count and how a new range replaces an old one.
Here is a one-unit, unleveraged example. The prior 20 completed hourly bars set a fictional low of 98 and high of 102. Before testing, the rule says: if a later completed close is in the lower zone from 98 to 98.50, assume entry on the next bar at 98.50, target 100.50 and stop 97.50. The gross target distance is $2 and the stop distance $1. If an explicitly assumed all-in round-trip cost is $0.20, the conditional net outcomes are +$1.80 at target and −$1.20 at stop. That changes the planned reward-to-risk comparison from 2:1 before costs to 1.5:1 after this cost assumption. It is not a tested edge or a win-rate estimate. The stop result assumes a fill at 97.50; a gap or worse execution could lose more.
If those were the only two possible outcomes and each cost $0.20, their arithmetic break-even win rate would be $1.20 ÷ ($1.80 + $1.20) = 40%. This does not estimate how often price will hit the target first. A real sample can include scratches, partial fills, gaps and costs that differ by trade. The example assumes the entry is actually filled at $98.50; it does not infer a fill merely because a candle’s low touched the price.
A candle can hide the order of events
Suppose the hypothetical position has filled at $98.50. One later hourly candle opens at $99.00, reaches $101.00, falls to $97.00 and closes at $99.50. Its high crosses the $100.50 target and its low crosses the $97.50 stop. The four OHLC values do not show which level came first. Target-first gives the illustrative +$1.80 net; stop-first gives −$1.20 net, using the same assumed $0.20 round-trip cost. Both are conditional bookkeeping outcomes, not proof of a trade result.
TradingView’s Pine Script v6 broker emulator uses chart-bar data and historical assumptions to infer movement inside a candle. Its Bar Magnifier can consult available lower-timeframe bars, but the feature has coverage limits and remains a simulator. If your backtest’s target and stop both fall inside one bar, inspect finer data if it exists, apply a conservative convention chosen before reviewing results, or retain the trade as ambiguous and report both outcomes. Do not choose the favorable path after seeing the return. TradingView documents its emulator and Bar Magnifier here.
Write entry conditions and execution timing. A hypothetical long rule could require a completed bar to close within a predeclared distance of the lower boundary, followed by an allowed later entry. Define quantity, stop or invalidation, target or exit, and maximum holding time. If price gaps below the boundary, specify whether the rule stays flat or uses a later signal. Do not adjust the boundary retroactively because a line looks better after the move.
Also decide how the order is created and what price triggers it. A stop threshold is not a promise that the position will close at that price; a market order can slip, while a limit order may remain unfilled. On Hyperliquid specifically, its perpetual TP/SL documentation says mark price triggers those orders and distinguishes market from limit behavior. That is venue-specific and can change; check the current contract and account rules for the venue being studied. Do not assume a last-price candle alone reproduces a mark-triggered exit. Hyperliquid’s TP/SL documentation is an example of why trigger and fill assumptions belong in the record.
The regime-change case is central
A range can fail when price exits and continues in one direction. Repeatedly adding to a losing position because price is “near support” changes exposure as the premise weakens. Predeclare total size limits and the point at which the range hypothesis is rejected. Include false breaks, strong one-way moves and long periods with no qualifying signals in the review.
Test the same boundaries against a baseline and alternative date segments. Preserve all trades and no-trade intervals. Compare the result when boundaries shift slightly, and include spread, fees, slippage and relevant perpetual funding. A thin range may be smaller than the cost of a round trip. A backtest that uses a candle’s high to enter at a lower price without proving the sequence creates an execution assumption that needs to be disclosed.
Do not confuse range and breakout rules
A range-fade rule looks for a move back into the interval after a defined boundary test. A grid strategy instead stages multiple orders and must account for accumulated inventory; a breakout rule enters in response to price leaving the interval. These methods can make opposite decisions on the same candle. If you add a breakout filter to a range fade, version and evaluate that as a separate rule rather than merging the results.
For crypto, the instrument matters: the CFTC warns that virtual-currency prices can be volatile and that leverage in futures can amplify gains and losses. Its advisory covers spot and futures/options risk; venue terms and legal protections differ by product and jurisdiction. This example assumes one unleveraged unit and omits any venue-specific mechanics.
SuperQuant includes a simple prior-range breakout example, not a general range-fading or inventory-managed grid strategy builder. Its hourly bars and synthetic data cannot verify venue depth or a real boundary fill. Compare the breakout guide, mean-reversion method, grid mechanics guide and cost sensitivity guide. This is educational research, not a recommendation or forecast.
For a reusable record of the boundary, entry, invalidation, cost and ambiguous-bar choices, use the crypto range-trading test card. Keep the breakout test in its own result set; a rule that fades a range and a rule that follows a confirmed break answer different questions.