I wanted to do a fun and, yet, educational post, and a topic that kind of intrigued me was discussing why you… yes, YOU.. should learn at least some Pinescript. So, I wanted to talk about the top 10 reasons why you should learn Pinescript if you are an active day or swing trader, or even if you’re just an investor. But first, let me preface this with my personal experience. I owe my entry into Pinescript programming to a fellow Tradingview user, who in my early days of Tradingview posting, was one of the first of the 1 or 200 people who followed me. He was intrigued by my statistics knowledge and I, intrigued by his coding knowledge. We consulted and, as a result, the SPY Volume Weighted Close, the TSLA Scalp Indicator and the BTC RPPI indicator were born (click on the links to access those indicators which are publicly listed). This has since advanced to a single indicator that houses up to 20 to 30 different math models on various tickers and indices, and can predict prices with accuracy ranging up to 99%! It didn’t stop at this though, as of posting I have about 6 personal indicators I use on a daily basis and over 40 publicly available indicators that use and convert math concepts into trading based strategies and am currently working on 3 more complex indicators for public release, as well as a statistical function library. Keep in mind, up until last year, I had no programming or coding experience, save for learning some basic functions in Excel, SPSS, SAS and R as part of my graduate studies. I had not a clue of any of this stuff and, to be honest, I couldn’t even troubleshoot my own printer when it was malfunctioning. How did I do it? Well, by simply trying it. Most people learn by doing, and coding is no different. I simply opened up the pine editor dashboard and got to work with trial and error: An example of one of my first codes I did for myself. Very basic, but very useful and helpful! But enough about me, let’s get into why you, the reader, should learn Pinescript!
- Pinescript will take your trading to the next level.
I am serious. Before learning Pinescript, my trading setup, by my standards now, was archaic. I have a total of three monitors, only 1 and a half actually had charts. The rest were occupied by excessive amounts of Excel sheets and variables that I had to manually copy over to my broker:
Since learning Pinescript and integrating my strategy into code that functions real-time. My monitors are filled with actual charts like this:
Almost any strategy can be coded into Pinescript, you don’t need to be a math based trader. For example, chartists and pattern traders have made some very impressive and accurate Harmonic Chart Pattern Indicators, such as the MZigZag by Trendscope:
The Elliot Wave Indicator by Luxalgo:
For chartists, there are many Candlestick identification indicators such as the one by JustuncleL:
And the list goes on! Pinescript is so versatile that all strategies, whether they be qualitative or quantitative in nature, have the ability to be operationalized into Pinescript.
- It will force you to really understand your strategy.
What I mean by this, is when you attempt to quantify your strategy into an indicator, it really forces you to truly understand such things as:
a) What exactly am I looking at?
b) What exactly are my entries?
c) What exactly are my exits?
d) What exactly am I looking for to validate my entries?
e) What exactly am I looking for to validate my exits?
I can speak from personal experience, when I started using Pinescript to carry over my own strategy, I was able to make vast improvements and make my strategy easier. If you follow me, you may know I like to use “thresholds”. While I did use thresholds before Pinescript, which (if you are a long term follower you will remember) I called bullish and bearish “Breaks”. This was a complex, mathematically calculated thing that, while it was somewhat effective, it was very cumbersome to calculate and execute.
When I merged over to Pinescript, I was able to see that this could be simplified much more by simply using an ATR approach. And this has proved to be one of the single most amazing improvements that have been a huge game changer for me in my own strategy.
- It will teach you new things... and sometimes it will teach you old things.
There is the obvious, you are learning a new skill, i.e. coding. But one thing that Pinescript has done for me, is forced me to re-learn things that I haven’t done since my masters. I can do a regression model or probability model in about 30 minutes with software. It was my job for many years. But, did I remember how this was done mathematically? No!
When I integrated my strategies into Pinescript, I had to actually re-learn how to manually calculate Cumulative Distributions, Binomial probabilities, Regression calculations and many more things that I used on a daily basis, but actually really forgot the basics of! Now, when I run a binomial probability model for my job or for school, I now understand what exactly the software is doing!
- You will have a better grasp on a lucrative skill.
Trading is big business. From prop traders to independent traders. Trading, when done correctly, can be incredibly lucrative. In today’s modern world, quantitative methodologies are reigning supreme not only for retail traders, but also for big institutions. Tradingview is actually a platform that has been widely adopted by the masses and it’s the only platform that has immediate integration of coding with exchange data. As such, there is a huge demand for Pinecoders and those who understand how Tradingview’s coding systems functions. Many people who are proficient enough in Pinecoding actually can make quite a bit simply coding for various traders and even some businesses. People have actually made self sustaining businesses out of Pinescript alone!
- The skills are transferable to other languages.
Pinescript was the first coding language I learned and the only coding language I am actually proficient in. However, it has helped me better understand and get a grasp on other languages like Python, and even languages that I have used before such as R. I am an avid vintage computer collector (I know, could I possibly get anymore nerdy?) and I recently watched a video of a programmer programming in Basic on an Apple II computer. I was actually able to follow along with what he was doing and understand exactly why he was doing things in certain ways. About 1.5 years ago, I would have had no clue what he was talking about when he said “You need to push this to an array” and “Pull from a matrix”.
- Pinescript allows you to channel your passion in productive ways.
Trading is 100% a passion. Chances are if you are not passionate about it, you aren’t doing it. Pinescript allows you to channel this passion in a way that is productive. When I started trading, I would obsess over charts day and night. Look for things I “missed” and why I was losing money every day I even looked at the market. This was helpful and a very important step to becoming a successful trader, but there is a limit to this. Perseverating too much on all of the reasons and possibilities a market does what it does during your downtime can be very harmful to your mental health and, at the end of the day, the returns are diminishing to your efficacy as a trader. At the end of the day, the market is a product of randomness. No amount of staring at charts and hypothesizing all possible scenarios is going to have lasting tangible benefits to you.
Pinescript allows you to remain engaged with the market during downtimes in a productive way. It will help you understand the market more and give you a healthy and productive activity that keeps you engaged with the market in a productive way. I no longer obsess about charts or revising my analysis that much anymore. Now, I channel that drive into developing indicators/software that applies different theories and ideas I learn and/or speculate about in a useful and practical way.
- Learning a new skill is good for the brain…. And the soul.
I can cite the numerous epidemiological studies that have found those who engage in continued learning are less likely to develop dementia, rank higher on quality of life measures, have less risk of mental illness such as depression and anxiety and are just generally more well adjusted people. Learning a new and challenging skill will keep you engaged, thinking and can even contribute positively to your health!
- Its challenging, but not impossible.
Chances are, if you can master trading, you can get a basic, fundamental grasp on Pinescript and more. Trading is a very challenging skill. Pinescript is challenging, but not impossible. If you like solving the puzzles that are involved with trading, you will likely enjoy the logical puzzles that Pinescript will present you with. Furthermore, Pinescript is actually slightly more intuitive than other programming languages such as Python. However, I do know Python programmers who may disagree, but the reality is, it is for someone with no prior coding experience. For the most part, Pinescript makes sense, more so than some other languages out there. But I may be biased here.
- You will be apart of an amazing community.
Pinecoders are an amazing community of like-minded individuals. Not all python coders are traders, but all pinecoders are traders! You all share the same passion, and that is for trading (and hopefully, if you give it a shot, you will also, like me, develop a passion for coding).
As such, by getting into Pinecoding, you are joining a group of like-minded individuals in the pursuit of making advancements in a field that has increasing demand for innovation.
- Because why not?!
What other reason do you need besides “why not”? Its fun, its challenging and it keeps you stimulated. What more could anyone want?!
And that’s it! Hopefully you took something away from this. If you are interested in starting to learn Pinescript, there are many great resources on Youtube and right here on the Tradingview community! I have done some tutorials myself, but some really helpful Tradingview users that actively provide educational content on Pinescript are:
Quantnomad
KioseffTrading
Stockjustice
ZenAndtTheArtOfTrading
And there are many more, but those are some of the main ones I have found or come across in my search of Pinecoder educational content.
Anyway, that’s it for now. Safe trades my friends and take care!