TradingView logo

This page lists all TradingView programming articles, starting with a basic understanding of TradingView Pine and ending with more complex concepts.

Besides the articles below, there’s also a page with the TradingView programming recipes.

Part I: The fundamentals of TradingView Pine

In this first part we look at the basic fundamentals of the TradingView Pine programming language.

Operators

icon Operators are used in TradingView for a wide range of operations, and perform actions like addition, comparing true/false values, and creating functions. The articles below discuss the various operators and how they work, starting with the chapter’s introduction and ending with a summary of operators.

Introduction

Assigning values to variables

Arithmetic operators

History operator

If/else statement-like behaviour

Operators and true/false values

Creating single-line and multi-line functions

The order of operations

Summary

Back to table of contents ↑

Part II: Working with TradingView Pine

In this part we take a closer look at the different features in TradingView and how we can use these programmatically.

Inputs

icon In this chapter we discuss how we can add manual input options to TradingView indicators and trading strategies. The introduction provides an overview of the chapter, while the summary recaps the most important points.

Introduction

Input options

Summary

Back to table of contents ↑

Colours

icon In this chapter we discuss TradingView colours and how to work with them. See the introduction for an overview of the chapter and the summary for a quick overview of the most important points.

Introduction

The basics of colours in TradingView

Working with colours programmatically

Summary

Back to table of contents ↑

Background colouring

icon In this chapter we discuss how to apply TradingView colours on the chart’s full background (top to bottom) or a background section that’s between two plots or two horizontal lines. See the introduction for an overview of the chapter while the summary reiterates the most important points.

Introduction

Colouring the chart's full background

Colouring a section of the chart's background

Summary

Back to table of contents ↑

Price bars

icon In this (currently incomplete) chapter we look at creating custom price bars and colouring the instrument’s existing price bars.

Colouring price bars

Back to table of contents ↑

Part III: Indicators

In this part we take a closer look at the different features of TradingView Pine that we use when programming indicators.

Indicator settings

icon In this chapter we look at the different indicator settings that we can configure programmatically in Pine. The introduction provides an overview of the chapter, while we reiterate the most important points in the summary.

Introduction

Indicator properties

Oddities of indicator settings

Summary

Back to table of contents ↑

Part IV: Trading strategies

In this part we look at how we can program trading strategies in with the TradingView Pine scripting language.

Strategy settings

icon In this chapter we examine the different TradingView strategy settings, and how we can set those programmatically and by hand. Each article, besides discussing a certain feature, also contains an example strategy. An overview of the chapter is given in the introduction while we the summary reiterates the most important points.

Introduction

Configuring strategies programmatically

Setting a strategy's visual appearance

Specifying initial capital and currency

Pyramiding in TradingView

Order sizing in TradingView

Historical bar settings

Additional intra-bar calculations

Summary

Back to table of contents ↑

Appendix: Programming recipes

icon The TradingView programming recipes contain helpful and practical code ready to use in your indicator or strategy directly. Recipes each describe a specific situation and then jump to a proven solution, followed by a discussion of why the recipe works.

To browse the different question-and-answer recipes, visit the TradingView programming recipes page »

Back to table of contents ↑

All product names and trademarks are property of their respective owners. TradingCode.net is not associated with TradingView, Inc. nor compensated (financially or otherwise) by that company. Likewise, the mention of a broker or instrument is also done without a financial reward and merely serves an illustrative purpose.

Testimonials for TradingCode.net

"Thanks Jos, the content on your site is great for someone looking to make the jump to C#. I found it extremely helpful." Online forum review by The9000

View all testimonials »