Strategy twin · optional
location-desk-strategy.pine
The same rules as broker orders for TradingView's Strategy Tester on a second chart; its Measurement grid starts at 5R, so choose 3 there to match the indicator's default target.
On every close it places price in two ranges, a recent one and a wider one, checks which way the last swing broke, and reads the two together: a falling market back in a sell location reads LOOK FOR SELLS.
Window 1 · the first turn
Simulated 15-minute gold bars, not a real market, run through Location Desk's default rules, simplified for the browser, with its trade layer off: two ranges, the last 33 bars and the last 100 (the script's 5m and 15m layers on a 15-minute chart), each with a sell location in its top quarter and a buy location in its bottom quarter, and the direction from closes beyond the last swing. The chart draws the script's cloud, its swings and its right-edge words, and leaves out its candle tint, its event labels and its range boxes. Window 1 is the first simulated turn of direction that waits at least one close for a location and turns the read to LOOK FOR its side within 40 bars, once 200 bars have loaded; Another turn plays the next such turns in order, each after the window before it ends, whatever price does next.
| Time | Event | Location |
|---|---|---|
| 01:15 | Window opens · BEARISH IN A BUY LOCATION · LOW PROBABILITY | 5m buy location · 15m buy location |
| 04:15 | LOOK FOR SELLS | 5m lower half · 15m buy location |
| 04:30 | BEARISH IN A BUY LOCATION · LOW PROBABILITY | 5m buy location · 15m buy location |
| 04:45 | LOOK FOR SELLS | 5m lower half · 15m buy location |
| 05:00 | BEARISH IN A BUY LOCATION · LOW PROBABILITY | 5m lower half · 15m buy location |
| 05:15 | LOOK FOR SELLS | 5m lower half · 15m buy location |
| 05:45 | BEARISH IN A BUY LOCATION · LOW PROBABILITY | 5m upper half · 15m buy location |
| 06:00 | BULLISH · WAIT FOR A BUY LOCATION | 5m upper half · 15m lower half |
| 06:15 | LOOK FOR BUYS · STACKED ×2 | 5m 50 % band · 15m buy location |
| 06:30 | BULLISH · WAIT FOR A BUY LOCATION | 5m upper half · 15m lower half |
| 07:00 | LOOK FOR BUYS | 5m lower half · 15m buy location |
| 07:15 | BEARISH IN A BUY LOCATION · LOW PROBABILITY | 5m buy location · 15m buy location |
| 08:45 | BEARISH · WAIT FOR A SELL LOCATION | 5m upper half · 15m lower half |
| 09:30 | BEARISH IN A BUY LOCATION · LOW PROBABILITY | 5m buy location · 15m buy location |
| 09:45 | LOOK FOR SELLS | 5m lower half · 15m buy location |
| 10:30 | BEARISH IN A BUY LOCATION · LOW PROBABILITY | 5m buy location · 15m buy location |
Full Pine v6 source in Pine Pro Library. It reads your chart; you place the trades.
The swings set the direction, and the read then waits until price comes back to a location on that side.
At 10:45 the direction is bearish, and the read says BEARISH IN A BUY LOCATION · LOW PROBABILITY.
The same simulated 15-minute gold, simplified rules: the replay's window 1, up close. The words are the dashboard's own.
A close beyond the last unbroken swing high turns it bullish; beyond the swing low, bearish.
More than 60 bars without a break, with price inside the swings, reads sideways.
A range's top quarter is a sell location, its bottom quarter a buy location.
A direction and a location on its side read LOOK FOR; the other side's location reads LOW PROBABILITY when bearish, WAIT FOR THE CHANGE when bullish.
Move the close through one range and pick the direction, and the script's own rule answers with its read.
A drawn range, not the simulation: one layer and no leg. Each read is the script's own rule.
At or above three quarters of the way up the range.
At or below a quarter of the way up the range.
A tenth of the range around its middle counts for the direction's side.
With no direction the read waits, wherever the close is.
After a turn, the range's 50 % band and the leg's own 50 % line count as locations, as the sell zone does.
A drawn range and leg, not the simulation. On the simulated run, from a turn's close on, the first LOOK FOR came from the middle 237 times and from an edge 61 times, of 298.
The 50 % band: 5 of every 100 of the range on each side of its middle.
The middle of the move since the break, within 5 of every 100 of the move's height.
The middle counts only for the side the direction faces.
Two locations at once read STACKED ×2.
Two files, the complete scripts, ready for TradingView's Pine Editor.
On a phone? Send this page to your desktop.
// ═══════════════════════════════════════════════════════════════════════════════════════════════════════// LOCATION DESK — direction · location (the cloud) · RIMC execution · Co-Pilot · Pine Script v6 · v1.1.0// Built for a r/pinescript thread reply ("NJAT location tool!" — "a cloud like band location tool that shows where// you should be looking for buys or sells"). Open-source answer to the idea behind it: where is price inside the// range of the timeframe you observe — a red band at the top (look for sells), a green band at the bottom (look// for buys), the 50 % line for continuation pullbacks — on up to three observation timeframes at once, read// together with the chart's structure (direction first, location second), and an RIMC execution// (Range → Initiation → Mitigation → Continuation) attached so the whole idea can be measured.//// HOW IT READS THE MARKET (every decision commits on the CLOSED bar — nothing repaints):// 1 LAYERS up to three location layers, each an observation timeframe and a range: the rolling window of// that timeframe (default), its last swing high / low, or the previous day. Sell zone = top part// of the range, buy zone = bottom part, 50 % line + a continuation band around it.// 2 DIRECTION chart structure: a close above the last swing high = bullish until a close below the last swing// low (and the mirror). The breaking bar with a real body = an initiation. Sideways when no new// break comes and price sits inside the swings.// 3 THE READ bearish + a sell location (edge, the 50 % line, or the leg's 50 %) = look for sells; bullish + a buy location =// look for buys; selling in a buy location = low probability; a higher layer's zone against the// chart's direction = wait for the change; mid-range = stand aside. Layers agreeing = stacked.// 4 RIMC a small range forms, price initiates away by at least the range's height, comes back and// CLOSES inside it → entry at that close, stop beyond the far side, target in R or at structure// (the initiation extreme, the opposite zone) — only when the read allows that side.// FOCUS the cloud follows the direction: the side you should be looking at draws strong, the other fades.//// Paper ledger has NO costs — a description of the past on your chart. The strategy twin measures it with costs.// …// ═══════════════════════════════════════════════════════════════════════════════════════════════════════//@version=6indicator("Location Desk — direction · location · RIMC execution", "Loc Desk", overlay = true, max_labels_count = 400, max_boxes_count = 200, max_lines_count = 200) // ─────────────────────────────────────────────────────────────────── INPUTSgL = "Location layers (the cloud) — on · observation timeframe · range · bars of that timeframe"
No coding needed.
location-desk-strategy.pine
The same rules as broker orders for TradingView's Strategy Tester on a second chart; its Measurement grid starts at 5R, so choose 3 there to match the indicator's default target.
Read it, change it, keep it.
The indicator draws and reads; the strategy twin sends its trades to the Strategy Tester.
Standard intraday candles; the films here use simulated 15-minute gold.
The reads, the locations, the direction, and the trade layer's events.
The page, the films and the manual are open to everyone. Both scripts, the indicator and its strategy twin, are in Pine Pro Library: $49 once for every desk and every update, or included in the Complete Suite. Sign in to copy or download.
No. It is a read: a direction and a location on the same side. The script enters only through its trade layer, which the replay leaves off.
We switched the trade layer off with the script's own setting, so no trade opens. The film also leaves out the script's event labels and range boxes, to show the read alone. The manual keeps the trade layer's rules and what we measured.
No measured edge. We compared the full rule on gold and EURUSD with costs, and a faithful location engine does not establish a mechanical edge. What we measured keeps the numbers.
Everything else we make, for one payment. It adds no Location Desk features; it includes Pine Pro Library, so this desk's code comes with it.
We, ProEA Lab, build Location Desk. The films run its rules, simplified, on simulated candles, not market data. Not financial advice.
Complete Suite · $97 · one payment
The Suite adds no Location Desk features; it includes Pine Pro Library, so this desk's code comes with it.
Every rule, setting and check, one topic at a time.
Location Desk · Pine Pro Library
See the range. Check direction. Wait for the setup.
Full indicator and strategy source, in Pine Pro Library.
Location Desk is a TradingView indicator in Pine Pro Library that compares price with rolling, swing or previous-day ranges, then separates location from direction. Its entry sequence looks for a small range, a strong departure and a qualifying return. Range bands show areas to investigate; they do not establish an entry or trading advantage by themselves.
By default, the outer quarters of each selected range become buy and sell locations, with a continuation band around its midpoint. Rolling, confirmed-swing and previous-day modes use different references. A band describes relative location; it does not predict a reversal. Read the range calculations
No. At the return, the tool checks the small range's midpoint against current observation locations, then checks direction, time, existing trade and daily allowance. A skipped return consumes that setup; it does not wait indefinitely for permission. Follow the return and entry gates
No. The indicator's default target is 3R, while the twin's Measurement grid starts at 5R and overrides several normal inputs. Align those settings before comparing results. Broker-emulator fills and costs can also differ from the indicator's paper ledger. Check the twin's active overrides
A reader asked for bands showing where to look. The bands begin with a range.
One price alone cannot answer. A candle shows where price moved. Its white dot marks the close at 78.
Fictional prices; ranges calculated from the shown history. Three and five candles shorten the example, not the shipped observation windows.
Choose an area to watch, then test an entry and exit rule there. Location alone cannot establish an advantage.
Reveal nine candles. Compare what happens when price returns.
The tool looks for a small recent range. These prices are close together, but this demonstration has not collected all six candles yet.
Compare cases at candle nine. A short plans for lower prices; a return can still fail or be skipped.
One fictional setup, with supplied bearish confirmed direction, fixed observation ranges 80–120 and 70–126, a permitted window, no open trade and the ledger on. ATR is supplied as 4 on every candle, including entry; it is not calculated from these nine bars. The six-candle execution range and subsequent decisions are calculated from revealed bars. This isolated replay ends when this setup ends.
Select the dashboard, bands or explanation.

