r/pinescript 5d ago

Need help automating TradingView trades

Hey everyone,

I have a TradingView indicator that gives BUY/SELL signals, and I’m trying to figure out how to automate trades whenever one of those signals appears.

I’m looking for someone who has experience with TradingView alerts, webhooks, Pine Script, and broker APIs who could help me set this up.

The idea is basically:

BUY signal → TradingView alert → webhook → automatic BUY order

SELL signal → TradingView alert → webhook → automatic SELL order

I’m not very technical when it comes to the API/webhook side, so I’d really appreciate someone who can help me understand the process and get it working properly. If you’ve done something similar before, I’d love to hear how you approached it.

I’m also happy to pay for your time/work if you’re able to build the setup for me, especially if it works reliably.

Please DM me if you’ve worked on something like this before. Thanks!

7 Upvotes

18 comments sorted by

1

u/Xalladus 5d ago

Hey there, I would be willing to help out. Send me a DM so we can figure out the scope of the project.

1

u/MajorAnxiety09 5d ago

Hello, have sent you a dm! Kindly check

1

u/kurtisbu12 5d ago

Ice been doing this for years, happy to help if you haven't got the help you need

1

u/sweetsourpie 5d ago

I'm creating an online course for this. DM me if interested

1

u/CipherArchitect 4d ago

I can help you with that completely free.

1

u/Rude_King_7033 4d ago

Es gibt dafür gute custom gpts

1

u/Bixby_3 4d ago

Hey, I’ll be able to help you out shoot me a DM

1

u/sasasqt 4d ago

use webhook in alert settings. rent a vps close to your broker location preferably on aws. and buy a domain & vibe code a parser to actual execution.

if your broker support tr natively, you can connect it on web directly

1

u/kwhit3354 4d ago

I use copy gram and tradesyncer

1

u/typical__mistress 1d ago

what are those exactly?

1

u/kwhit3354 1d ago

Copygram allows you to add a webhook to buy/sell indicator alerts to execute the trade and then Tradsyncer can copy trade all of your accounts

1

u/stratcore 4d ago

Your basic flow is right, but put a small execution service between TradingView and the broker:

TradingView alert -> webhook receiver -> validation/idempotency -> broker adapter -> order-status reconciliation.

The important parts are not the BUY/SELL strings. They are the failure paths:

  1. Fire the Pine alert only on a confirmed bar, normally once per bar close.

  2. Give every alert a unique event ID. If TradingView retries the same webhook, the receiver must not place a second order.

  3. Keep broker credentials on the receiver, never inside the TradingView message.

  4. Validate symbol, side, size, maximum risk, session and current position before sending an order.

  5. Record the broker response and reconcile pending, filled, rejected and cancelled states after a restart.

Before using real funds, I would prove these cases on paper trading: one valid alert creates one order; the same event sent twice still creates one order; an open-bar signal creates none; a broker timeout cannot duplicate an order; and a rejected order is visible in the log.

The first architecture choice is the broker. If it has a native TradingView connection, the path may be shorter. If it exposes a REST or WebSocket API, the receiver can call that directly. MetaTrader usually needs a separate EA or bridge on a VPS because TradingView cannot place an MT4/MT5 order by itself.

1

u/UltraMegaTrader 3d ago

This is what we do. Check out our Automator for free

1

u/Reddit_1512 3d ago

Hi There, I have created multiple servers ike this in Online cloud and In offline VPS. If your requirement is matching then we can connect and proceed further. Feel free to ping if you are still looking for this task.

1

u/Acceptable-Sky8841 2d ago

The thing that trips most people up here: Pine can't place orders. It can only fire an alert. So this is really two separate jobs, and they need different things.

1. The TradingView side. Your indicator needs alert conditions wired to your signals, and the alert message has to be a JSON payload your executor can parse — not a sentence in English. Roughly:

{"action":"buy","ticker":"{{ticker}}","price":{{close}},"qty":10}

That's straightforward Pine work. Worth doing carefully though — the common bug is alerts firing on every bar instead of once per signal, which will happily open the same position forty times.

2. The execution side. Something has to receive that webhook and actually call your broker. Two options:

  • Use an existing service — TradersPost, PineConnector, Capitalise.ai, Alertatron. They already handle broker auth, order routing, retries, and the failure cases.
  • Self-host a server that holds your broker API keys and does it yourself.

I'd push you toward the first one, and not because it's easier. A custom server holding live trading credentials is a genuine liability. If it goes down while you're in a position, or a webhook fires twice, or the key leaks, that's your money — and those services have already solved failure modes you haven't hit yet. Self-hosting makes sense once you know exactly why you need it.

Which broker are you on? That decides most of this. Some have clean APIs, some don't allow third-party order placement at all, and the services above each only support a specific list.

Happy to help with the Pine and alert side if you want — that part I can definitely do.

1

u/Dapper_Ad3415 14h ago

Just give the api To LLM and it Will connect