TradingView Tutorials

The Quant Nomad has over 6 years’ experience in the quantitative trading industry (15+ years in programming).
He has helped more than 200 traders and companies create/optimize their algorithmic trading models.
How to Add / Subtract Time in Pine Script
No Comments

Representing time and date in Pine Script can be problematic, especially for not-so-experienced developers. The output format for date/time may not make a lot of sense. As an illustration, let’s try to plot the date/time on your screen using the following code. You should get something like this: This happens because date and time are How to Add / Subtract Time in Pine Script Read More →

How to Plot an Indicator on Top of Price Chart With Separate Scale?
No Comments

You may sometimes need to display an indicator on top of the price chart (for instance, when you want to compare patterns in the indicator with the price). Issues may however occur with the price chart if the scale of your indicator is vastly different from the price scale. TradingView will try to display both How to Plot an Indicator on Top of Price Chart With Separate Scale? Read More →

How to Export TradingView Backtesting Data With a Free Account
No Comments

This method doesn’t seem to work anymore, check the following article: Exporting New TradingView Trades metrics to Excel In one of my previous posts, I detailed how it is possible to export strategy backtesting data (but only a Pro+ or Premium TradingView account). If you are a trader/user who only has a free TradingView account, How to Export TradingView Backtesting Data With a Free Account Read More →

How to Export TradingView Backtesting Data From a Pro Account
No Comments

You may want to export TradingView strategy backtesting data for any number of reasons. For instance, you could want to use data in other programming languages or analyze this data in Excel or analytics tools. The good news is that TradingView recently introduced a feature to make this process super easy for you. Keep in How to Export TradingView Backtesting Data From a Pro Account Read More →

How to write your first, simple backtrader strategy
No Comments

There are multiple libraries that you can use to backtest a strategy in Python. However, I often use Backtrader because it is a nice open-source framework that allows me to quickly test historical data, optimize strategies, and create visual plots. Backtrader comes across as being really flexible and quite easy to use – which makes How to write your first, simple backtrader strategy Read More →

How to Enter/Exit Positions on Bar Close in Pine Script Strategies
No Comments

Order placement commands are quite important to your TradingView strategy. But many people are surprised by the default behavior of PineScript when it executes market orders. Sample Strategy  For an illustration, the Pine Script code below highlights a super simple strategy.  In this strategy, we enter and exit long positions using market orders. We also How to Enter/Exit Positions on Bar Close in Pine Script Strategies Read More →