This capture says BEARISH · WAIT FOR A SELL LOCATION. Structure supplies the side, but price is still in the upper half of both ranges. Bearish direction alone does not permit an entry.
Open the original chart full size ↗Freeze the reference ranges and move the close. This thought experiment isolates price location; real rolling ranges can move too.
Drag the last candle’s close on the chart, or use the slider. Its blue price line runs through the 5m and 15m ranges.
This is a test candle. The reference ranges and direction stay fixed while you explore.
The candles and the range columns use the same vertical price scale. Each column keeps its own high and low. In the second example, the 15m window includes an earlier, higher extreme outside the visible candles. The 15m column grows taller while the test close stays the same.
The 5m and 15m labels name the observation timeframes. They do not mean only five or fifteen minutes of history: the shipped rolling windows use 100 bars each. This drawing shows a few recent candles and freezes the reference ranges. The real tool updates its ranges and direction as bars close.
The default layers are 5m + 15m. These examples show both sides for comparison; visibility does not set direction or alter the entry rule.
A range midpoint is halfway between that range’s high and low. The impulse midpoint is halfway between the current leg’s starting swing and its extreme. They can be different.
Outer-zone illustration; the full read also uses continuation bands, the impulse midpoint and the nearest-layer guard.
Schematic examples · no market prices · location is not an entry
Range → initiation → mitigation → continuation names the method. In plain words: a small range, a strong move away, a return, then an entry plan if checks pass.
Same beginning. Compare what happens at the end.
A candle closes below a confirmed swing low. The chart’s structure turns bearish.
NextLook for a sell location.
Direction comes from structure. A wick through the swing is different from a close beyond it. This structure break is not the entry.
BEARISH STRUCTURE
Illustrated example First-touch rule No trade result shown
Both complete Pine v6 scripts are in Pine Pro Library.
Create an indicator on an intraday chart.
Replace the sample. Choose Add to chart.
Start with five- or fifteen-minute candles and observation frames at least as large.
Draws on the price chart. Its default target is three times the initial risk distance.
Copy the code as it is. No coding needed.
Use a second chart to measure rules with costs. Its Measurement grid starts at 5R; choose 3 there to match the indicator’s default target.
Copy the code as it is. No coding needed.
Its cloud, risk zones, dashboard and Co-Pilot start hidden. Its active Measurement grid overrides five normal inputs. Match the grid as well as ordinary settings when comparing scripts. Save the script before changing symbols.
Complete rules and settings remain here.
A range has a high, a low and a midpoint. By default, its outer quarters become sell and buy locations; the continuation band extends five percent of the full range either side of its midpoint.
Rolling windows convert the selected timeframe’s bar count into chart bars, capped at four thousand. Swing ranges use the latest confirmed pivot high and low. Previous day uses the feed’s completed daily candle, independently of the trading-window timezone.
The default layers observe one hundred bars at five and fifteen minutes; the hourly layer starts off. Pivot confirmation delays swing references. A zero-height range is not ready. With outer zones expanded to half the range, they meet at the midpoint and the sell classification has priority.
A strict close beyond an unbroken confirmed chart swing sets bullish or bearish direction. The default pivot confirms five chart candles later; a wick or equal close is not a break.
A breaking body at least half a chart ATR marks a structure initiation. The impulse midpoint moves as the leg’s extreme extends. The read can turn sideways only after more than sixty candles since the break while price is strictly inside stored swings.
Continuation alignment can count an observation midpoint band and the impulse midpoint; it does not require the body-qualified initiation flag. That flag gates the named midpoint alert. A displayed count of two can therefore mean one observation layer plus the impulse midpoint.
First enabled layer means slot order, not automatic timeframe sorting. Its opposing outer zone blocks entry even when higher layers agree. Focus changes emphasis only. Labels such as low probability are interpretations, not measured chances.
The last six candles must span no more than 1.2 chart ATR. Inside closes refresh the wait and can expand the small range while it still fits. A close must exceed an edge by strictly more than one range height to initiate by default.
A pending range expires after more than ten candles since its last inside close, unless that candle qualifies as initiation first. After initiation, a close through the far side invalidates before the return is considered.
First touch uses the wick, but enters at the touching candle’s close. Close-inside mode includes both edges. At the return, the small range’s midpoint is checked against current observation locations. Then direction, location, time window, existing trade, daily allowance and ledger permission determine whether it enters or skips.
A return consumes the setup even when skipped. The thirty-candle return allowance is checked after invalidation and return checks. Detection continues with the ledger off or a trade open, but these can block an entry.
1R is the initial distance from entry to stop. A short stop lies above entry; a long stop below. Default stop: the far small-range edge plus 0.1 chart ATR. Last-swing mode uses a swing only if it is further beyond that edge. The stop stays at least one tick beyond entry.
The indicator’s default target is 3R. Alternatives use the initiation extreme, including the returning candle, or the opposite entry-zone boundary of layer one. Missing or nearer-than-1R structure targets fall back to the R target.
A 3R target does not mean three units will be earned. Reaching the target is uncertain. The display-only dollar-size estimate is not contract-aware sizing and does not set the twin’s order quantity.
The indicator starts management on later candles. Its paper ledger checks the stop first, then target, then an optional move of the stop to entry, then optional window-end closing. If stop and target share a candle, stop wins. A newly moved stop is not checked against an earlier wick on that same candle.
The trading window starts off. When enabled, end flattening uses the first outside-window candle’s close. Daily entry allowance resets by the selected timezone’s date, Europe/London by default.
The twin uses broker-emulator orders and fills, which can differ from the paper ledger. Its exit bracket is submitted only after a broker position exists; a signal’s displayed plan is not an already attached broker bracket.
Direction: bullish, bearish or sideways. Location: each layer’s range and the alignment count. RIMC: the small range and return sequence. Gate: the missing entry permission. Record: paper outcomes on loaded history, without costs.
Brief Co-Pilot shows NOW. Standard adds WHY and PLAN. Detailed adds the record and glossary. Bearish in an allowed sell location reads look for sells; that remains a watch state until entry qualifies.

