Get your API key

Lesson 1 of 5

Pine Script and your AI: the first indicator

What 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

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.

One step at a time, like flipping pages.

By the end of this lesson you will have your first TradingView indicator on a chart, written by AI from exact rules, and you will have checked that it draws the right numbers.

You need: a free TradingView account in a desktop browser, any AI chat or coding agent (for example the Playground) · Time: 9 minutes

  1. An indicator is a formula drawn on a chart. A 20-day average of closing prices, for example, is one number per bar, joined into a line. It describes what price already did. It does not know what price will do next.

    Pine Script is TradingView's own small programming language for writing indicators. You don't need to learn it line by line: the AI writes it, and you do the part the AI can't. You decide the exact rule and check that the chart shows what you meant.

    Why?

    People lose money when they treat a line on a chart as a promise. If you remember that an indicator is a description, not a prediction, every lesson in this course stays useful and safe.

    Careful

    This course teaches coding and checking skills. It is not investment advice, and no symbol here is a recommendation. Stock names like NIFTY 50 or RELIANCE are only test data for your code. Practise on paper only. For personal advice, talk to a SEBI-registered Investment Adviser.