Get your API key

Beginner · 5 lessons · 46 min

Build TradingView indicators with AI (Pine Script)

Turn a chart idea into exact rules, let the AI write Pine Script v6, and check every marker yourself.

Education only. This is not investment advice and nothing here is a buy or sell recommendation. Trading carries risk of loss, and past results do not predict the future. Practise with TradingView's Paper Trading (fake money) only, never connect broker API keys or place live orders from these lessons. For personal advice, talk to a SEBI-registered Investment Adviser.

Who it's for

Students and office workers who look at NSE/BSE charts on TradingView, for swing or intraday learning, and cannot code.

What you'll build

Four working indicators (EMA line, EMA crossover markers, RSI with levels, a daily-trend filter), alerts, and one honestly read strategy test.

Why this course

AI chatbots write Pine Script that often fails to compile or does something different from what you asked, partly because they mix old and new Pine versions; TradingView itself warns about this. The most common hidden bug, repainting, makes indicators and backtests look better than they can ever work live. Meanwhile SEBI's studies show most individual traders lose money, so learning to test ideas honestly, on paper, matters more than any signal.

Take first: Prompting for AI coding

Lessons in this course

  1. 1Pine Script and your AI: the first indicatorWhat an indicator is (and isn't), the Pine Editor, the Indicator Rule Card, and a 20 EMA you check against the built-in one. 9 min Free
  2. 2Moving average crossover markersTwo EMAs with inputs, markers only on closed bars, and checking three crossovers by hand on a daily and a 15-minute chart. 9 min Log in to open
  3. 3RSI in its own pane, with levels and labelsBuild an RSI with editable 70/30 levels, shaded zones and labels, and prove its numbers match TradingView's built-in RSI. 8 min Log in to open
  4. 4A daily-trend filter on an intraday chartRead the daily trend on a 15-minute chart with request.security, avoid the future-leak and repainting traps, and test it. 10 min Log in to open
  5. 5Alerts and reading the Strategy Tester honestlyAdd alerts, turn the indicator into a test strategy with costs and slippage, and read the report without fooling yourself. 10 min Log in to open
Next upBacktest a strategy with Python and AITest a written trading rule on past data with costs, a train/test split and an honest report, without writing code yourself.