14 - TradingView & GoCharting
Overview
Architecture Diagram
┌──────────────────────────────────────────────────────────────────────────────┐
│ TradingView / GoCharting Integration │
└──────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ TradingView / GoCharting │
│ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ Pine Script Strategy / Alert │ │
│ │ │ │
│ │ strategy.entry() → Webhook trigger │ │
│ │ strategy.exit() → Webhook trigger │ │
│ │ alert() → Webhook trigger │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘
│
│ HTTP POST (Webhook)
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ OpenAlgo REST API │
│ │
│ POST /api/v1/placeorder (Simple orders) │
│ POST /api/v1/placesmartorder (Position-based orders) │
└─────────────────────────────────────────────────────────────────────────────┘TradingView Webhook Setup
Webhook URL
Alert Message Format
Pine Script Variables
Variable
Description
Example
Symbol Format Examples
Equity
Index Futures (NFO - Expires Tuesday)
Index Options (NFO - Expires Tuesday)
Bank Nifty Options (NFO - Expires Tuesday)
SENSEX Options (BFO - Expires Thursday)
Lot Sizes Reference
Index
Lot Size
Exchange
Expiry
Smart Order for Position Management
Webhook URL
Alert Message
Position Size Logic
Current Position
position_size
Result
GoCharting Webhook Setup
Webhook URL
Alert Message
JSON Generator Endpoints
TradingView JSON Generator
GoCharting JSON Generator
Price Types
Price Type
Description
Required Fields
Complete Webhook Examples
Intraday Equity Buy
Delivery Equity Buy
NIFTY Option Buy (Tuesday Expiry)
SENSEX Option Buy (Thursday Expiry)
Key Files Reference
File
Purpose
Last updated