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.

range-fade entry, exits and invalidation workflowA fictional prior 20-bar range runs from 98 to 102. A completed close in the 98 to 98.50 lower zone permits only a next-bar entry assumption at 98.50; target 100.50 nets 1.80 dollars and stop 97.50 loses 1.20 dollars after an assumed 0.20 dollar round-trip cost. A close below the range belongs to a separate breakout test.SET THE RANGE BEFORE THE SIGNAL · DEFINE THE NO-TRADE CASEPRIOR 20 CLOSED BARS102100.510098.59897.5upper boundarytarget · +$1.80 netmidpointlower zone · entrystop outside rangeCompleted close inside $98–$98.50 zone?No qualifying close → remain flatIf yes: next-bar entry assumption $98.50Target $100.50+$1.80 after assumed costStop $97.50−$1.20 after assumed costClose below $98 before entry → invalidate the fade;research a breakout rule separatelyIllustrative price ladder · $0.20 assumed round-trip cost · no fill guarantee
A fictional prior 20-bar range runs from 98 to 102. A completed close in the 98 to 98.50 lower zone permits only a next-bar entry assumption at 98.50; target 100.50 nets 1.80 dollars and stop 97.50 loses 1.20 dollars after an assumed 0.20 dollar round-trip cost. A close below the range belongs to a separate breakout test. Illustrative teaching graphic · not live market data

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.

one hourly OHLC candle crosses both range fade exitsA fictional filled long entered at $98.50 has a $100.50 target and $97.50 stop. A later hourly bar opens at $99.00, reaches $101.00 and $97.00, and closes at $99.50. Both exit levels were crossed, but hourly OHLC does not establish which came first. The two net outcomes use an assumed $0.20 round-trip cost.ONE HOURLY BAR · BOTH EXIT LEVELS CROSSEDFICTIONAL PRICE PATH · NOT MARKET DATA100.50 target98.50 entry97.50 stopHigh 101.00Close 99.50Open 99.00Low 97.00EITHER SEQUENCE FITS OHLCTarget first+$1.80 net · assumed cost $0.20Stop first−$1.20 net · assumed cost $0.20The candle alone cannot rank them.Position was already filled · price levels and costs are illustrative · a trigger is not a guaranteed fill
A fictional filled long entered at $98.50 has a $100.50 target and $97.50 stop. A later hourly bar opens at $99.00, reaches $101.00 and $97.00, and closes at $99.50. Both exit levels were crossed, but hourly OHLC does not establish which came first. The two net outcomes use an assumed $0.20 round-trip cost. Illustrative teaching graphic · not live market data

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.

three ways to report a same-bar range trading ambiguityWhen one OHLC bar crosses both a hypothetical target and stop, finer available observations can help resolve ordering; a simulator-specific conservative sequence can be declared before analysis; or the result can remain unresolved and report both outcomes. None is a live fill guarantee.IF ONE BAR TOUCHES BOTH EXITS, SET THE RULE BEFORE RESULTS123Inspect finer dataUse lower-timeframe ortrade data only if it existsKeep coverage limits visiblePredeclare a conventionState the simulator's ruleand rerun its sensitivityDo not call it live executionKeep it unresolvedReport target-first andstop-first outcomesShow the uncertainty boundsNever select the favorable path after seeing the resultResearch decision aid · not a trading rule or fill guarantee
When one OHLC bar crosses both a hypothetical target and stop, finer available observations can help resolve ordering; a simulator-specific conservative sequence can be declared before analysis; or the result can remain unresolved and report both outcomes. None is a live fill guarantee. Illustrative teaching graphic · not live market data

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.