A common post across r/algotrading and r/TradingView: "Looking to Automate My TradingView Strategy — Need Advice." The answers usually involve complex Python code, broker APIs, and cloud servers. But there's a much simpler path.
If you already have a working Pine Script strategy on TradingView and you trade prop firm accounts on MT5, here's how to fully automate it — no coding required.
Automate TradingView Strategy: What You Need
- TradingView account (Essential plan or higher for webhook alerts)
- A Pine Script strategy that generates buy/sell signals
- MetaTrader 5 logged into your prop firm account(s)
- TradingView Copier Pro installed on the same machine
Step 1: Prepare Your Pine Script
Your strategy needs to generate alert messages that include the trade details. Here's a minimal example using Pine Script:
//@version=6
strategy("My Strategy", overlay=true)
longCondition = ta.crossover(ta.sma(close, 14), ta.sma(close, 28))
shortCondition = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28))
if longCondition
strategy.entry("Long", strategy.long)
alert('{"action":"BUY","ticker":"' + syminfo.ticker + '"}')
if shortCondition
strategy.entry("Short", strategy.short)
alert('{"action":"SELL","ticker":"' + syminfo.ticker + '"}')
if strategy.position_size > 0 and shortCondition
strategy.close("Long")
alert('{"action":"CLOSE","ticker":"' + syminfo.ticker + '"}')
if strategy.position_size < 0 and longCondition
strategy.close("Short")
alert('{"action":"CLOSE","ticker":"' + syminfo.ticker + '"}')
The key fields are action (BUY, SELL, or CLOSE) and ticker. Lot size is not read from the alert: the EA calculates it from the risk setting you choose for the account — a percentage of balance or a fixed dollar amount (both need the stop price as sl in the alert), or a fixed lot size.
Step 2: Configure TradingView Copier Pro
- Launch TradingView Copier Pro
- Copy the webhook URL from the dashboard (auto-generated via Cloudflare Tunnel)
- In the Copier Setup tab, configure symbol remapping if needed (e.g.,
GOLD → XAUUSD) - Set risk parameters: risk per trade (percentage of balance, fixed dollar amount or fixed lot size), daily drawdown limit, max trades per day
Step 3: Set Up the TradingView Alert
- On TradingView, open the chart with your strategy
- Click the Alerts button → Create Alert
- Set the condition to your strategy's entry/exit signals
- Enable "Webhook URL" and paste your Copier Pro URL
- In the Message field, use TradingView's built-in placeholders:
{ "action": "{{strategy.order.action}}", "ticker": "{{ticker}}" } - Click Create
Step 4: Attach the EA to MT5
- Copy
TV_Copier.mq5to your MT5'sMQL5/Experts/folder - In MetaEditor, compile the EA
- Drag the EA onto any chart
- Enable AutoTrading in MT5's toolbar, and allow WebRequest for
http://127.0.0.1:3000in MT5's options - The EA will poll the copier for new trade signals every half second
That's it. When your Pine Script strategy fires a signal → TradingView sends a webhook → TradingView Copier Pro receives it → the EA executes on MT5. Fully automated. No Python. No API keys. No cloud servers.
Prop Firm-Specific Considerations
Risk Limits
Prop firms have strict drawdown rules. Configure TradingView Copier Pro's risk settings to help enforce them:
- Daily drawdown limit: Set below your prop firm's daily loss limit (e.g., 5% for FTMO) to leave a buffer. Once it is hit, new entries are blocked for the rest of the day; open positions are not closed
- Risk per trade: Position size is calculated from your risk setting (a percentage of balance, a fixed dollar amount or a fixed lot size), not taken from the alert
- Max trades per day: Limit the number of new entries per day to manage drawdown
Weekend and Holiday Handling
If your strategy is designed for 24/5 markets, ensure alerts don't fire on weekends. Most Pine Script strategies handle this naturally since there's no price data on weekends.
News Events
During high-impact news (NFP, FOMC, CPI), spreads widen dramatically. Consider pausing automation during these events, or use wider stop losses to account for the volatility.
Partial Closes and Multi-TP
Advanced strategies take partial profits. TradingView Copier Pro supports partial close actions:
{"action":"CLOSE_PARTIAL","ticker":"EURUSD","qty":"50%"}
This closes 50% of the position at TP1, letting the rest ride to TP2. Your Pine Script can fire this alert at the first take-profit level and a full CLOSE at the second.
Monitoring Your Automation
Don't just "set and forget" — at least initially:
- Check the TradingView Copier Pro Trade Log daily
- Verify that every TradingView signal has a corresponding MT5 trade
- Monitor P&L alignment between TradingView paper and MT5 live
- Watch for symbol mapping issues (trades failing on specific instruments)
Automate Your TradingView Strategy Today
TradingView Copier Pro connects your Pine Script to MT5 prop firm accounts. No coding. No monthly fees.
Get TradingView Copier Pro →Frequently Asked Questions
Can I run my TradingView strategy on a prop firm account?
Yes. Most prop firms (FTMO, FundedNext, The5ers) allow algorithmic trading of your own strategy via EA. Your Pine Script fires webhook alerts, and a local copier executes them on the firm's MT5 account. What firms prohibit is copying someone else's signals.
Do prop firms allow webhook-based automation?
Generally yes, because the executing component is a standard MT5 Expert Advisor, which firms explicitly permit. The webhook is just how your own strategy communicates with the EA. Always confirm the specific firm's EA policy before the challenge starts.
What settings should I change for prop firm automation?
Set the copier's daily drawdown limit at 70-80% of the firm's limit as a buffer and cap the maximum trades per day. Handle trading hours and restricted news events in your Pine Script strategy itself (for example, only fire alerts during your session) if your firm has a news rule.