Quick Start Tutorial

Build a strategy, backtest it, and go live — all without code

What is PineCoder?

Create TradingView Pine Script strategies visually, then connect your broker to automate trades.

No coding required
30+ indicators
Automated trading

Building Your First Strategy

1

Configure Basics

Start by setting up your strategy's basic parameters in the Basics section:

Date Range

Set the backtest period with Start Datetime and End Datetime. Your strategy will only execute trades within this window.

Strategy Settings

  • Overlay: True = indicators on price chart, False = separate pane
  • Currency: Base currency for calculations
  • Initial Capital: Starting account balance
2

Add Strategy Elements

Add the indicators and equations you'll use in your conditions. Click Add Element and choose:

Indicator Technical Indicators

Choose from 30+ built-in indicators:

SMA EMA RSI MACD Bollinger Bands ATR Supertrend ...and more
Pro Tip: Multi-output indicators like MACD and Bollinger Bands automatically expand into their components (macd/signal/hist, upper/middle/lower) in condition dropdowns.

Indicator Configuration

Value

Period or parameters (e.g., 14 for RSI, 12,26,9 for MACD)

Operates On

Price source: close, open, high, low, volume, or another indicator

Timeframe

Multi-timeframe analysis: 1m, 5m, 15m, 1h, 4h, 1D, 1W, 1M

Symbol

Use "Alternate script" to reference another symbol

Equation Custom Calculations

Create custom formulas by combining indicators with math operators:

Example: EMA(20) - SMA(50) * 1.5
3

Define Entry Conditions

Set up when your strategy should enter a trade. Click Add Entry Group to create condition groups.

How Conditions Work

Within Group

Conditions inside a group are combined with AND or OR (you choose)

Between Groups

Multiple groups are always combined with AND

Condition Structure

[Element 1] [Action] [Element 2]

Example: RSI(14) Crosses Above 30

Available Actions

  • Crosses Above / Crosses Below
  • Greater Than / Less Than
  • Greater Than or Equal / Less Than or Equal
  • Equal To / Not Equal To

Within Last: Use this option to check if a condition was true at any point in the last N candles (e.g., "RSI crossed above 30 within the last 3 candles").

4

Define Exit Conditions

Configure when to close positions. Works exactly like Entry Conditions.

Example Exit Setup

Group 1: RSI(14) Crosses Below 70
Group 2: Price Less Than EMA(20)
Both groups must be true to exit (AND logic)
5

Add Plots and Visual Indicators

Visualize your indicators on the chart with the Plots and Alerts section.

Plot an Element

Draw any indicator on the chart. Customize line width and color.

Background Color

Color the chart background based on a condition (e.g., green when RSI > 50).

6

Save and Generate Pine Script

Save Strategy

Click Save Strategy to store your configuration. You can edit it anytime from the Dashboard.

Generate Code

Click Generate Pine Script to create production-ready code. Copy it directly into TradingView's Pine (on the right side of the chart).

Automate Your Strategy

7

Connect Your Broker & Go Live

Once your strategy is backtested and ready, connect a broker to automate trade execution.

TradingView Alert

PineCoder Webhook

Order Executed

A

Connect Broker

Go to Broker Connect, click + Connect New Broker, enter your API credentials.

B

Copy Webhook URL

After connecting, copy your unique webhook URL from the broker panel.

C

Set Up TradingView Alert

Create an alert on your strategy in TradingView, paste the webhook URL, and set the JSON payload.

Supported Brokers

Zerodha OAuth
Fyers OAuth
Delta Exchange API Key
Webhook Forwarding Any broker

Example TradingView Alert Payload

Paste this JSON in your TradingView alert's webhook message body:

{
  "action": "buy",
  "symbol": "RELIANCE",
  "qty": 1
}

PineCoder reads action, symbol, and qty from the payload and places the order on your connected broker.

Webhook Forwarding

Don't see your broker? Use Webhook Forwarding to relay TradingView alerts to any external URL. Configure separate buy and sell endpoints — works with any broker that accepts webhooks. Active for 7 days at a time, renewable with one click.

Example: Simple RSI Strategy

Here's a complete example of a simple RSI mean-reversion strategy:

Strategy Elements

  • RSI (14, close)
  • Number: 30 (oversold)
  • Number: 70 (overbought)

Entry Condition

RSI Crosses Above 30

(Buy when oversold reverses)

Exit Condition

RSI Crosses Below 70

(Sell when overbought reverses)