A Chrome extension that stops the Buy button on TradingView from working until a timer runs out. Here is what it does, and why taking a button away from yourself is worth anything at all.
You click the toolbar icon, pick a duration, and Buy controls on TradingView stop responding. Sell and order management keep working, so you can still manage or close whatever you already have on.
Durations run from 15 minutes to the 3:00 pm Central close. Pick one of those and there is no unlock button until it expires. Pick “until I unlock it” and you have to type the word UNLOCK to get out. That is the whole product.
Accounts rarely die in one trade. They die across a long series of decisions that each looked reasonable on its own. Thirty reloads at $5,000 pass a sanity check that a single $150,000 loss never would.
The engine is a loop:
Money is not the subject of that sequence. It’s an emotion-regulation loop that happens to be denominated in dollars. Cognitive behavioral therapy is built for exactly this shape: a thought you never examine, a feeling you can’t tolerate, and a behavior that relieves the feeling while making the situation worse. Below are the pieces that apply to a screen and an order ticket.
“This time I can do it. I’ve learned my lesson.” That is a testable claim about the next session. Run it thirty times and you have thirty results sitting there unread. It survives because each time it arrives feeling like fresh reasoning rather than a script you have already run.
Write the prediction down with a date and a number before you act on it. A prediction you can score stops being a mood.
Putting money back repairs a belief. “I’m a good trader” is what the loss threatens, and reloading keeps the verdict open. It converts shame you can’t hold into hope you can. Sitting still would make the loss final, which is why sitting still is the expensive part.
Underneath is usually something like “I’m not cut out for this.” Read plainly, that is a statement about one skill in one domain. Almost nobody is cut out for discretionary trading, about the way almost nobody is cut out for professional poker. Trading is one hypothesis about how to reach a financial goal. Dropping a method that failed is not failing at the goal.
| Situation | The failure |
|---|---|
| Green morning | can’t stop |
| Red morning | can’t accept |
| No setup | can’t sit out |
| Blown account | can’t let it be final |
All four are an inability to be done, to let a state stand and do nothing about it.
Flat is a position. It’s the one position that’s hard to hold.
Afternoon giveback is not a separate discipline problem. It’s the reload loop compressed into a single day, where a $500 loss you can’t accept turns into $5,000.
It rarely says “I want action.” It says volume is picking up, or that’s the same setup as this morning, or just a small one with no size.
A usable test: say the setup out loud in one sentence before you click. Real setups survive being spoken. Impulses fall apart halfway through.
Restlessness rises, peaks, and passes, usually inside half an hour. You do not have to win the argument, only outlast it. Name it (“this is the wave, not a signal”), write down the time, get up and walk instead of white-knuckling it at the desk, then log how long it took to pass. Twenty entries will show you your trigger pattern and give you evidence that the thing breaks without a trade.
Do not take a small version of the trade. That is the door from one mistake into a spiral.
The dangerous thought is not the first slip. It’s the one right behind it: well, I’ve already broken the rule, might as well. Stop at the slip and it stays a slip.
A decision you make calm does not transfer to the version of you who is not calm. Planning around future-you’s judgment is how the loop keeps running. Use present-you’s judgment to remove future-you’s options.
That is all this extension is. Cool-state you, taking the button away from hot-state you.
Building the tool can quietly become a way to spend the day near the market. If you find yourself tuning the lock instead of being away from the screen, the loop found a new costume.
*://*.tradingview.com/* in all frames, before the page scripts get going.
window with capture: true for pointerdown, pointerup, mousedown,
mouseup, click, dblclick, and for Enter or Space on keydown and keyup. Capture phase runs before the
page’s own handlers, so the click is dead on arrival and the chart’s constant re-rendering
never gets a chance to detach anything.
data-name="side-control-buy". TradingView’s class hashes rotate
between builds, so class prefixes and label text are fallbacks only.
chrome.storage.local as two fields, locked and
lockUntil. The only permission requested is storage. There is no
account, no server, and no network call anywhere in the code.
This is friction, not a vault. Every one of these gets around it:
chrome://extensions.That’s fine for what it’s for. A few seconds of friction at the moment of the urge is often enough, because the urge is on a clock and you are only trying to outlast it. If you need something that actually holds, the strong versions live outside your own hands:
One external constraint is worth about five self-administered ones.
Manual lock only. Pick a duration, Buy stops working, no network calls, one permission. Everything above under “How it works” is this build.
Adds the locks you don’t have to remember to set:
PnL comes from the Daily PnL field in TradingView’s account manager header, read every two seconds
from an open tab. No reading means no trigger, so the schedule is the piece that works unattended.
Permissions are storage and alarms, on tradingview.com only. Still no network calls.
Treat this one as a work in progress. It reads a panel whose markup TradingView can change without telling anyone, and a lock that silently stops firing is worse than no lock, because you stop watching for it. Check the badge says ON when you expect it to.
chrome://extensions.tv-buy-lock folder.I take no responsibility for anything that happens to your account, your computer, or your money. Use it at your own risk.
This was vibe coded by a random milkman on the internet. Don’t take my word that it works and don’t take my word that it isn’t spyware. Either zip is a few hundred lines of readable JavaScript, CSS, and HTML. Open it, paste the files into Claude or ChatGPT, and ask whether it does what this page says and whether it sends anything anywhere. Then decide.
Nothing here is financial advice, and nothing here is a substitute for talking to an actual professional about compulsive behavior.