← Back to list

My Pine Script Learning Journey — Part 1: Discovering TradingView and Pine Script

Welcome to my Pine Script learning journey!

Bhaskar Das in Algorithmic and Quantitative Trading · 2026-05-31 10:25 · 0 claps · 5.3 min read paywalled
#algorithmic-trading #pine-script #forex-trading #investment #hedge-funds
Open on Medium ↗
Wiki topics: INV · Investing & Markets EDU · Education & Learning 💻 · Programming

My Pine Script Learning Journey — Part 1: Discovering TradingView and Pine Script

made with love on canva.com

made with love on canva.com

Welcome to my Pine Script learning journey!

Through this series, I will document my experience of learning Pine Script completely from scratch and exploring the many things that can be built and achieved with it. My goal is not only to learn the language but also to share every discovery, challenge, mistake, and breakthrough along the way.

Think of this series as a learning diary where we explore together. Rather than presenting myself as an expert, I’ll be sharing my experiences as a fellow beginner, documenting what I learn, the resources I use, and the insights I gain throughout this journey.

So, if you’re ready to start from zero and learn alongside me, let’s take the first step together.

Step 1: Signup with Trading View

The first step in learning Pine Script is creating an account on TradingView, since Pine Script is TradingView’s proprietary scripting language. Unlike traditional programming languages that can be installed and run on your local machine, Pine Script is a cloud-based language that runs exclusively within the TradingView platform.

This means you cannot download and install Pine Script separately. To write, test, and execute Pine Script code, you must have a TradingView account. Once registered, you’ll gain access to TradingView’s charting platform, where you can create custom indicators, develop trading strategies, backtest ideas, and explore the full capabilities of Pine Script.

Step 2: Start learning some programming basics

If you’re a complete beginner with no prior programming experience, I highly recommend spending some time learning the fundamentals of programming before diving into Pine Script. While Pine Script is relatively easy to learn compared to many other programming languages, having a basic understanding of programming concepts such as variables, conditions, loops, and functions will make your learning journey much smoother.

Python is an excellent language for learning these fundamentals because of its simple syntax and beginner-friendly ecosystem. Fortunately, there are plenty of free resources available online to help you get started:

• W3Schools Python Tutorial: https://www.w3schools.com/python/default.asp

• FreeCodeCamp: https://www.freecodecamp.org/

The good news is that, as traders and investors, we don’t need to become professional software developers. At this stage, a basic understanding of programming concepts is more than sufficient to start writing Pine Script indicators and strategies. You can always learn more advanced programming techniques later as your requirements grow.Step 3 : Start to get familiarized with Pine Script

Familiarize with variables and what purpose the scripting language serves. The below link helps you to get started.

[embed]Primer / First steps Everything you need to know about Pine Script®.www.tradingview.com

Pine Script Helps in writing three types of scripts

  1. Indicators
  2. Strategies
  3. Libraries

Indicators

Indicators are mathematical calculations applied to price and volume data to help traders analyze market trends, momentum, volatility, and potential trading opportunities. If you’ve spent any time exploring technical analysis, you’ve likely come across popular indicators such as the Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), Bollinger Bands, Moving Averages, and many others.

One of the advantages of learning Pine Script is that TradingView already includes the source code for many of its built-in indicators. This gives beginners an excellent opportunity to study how these indicators are implemented, understand the underlying logic, and learn Pine Script by examining real-world examples.

In fact, exploring and modifying existing indicator scripts is one of the best ways to begin your Pine Script journey. By doing so, you’ll not only learn the language faster but also gain a deeper understanding of how popular technical indicators work behind the scenes.

Strategies

They can be a slightly advanced concept for beginners, but let’s understand them in simple terms.

A trading strategy is a predefined set of rules designed to help traders make consistent trading decisions with the goal of generating profits over the long run. Instead of relying on emotions or guesswork, a strategy tells you exactly when to enter a trade, when to exit, and how to manage risk.

To build a strategy, developers typically combine one or more technical indicators with a set of trading rules. Some strategies may be based on a single indicator, while others use multiple indicators working together. In many cases, strategies also incorporate additional conditions such as price action, market trends, volume, or time-based rules.

A trading strategy can define:

  • When to enter a trade (Buy/Sell signals)
  • When to exit a trade
  • Profit targets (Take Profit)
  • Risk management rules (Stop Loss)
  • Position sizing rules
  • Time-based entry and exit conditions

For example, a simple strategy might generate a buy signal when a short-term moving average crosses above a long-term moving average and exit the trade when the opposite crossover occurs.

One of the most powerful features of Pine Script is its ability to create and backtest trading strategies. This allows traders to evaluate how a strategy would have performed on historical market data before risking real money in the market.

Libraries

They represent one of the more advanced concepts in Pine Script and are typically used by experienced developers to organize, reuse, and share code across multiple indicators and strategies.

In simple terms, a library is a collection of reusable functions and code modules that can be imported into different Pine Script projects. Instead of rewriting the same code repeatedly, developers can place commonly used logic into a library and reuse it whenever needed.

For example, a mathematical library may contain specialized functions for statistical calculations, custom moving averages, volatility measurements, or other complex computations. Developers can then import this library into their indicators and strategies rather than implementing the same functionality from scratch each time.

In many cases, professional traders and developers create proprietary libraries tailored to their specific trading methodologies, asset classes, or analytical models. These libraries may contain unique calculations, custom indicators, risk management functions, or advanced algorithms that provide a competitive advantage. By keeping such logic within a dedicated library, they can maintain cleaner code, improve maintainability, and easily reuse their proprietary tools across multiple trading systems.

As a beginner, you don’t need to worry too much about libraries right away. However, it’s useful to know that they exist and play an important role in building larger, more sophisticated Pine Script projects.

Where Can You Find Pine Script Code on a TradingView Chart?

If you are wondering where to find the pine script in the main chart, I will explain you

When you open any technical chart on the platform for the first time you will see the following screen

From the top menu click on indicators and then search RSI. Although there are several indicators RSI is the most simple indicator and that can be easily explained.

Click on RSI and it will be applied to the chart

When you hover over the settings option in the RSI as shown above you will see source code option. Click on it.

A pine editor will open with the RSI indicator code as shown above.

Congratulations you have learned to explore the pine editor. In the next tutorial we will learn more about the pine editor and variables.


메타데이터
post_id
aacd3ce17cc9
slug
my-pine-script-learning-journey-part-1-discovering-tradingview-and-pine-script-aacd3ce17cc9
url
https://medium.com/algorithmic-and-quantitative-trading/my-pine-script-learning-journey-part-1-discovering-tradingview-and-pine-script-aacd3ce17cc9
canonical_url
https://medium.com/algorithmic-and-quantitative-trading/my-pine-script-learning-journey-part-1-discovering-tradingview-and-pine-script-aacd3ce17cc9
author_url
https://medium.com/@bhaskarndas
status
ok
fetched_at
2026-06-09 15:37:30