All fifty-nine indicator inputs, in source order. Twin differences are marked beside the default.
Each layer chooses a frame of reference. Bars are converted to chart-bar windows; these are not necessarily exact higher-timeframe candle boundaries.
Direction uses confirmed chart swings, separately from the observation ranges.
The impulse midpoint can add an alignment. Focus changes emphasis, not entry rules. The twin's grid overrides its direction and alignment settings.
ATR is the chart's fourteen-candle movement measure. First touch records entry at that candle's close. Indicator defaults are below; the twin's active grid also controls target, breakeven and window.
Cloud plot colors are separate from the dashboard theme. Recolor them in TradingView's Style tab.
Show the read, alignment, setup, gate and cost-free paper record.
Brief shows NOW, Standard adds WHY and PLAN, Detailed adds the record and glossary.
Dynamic messages can use structured fields or readable text.
These take priority over its corresponding normal inputs. Some displayed labels still read the normal inputs, so check this grid directly. The twin has sixty-four inputs in total.
The indicator has fifteen named conditions: look for sells/buys, entered sell/buy location, midpoint pullback, stacked location, direction changed, range formed, initiation, long/short entry, mitigation skipped, target reached, stopped and flat at window end.
Dynamic messages have eleven branches: LOOK_FOR_SELLS, LOOK_FOR_BUYS, ENTER_SELL_LOCATION, ENTER_BUY_LOCATION, STACKED_LOCATION, DIRECTION, RIMC_INITIATION, RIMC_LONG, RIMC_SHORT, MITIGATION_SKIPPED and EXIT. They omit midpoint and range-formed events; exits share EXIT with a reason.
Events commit on confirmed bars and dynamic calls use once per bar close. JSON carries src, symbol, tf, event, direction, read, layers, side, entry, sl, tp, reason and optional r. There is no separate stop-to-entry-moved alert. The named stacked event specifically requires two outer-zone layers, unlike the broader displayed count. Use the indicator’s named-condition menu; do not assume the twin exposes the same alert menu.
Twin header defaults: capital one hundred thousand, fixed quantity one, commission 0.02 percent per order and five ticks of slippage. Adapt cost assumptions to your market; stock-style commission alone does not model every forex spread or fee.
We compared gold and EURUSD with costs, varying targets, stops, return rules, direction, alignment and the London window. The report keeps the complete grid, cost assumptions and history limits together. A faithful location engine does not establish a mechanical edge.
The lab notes are in review and will be linked here.
Rolling ranges can update during a live candle. Direction, paper trades and alert events commit at close. Different feeds, history, timeframes or settings can recalculate the map. The ATR-dependent engine needs enough loaded history before it can run.
The tool does not observe resting orders or predict a reversal. Its paper record has no costs. Trading risk is entirely yours; this is research tooling, not financial advice.
The published examples use EURUSD and gold. Use standard intraday candles with enough history; observation timeframes at least as large as the entry chart make the layers easier to interpret.
What shipped and what changed in Location Desk, newest first. Ask for the next change below; what gets built lands here with a date, and on the lab queue on the front page.
Location Desk v1.1.0 Shipped
Compares price with recent ranges, then checks direction.
Direction, location, then execution Lab note Location Desk
The location-bands request is complete: three cloud layers, direction-aware focus, an RIMC entry and a twin with adjustable costs.
A small friction or a big idea. Tell us what would make this tool work better for you.
Requests for a new tool go on the same queue: see what is asked for and what is being built.