Strategy Lab · optional
gold-sweep-desk-strategy.pine
The same plans as orders for TradingView's Strategy Tester, with a commission that matches the desk's cost estimate.
It tracks gold's pools, refuses most raids by name, and draws a plan only when a liquidity sweep flips the nearest gap a full ATR from its extreme.
Day 1 · the first after the warm-up to reach 1R
Simulated fifteen-minute gold candles (the Pine project's own seeded market), not a real market, run through Gold Sweep Desk 1.1.0's own rules, ported line for line and held to its reference engine; it draws what the script draws at each close. R is after the script's 0.40 cost estimate. Day 1 is the first simulated day after the warm-up whose plan reaches its 1R line, so every step of a plan shows; Another day plays the next simulated days with a plan, in order, whatever they did.
| Time | Event | Prices |
|---|---|---|
| 18:00 | The trading day opens | PDH 3619.62 · PDL 3533.50 |
| 00:00 | The Asia range is set: its high and low are pools | 3563.48–3546.16 |
| 02:45 | Raid · Asia high | Bar 3566.89 high · 3559.40 low |
| 03:00 | Swept · Asia high: a close back inside | Close 3561.96 |
| 04:00 | Flip: a close through the nearest opposing gap | Close 3554.77 |
| 04:00 | ▼ SHORT 3554.77 (flip close) | Stop 3573.67 · 1R 3535.87 · target 3516.97 |
| 05:00 | The London range is set: its high and low are pools | 3573.09–3544.30 |
| 07:30 | 1R reached | 1R 3535.87 |
| 16:30 | ✗ FLAT AT THE TIME EXIT −0.6R | Exit 3565.09 · −0.5R before costs |
New York time on any chart, every decision on closed candles.
The close back inside is only step two: the desk waits for a close through the gap, and a sweep that fails first ends without a plan.
09:45: price reaches 3769.95, and the short at the sweep is stopped. The desk never traded it.
The same simulated market and rules: the first simulated day after the warm-up where a sweep failed. The red box is an entry at the sweep's close, with the desk's own stop: a tenth of an ATR past the extreme; it is not the desk's rule.
Candles that traded past a fresh pool inside a window.
Raids that closed back inside within three candles.
Sweeps that closed through the nearest gap, a full ATR from the extreme.
Flips whose stop and clock passed the checks, each then drawn to its ending.
The desk's own record on a real chart: OANDA:XAUUSD 15m, the 63 trading days from 30 June 2026, read on 26 September 2026.
Shape the candles after a raid of Asia's high, and the desk's own engine, run on them, names what it does.
A bullish gap under it
The close after the sweep
Drawn candles, not the simulation. The verdict is the desk's own engine, run on them at its defaults.
A raid that stays beyond the level for three more closes is held, not swept.
The nearest opposing fair value gap born in the 30 candles before the sweep.
A close through that gap, at least one ATR from the extreme, within 12 candles.
A stop wider than six ATR, or an entry at 16:45 or later, is refused too.
A plan ends at its stop, at twice its risk, or flat at 16:45 New York; Pro takes half off at the 1R line on the way.
Pro's half at 1R leaves less on the day that ran.
Three plans from the simulated run: the first simulated plan after the warm-up to end at its target, the first to end at its stop, and the first to reach 1R and end at the 16:45 time exit. R is after the 0.40 cost estimate; Pro's is the same plan with half closed at 1R.
Beyond the sweep's extreme, fixed when the plan is made, and checked first on every candle.
The 1R line on the way is drawn; the desk leaves it to you.
Before gold's daily break, a plan still open closes at that candle's close.
Your spread and slippage, set in input 04; every R here is after it.
Two files, the complete scripts, ready for TradingView's Pine Editor.
On a phone? Send this page to your desktop.
//@version=6// …// Gold liquidity as a desk: the prior-day, Asia and London highs and lows, their sweeps, the flip and the plan, in words.// Every clock is New York time; bars while spot gold is closed are skipped, so spot and 24/7 feeds agree.// Decisions happen on closed bars. The record is this chart's history after an estimated cost, not a forecast.// Rules: docs/engine-contract.md in the release · https://proea.app/en/free/gold-sweep-desk// …indicator("Gold Sweep Desk", "GoldSweep", overlay = true, behind_chart = false, max_lines_count = 500, max_labels_count = 500, max_boxes_count = 500, max_bars_back = 2000)const string GS_VERSION = "1.1.0"const bool GS_IS_STRATEGY = false // ═══ ENGINE · core.pinefrag ═════════════════════════════════════════════════════════════════════════════════════// The engine decides; the renderer (visuals.pinefrag) only reads. Every engine name starts with "gs" and a// capital letter; tests/display.test.mjs refuses any renderer line that assigns one. The rules are written in// docs/engine-contract.md; tests/reference/engine.mjs is the independent reference.//// ① SWEEP a bar in an entry window trades through a fresh pool (prior day, Asia or London high/low) and a close// comes back inside it within a few bars.// ② FLIP a close goes through the nearest opposing fair value gap: the gap inverts.// ③ PLAN entry at that close (or at a later close back inside the gap); stop beyond the sweep's extreme; target// in R; flat at the time exit. Stop first when a bar reaches both.// Every clock is New York time by the bar's open. Bars while spot gold is closed (Friday 17:00 → Sunday 18:00 and// the daily 17:00–18:00 break) are skipped entirely, so a 24/7 feed and a spot feed give the same bar stream.// Decisions happen on closed bars only. A plan's geometry is frozen at entry. string gsG1 = "01 · Pools and windows"bool gsPoolPd = input.bool(true, "Prior day high / low", group = gsG1, tooltip = "The previous trading day's high and low. Gold's day runs 18:00 → 17:00 New York.")bool gsPoolAsia = input.bool(true, "Asia high / low · 20:00–24:00", group = gsG1, tooltip = "The range of the bars opening 20:00–24:00 New York; a pool from the first bar after midnight.")bool gsPoolLon = input.bool(true, "London high / low · 02:00–05:00", group = gsG1, tooltip = "The range of the bars opening 02:00–05:00 New York; a pool from the first bar after 05:00.")string gsWindows = input.string("London + New York", "Entry windows", options = ["London + New York", "Continuous 01:00–11:00"], group = gsG1, tooltip = "A setup can only start on a bar that opens inside a window (New York time). The pools are used up by any bar that trades through them, window or not.")bool gsWinLon = input.bool(true, " London 02:00–05:00", group = gsG1)bool gsWinNy = input.bool(true, " New York 07:00–11:00", group = gsG1)
No coding needed.
gold-sweep-desk-strategy.pine
The same plans as orders for TradingView's Strategy Tester, with a commission that matches the desk's cost estimate.
Read it, change it, keep it.
The indicator reads and plans; the Strategy Lab sends the same plans to the Strategy Tester.
Whatever your chart's time zone; the closed hours are skipped, so every gold feed agrees.
Raids, sweeps, flips, plans and endings, in Text or JSON; alerts never place orders.
Pro draws both sides of gold's day before the window opens, so you see the level a sweep must reach and the close that would flip it.
No subscription / Full source / 7-day refund before download
Pro is a set of tools for reading and planning gold's day. It does not trade for you and it does not promise results.
The page, the films and the manual are open to everyone. Both scripts, the indicator and its Strategy Lab, 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 tested edge. We tested sixteen rule variants, each registered before its result: none passed, and the one selected failed its check. The desk is a way to read gold's day, not a promise of results. What we measured has every row.
No. The indicator draws plans and says why; it places no orders. The optional Strategy Lab sends the same plans to TradingView's Strategy Tester.
Every clock on the desk is New York's, by the candle's open, whatever your chart shows. Gold's day runs 18:00 to 17:00, and the closed hours are skipped, so a spot chart and a 24-hour feed show the same setups.
Gold on 5 or 15 minutes with standard candles. On 30 minutes or more, or under 5, a TIMEFRAME line says why the desk was not built for them.
The game plan before each window, seven context checks, SMT with silver, half off at 1R, a day guard, the eight-market Radar and full-plan alerts. Gold Sweep Desk stays complete in Pine Pro Library, and Pro includes it unchanged.
We, ProEA Lab, build Gold Sweep Desk. The films run its rules on simulated candles, not market data. Not financial advice.
Gold Sweep Desk Pro · $49 · one payment
See Gold Sweep Desk Pro →Pro is a set of tools for reading and planning gold's day. It does not trade for you and it does not promise results.
Read your chart, install it, and every rule one question at a time.
Beyond yesterday's high and low and the Asia and London ranges sit other traders' stops. A candle that trades through one of those pools in the London or New York window is a raid. It is a sweep only when a close comes back inside within three candles: the stops were taken and price did not stay there. Try it.
● SWEPT · Asia high · waiting for the flip The stops above were taken and price did not stay there.
After the sweep the desk takes the nearest opposing fair value gap born in the thirty candles before it. The flip is a close through that gap, at least one ATR from the sweep's extreme, within twelve candles. The entry is that close; the stop sits a tenth of an ATR beyond the extreme; the target is twice the risk, with the 1R line on the way.
The gap sits more than one ATR from the extreme, so a close through it is the flip, and the entry is that close.


Download the indicator (.pine)Download the Strategy Lab (.pine)Download the complete 1.1.0 package (.zip)The 1.1.0 licence
Pools: yesterday's high and low (PDH, PDL), the Asia range (20:00–24:00 New York) and the London range (02:00–05:00). Each is fresh until a candle trades through it, window or not.
Sweep: in a window, a candle reaches at least 0.05 ATR beyond a fresh pool and a close comes back inside on that candle or within the three after it.
Flip: a close through the nearest opposing fair value gap born in the thirty candles before the sweep, at least one ATR from the sweep's extreme, within twelve candles. A new wick beyond the extreme moves the extreme; a close back beyond the swept level ends the setup.
Plan: the entry is the flip close; the stop sits 0.1 ATR beyond the sweep's extreme; the target is twice the risk. The plan is skipped if the stop is wider than six ATR, or if the entry comes at 16:45 or later. The levels are fixed when the plan is made.
Result: on every closed candle the stop is checked first, then the target; otherwise the plan closes at 16:45 New York, before gold's daily break.
Every time on the desk is New York time by the candle's open, whatever your chart shows. Gold's day runs 18:00 → 17:00. Candles while spot gold is closed (Friday 17:00 to Sunday 18:00, and the daily 17:00–18:00 break) are skipped entirely, so a spot chart and a 24-hour gold feed show the same setups.
A setup that ended before a plan: held beyond the level (no close back inside in time), no opposing gap to flip, a failed sweep (a close back beyond the level before the flip), or no flip within twelve candles. The mark's tooltip names which.
The Strategy Lab is a separate script for TradingView's Strategy Tester. It runs the same plans, with the stop and target placed as orders at the entry and a commission that matches the desk's cost estimate.
Yes: the indicator's alerts carry each event as it happens, in Text or JSON. Alerts never place orders.
Two studies on 2026 gold data, with every candidate and period written down before its result. Sixteen rule variants in all: none passed, and the one selected failed its check. So the defaults are design choices, not tested winners. The desk's own record on your chart counts that chart's history; it is not a forecast. Read what we measured, every candidate and period included.
Every decision reads closed candles. Changing the symbol, timeframe, feed or inputs recalculates the history. The desk sees chart candles, not news or your broker's fills, and fills at your broker can differ. It is research tooling, not financial advice.
What shipped and what changed in Gold Sweep 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.
Gold Sweep Desk v1.1.0 Shipped
Gold's daily liquidity, the sweep, the flip and the plan, in words.
No setting earned a tested default Lab note Gold Sweep Desk
Two studies on 2026 gold data, registered in advance: no setting earned a place as a tested default, so the defaults are design choices.
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.