Auto-trade a Pine Script strategy on Robinhood: what actually executes
You wrote the strategy, the backtest holds up, and the alert fires. The order still has to be placed by something. This page is the whole path from the script to a Robinhood market order, and the list of what does and does not execute, so you can decide before you connect anything.
Why TradingView cannot place the order itself
A strategy() script runs on the chart: it backtests, it forward-tests on live bars, and it fires alerts. It does not talk to a broker. TradingView's broker panel supports the brokers that publish an integration, and Robinhood is not one of them. The only exit for a strategy signal is an alert, and the only exit for an alert that a machine can act on is the Webhook URL field under Notifications, which needs a paid TradingView plan with two-factor authentication on.
So every "TradingView to Robinhood" setup is the same shape: alert, webhook, a bridge that turns the message into an order, a connection the bridge holds to the account.
What the Robinhood agent account changes
Robinhood now lets you approve an agent on Robinhood's own sign-in page and scope it to one account. A bridge no longer needs your password or a scraped session. Pineflows uses exactly that: you click Connect Robinhood in the workspace, sign in on Robinhood's page, pick the account enabled for Agentic Trading, approve. The Pineflows bridge, a small Chrome extension with no buttons and nothing stored, hands the result back, because Robinhood only returns it to an address on your own computer. What Pineflows keeps is the access token Robinhood issues, encrypted at rest and refreshed while your automations run. Disconnect from the workspace at any time; live automations are paused the moment you do. Details: Connect Robinhood.
Pineflows never asks for a Robinhood password or a reusable token, not in the Claude chat and not in a form.
The path, step by step
- Claude reads the script. Add the Pineflows connector to Claude and paste your Pine Script into the chat. Claude classifies it (
strategy(), oralert()/alertcondition()rules), derives sample alert strings, validates an adapter against them, creates the automation in test mode and hands you a webhook URL ending in/api/webhooks/tv/<token>. See Connect Claude. - One alert on the chart. Condition: your strategy. Message: TradingView's default, or the template Claude gave you. Notifications: Webhook URL pasted, expiration open-ended. See TradingView alert.
- One real alert verifies it. TradingView's Send test sends the placeholders unfilled and is recorded as
unrecognized; the first alert fired by the strategy on a bar is parsed into the order Pineflows will place and marks the automation verified. See Send test and placeholders. - Connect Robinhood as above.
- Ask Claude to go live. Live is refused until three things are true: one verified real alert, Robinhood connected, the trial or plan active. Only Claude sets it, when you ask; Claude names whichever prerequisite is missing. Pause is one button in the workspace.
The automation you verified in test mode goes live without a rebuild, under the same rules.
What executes
- Instruments: US equities and ETFs on a Robinhood cash account. No options, crypto, futures or margin.
- Direction: long entries and exits to flat. A short signal, or any negative
{{strategy.position_size}}, maps to a target of0shares: the automation sells what it owns and never opens a short. - Order type: market orders, good for the day, fractional quantities allowed. No limit, stop or bracket orders; exits come from your script's alerts.
- Quantity: mirrors the alert. The order is the target position minus what the account owns, sells capped at what is owned. A default quantity applies only when the alert carries none; no quantity and no default is recorded as
missing_quantityand never executed. - One instrument per automation. An alert for another ticker is recorded as
wrong_instrumentand never executed. - Every order in the signal log with Robinhood's order id and fill state: submitted, filled or rejected. If Robinhood cannot be reached after an order was sent, the alert is recorded as
unknownand never re-placed; check the order in Robinhood before doing anything by hand.
The five failure modes, and the default that answers each
| Fear | Default |
|---|---|
| Runaway loop: the bot buys on every bar | Every automation starts in test mode; nothing is placed until you ask Claude for live. Pause is one button, and every alert after it is recorded as blocked_paused. |
| Duplicate orders: TradingView delivers the same alert twice | Every parsed alert carries an event ID. The last 200 per automation are kept; a repeat is logged as duplicate and dropped. |
| Wrong ticker: the alert lands on a symbol you never backtested | One instrument per automation; any other symbol is wrong_instrument, never executed. |
| Credentials: a bridge holds your login | Sign-in happens on Robinhood's page, scoped to one account; no password, no reusable token; disconnect pauses everything live. |
| A test that proves nothing | Send test is unrecognized and never verifies; only a real fired alert does. |
Questions this page gets asked
Does Send test count? No. It posts the message with {{...}} unfilled. See Send test and placeholders.
Do I need a paid TradingView plan? Yes. Webhook notifications need a paid plan with two-factor authentication on. The free plan can write and backtest the strategy, but the alert cannot leave TradingView.
Can it short, or use limit orders? No. Long only, market orders. A short signal flattens the position.
What happens on disconnect? Live automations are paused the moment you disconnect Robinhood in the workspace, and the stored token is dropped. Reconnect at Robinhood's sign-in whenever you want live orders again.
What does it cost? A seven-day free trial with no card, then one flat monthly plan. Only live mode checks the plan; wiring up and verifying a strategy in test mode needs neither.
The narrative version of this page, with the comparison to TradersPost, SignalStack, PickMyTrade and Quannected, is Connect TradingView alerts to Robinhood.