FAQ

How to write your first, simple backtrader strategy

QuantNomad

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

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 →

QN – Crypto Digest #1 – Nov 14, 2021

Crypto has dominated financial news this week. This Sunday, Bitcoin brings the most awaited update in four years. Major payment companies are launching crypto-cards for more adoption. Smart-contract projects also benefit from this trend, highlighting Avalanche. But not all attention is on Bitcoin. Here are the five major headlines from November 8th: Avalanche Ready To QN – Crypto Digest #1 – Nov 14, 2021 Read More →

How to fix “Value with NA type cannot be assigned to a variable that was defined without type keyword.”

You can receive this error by running this simple code: Add to Chart operation failed, reason: line 5: Value with NA type cannot be assigned to a variable that was defined without type keyword The issue is that PineScript doesn’t know what type should this variable be. It can’t guess the type from the NA How to fix “Value with NA type cannot be assigned to a variable that was defined without type keyword.” Read More →

Empyrial – The Easiest Way to Optimize Portfolios in Python

Portfolio calculation and optimizations are very basic tasks in Quantitative Finance. But people who are just started programming might have issues with them. Empyrial library in Python might be a solution for simple portfolio tasks. It encloses data downloading and all computations behind a super simple interface. You can literally code optimization in 1-2 lines Empyrial – The Easiest Way to Optimize Portfolios in Python Read More →

How to fix the `transp` argument will be deprecated soon error?

You may have noticed the following warning message in your PineScript indicator scripts: The `transp` argument will be deprecated soon. We recommend using color.new() or color.rgb() functions to specify the transparency of the plots instead. Below is an example of code that causes this warning. Why does this error occur? This warning message occurs simply How to fix the `transp` argument will be deprecated soon error? Read More →