How to Automate Your TradingView Strategy on Prop Firm Accounts

Automate TradingView strategy on prop firm accounts — laptop showing stock market investment data

Automate TradingView Strategy is a game-changer for traders. 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

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 + '","qty":0.1}')

if shortCondition
    strategy.entry("Short", strategy.short)
    alert('{"action":"SELL","ticker":"' + syminfo.ticker + '","qty":0.1}')

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), ticker, and qty (lot size).

Step 2: Configure TradingView Copier Pro

  1. Launch TradingView Copier Pro
  2. Copy the webhook URL from the dashboard (auto-generated via Cloudflare Tunnel)
  3. In the Copier Setup tab, configure symbol remapping if needed (e.g., GOLD → XAUUSD)
  4. Set risk parameters: max lot size, max daily loss, max open positions

Step 3: Set Up the TradingView Alert

  1. On TradingView, open the chart with your strategy
  2. Click the Alerts button → Create Alert
  3. Set the condition to your strategy's entry/exit signals
  4. Enable "Webhook URL" and paste your Copier Pro URL
  5. In the Message field, use TradingView's built-in placeholders:
    {
      "action": "{{strategy.order.action}}",
      "ticker": "{{ticker}}",
      "qty": {{strategy.order.contracts}}
    }
  6. Click Create

Step 4: Attach the EA to MT5

  1. Copy TV_Copier.mq5 to your MT5's MQL5/Experts/ folder
  2. In MetaEditor, compile the EA
  3. Drag the EA onto any chart
  4. Enable AutoTrading in MT5's toolbar
  5. The EA will poll the copier for new trade signals every 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 enforce:

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:

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 →