The longs and shorts that closed at each price, split into those stopped out and those taking profit.
Cells
Stacked
BTC on 1-minute bars in the 0xArchive Terminal, 2026-10-18.
BTC on 1-minute bars in the 0xArchive Terminal, 2026-10-18.
Open on a chart
Load it on BTC 1m in the terminal, then change its settings or open it in the script editor.
Who closed at each price, and how: longs stopped and longs taking profit on the left, the sell side a long closes on, and shorts taking profit and shorts stopped on the right. Profit taking sits nearest the candle and stops outside it, so a flush shows as the outer lanes lighting up while the inner ones stay quiet, and a calm unwind the other way round.The chart has it built in: pick Stopped vs profit under Positions in the chart-type menu. Add it as a script to change it; yours is then a Script choice under Data.The two stop lanes are opposed: where one side’s stops are three times the other’s at a price, the footprint marks it, and three in a row run right as a band. The statistics rows under each bar are the four lanes summed.Stacked (the second tab above, under Shape in the chart-type menu) draws each price as one bar, as long as its total and split into the lanes’ colours, so the mix at a price reads at a glance.
Each fill’s takerWhy says what the taker’s position did. stop_long and stop_short are closes at a loss, or forced by a liquidation or auto-deleveraging; tp_long and tp_short reduce or close a position in profit. plot.footprint declares the four lanes, and fp.add in onTrade adds each closing fill’s size at its price. Opens, flips and settlements are left out.
// Stops against profit taking, at each price: the longs and the shorts that closed, split by whether// they were stopped (a loss, a liquidation or auto-deleveraging) or took profit, from each fill's// `takerWhy`. A long closes by selling and a short by buying, so the long lanes sit on the left and the// short lanes on the right, profit taking nearest the candle. Stops are opposed: where one side's stops// are three times the other's at a price, the footprint marks it.indicator('Stopped vs profit footprint', { overlay: true, shortName: 'Stopped vs profit' });const tape = trades();const fp = plot.footprint('Stopped vs profit', { lanes: [ { id: 'longsProfit', label: 'Longs taking profit', side: 'left', color: '#c9a227' }, { id: 'longsStopped', label: 'Longs stopped', side: 'left', color: color.down }, { id: 'shortsProfit', label: 'Shorts taking profit', side: 'right', color: '#5b8def' }, { id: 'shortsStopped', label: 'Shorts stopped', side: 'right', color: color.up }, ], opposed: [{ a: 'longsStopped', b: 'shortsStopped' }], stats: ['longsStopped', 'longsProfit', 'shortsProfit', 'shortsStopped'],});tape.onTrade((t) => { const why = t.takerWhy; if (why === 'stop_long') fp.add('longsStopped', t.price, t.size); else if (why === 'tp_long') fp.add('longsProfit', t.price, t.size); else if (why === 'tp_short') fp.add('shortsProfit', t.price, t.size); else if (why === 'stop_short') fp.add('shortsStopped', t.price, t.size);});