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.
Building Your First Strategy
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
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:
Indicator Configuration
Period or parameters (e.g., 14 for RSI, 12,26,9 for MACD)
Price source: close, open, high, low, volume, or another indicator
Multi-timeframe analysis: 1m, 5m, 15m, 1h, 4h, 1D, 1W, 1M
Use "Alternate script" to reference another symbol
Equation Custom Calculations
Create custom formulas by combining indicators with math operators:
Define Entry Conditions
Set up when your strategy should enter a trade. Click Add Entry Group to create condition groups.
How Conditions Work
Conditions inside a group are combined with AND or OR (you choose)
Multiple groups are always combined with AND
Condition Structure
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").
Define Exit Conditions
Configure when to close positions. Works exactly like Entry Conditions.
Example Exit Setup
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).
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
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
Connect Broker
Go to Broker Connect, click + Connect New Broker, enter your API credentials.
Copy Webhook URL
After connecting, copy your unique webhook URL from the broker panel.
Set Up TradingView Alert
Create an alert on your strategy in TradingView, paste the webhook URL, and set the JSON payload.
Supported Brokers
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)