sgdata
sgdata

Reputation: 2763

Automated execution for pine-script strategy?

General question for any pine-script strategy.

For example from the documentation: https://www.tradingview.com/pine-script-docs/en/v4/essential/Strategies.html#a-simple-strategy-example

//@version=4
strategy("test")
if bar_index > 4000
    strategy.entry("buy", strategy.long, 10, when=strategy.position_size <= 0)
    strategy.entry("sell", strategy.short, 10, when=strategy.position_size > 0)
plot(strategy.equity)

Is it possible to have this strategy executed automatically at the indicated time through the TradingView platform?

This is for an equity strategy so I assume I'd have to have an equity supporting broker (TradeStation as opposed to OANDA or AMP) but even just automated paper trading execution?

Right now, I'm guessing that instead I might need to re-create my strategy through QuantConnect or Quantopian for that to work.

Upvotes: 0

Views: 1467

Answers (1)

bajaco
bajaco

Reputation: 980

You can use alerts to send signals, and do whatever you please with the signals. They've improved the alerts functionality recently, so it's definitely doable.

  1. Develop your strategy and ensure it is sending alerts as intended.
  2. Find a broker with an API that you want to use.
  3. Rent a VPS to listen for webhooks.
  4. Code your response to the webhooks to trade on your broker.

Upvotes: 2

Related Questions