Pinescript is on its fifth version now, and a community has built up around it. There are lots of useful resources for learning Pinescript, including these:
- A great place to start: https://www.pinecoders.com/learning_pine_roadmap/
- Introduction to scripting on TradingView: https://backtest-rookies.com/getting-started/#tv
- TradingView Pinescript V5 reference: https://www.tradingview.com/pine-script-reference/v5/
- Article series for learning Pine: https://kodify.net/tradingview-programming-articles/
If you create something you’re interested in and study as much as you can at the same time, theory and practice will complement each other and you’ll progress fast.
Advice on scripting
Number 1 super-best coding tip: Make one change at a time, then save and test. Add as much debug as needed to make each change visible so you can test it’s doing what you think it’s doing.
How to deal with problems
When you get stuck, first recognise that it’s part of the process. Then try these things:
- Check your code for simple problems, like using the wrong variable, getting brackets wrong, or things in the wrong order.
- Find a TradingView built-in script or an open-source script that does something similar to what you want and learn from it. Don’t just copy it. If you do, you’ll still be reliant on other people. Also, you’ll have to make your own script open-source, because that’s how open-source works.
- Take the bit that’s not working and simplify it until it works. Then add all the complexities back one by one.
- Check the official reference material for the function you’re using. What you want might not be possible the way you’re doing it.
- Try a different logic. Most problems can be solved in multiple ways. Don’t get stuck on forcing it to work “your” way.
Trying to think laterally around problems develops your coding muscles.
Get free scripting help
Sometimes a problem is just too hard. Sometimes you stumble on something that should work, but the error is actually in Pinescript itself. Fortunately, there are kind souls who give up their own time to give you hints. Before asking for help:
- Try everything you can. This is to your benefit.
- Write down a concise and unambiguous summary of the problem. If people think they’ll need to ask multiple questions to find out what you really mean, they likely won’t bother.
- Write a list of all the things you’ve already tried to fix it. This shows respect for the time of the person you’re asking.
Then ask the wonderful people here: https://pinescripters.com/
Paid scripting help
If you’re reading this, you probably like my stuff and are thinking about asking me for help. I do take Pinescript jobs. I charge for this, because I simply don’t have time to give out both useful scripts and individual help for free. I decided to focus on creating useful scripts, most of which are and will be free (this is going pretty well and has helped thousands of people so far).
- Help fix or develop your own scripts
- Write an indicator or strategy for you, based on your own ideas
As of now, I only work in Pinescript. I can’t automate strategies for you.
How it works:
- My current rate is £75/hr.
- If we don’t know each other, you’ll need to pay all or part in advance. I take Paypal or crypto.
- Coding is a creative endeavour, so I can’t tell in advance exactly how long it will take. If it takes time because it’s difficult, that’s chargeable. If I have to learn something new in order to make it work, I won’t charge for that time.
- Some clients like to work in blocks of hours and review at intervals.
- I reserve the right to cancel a job in progress (and return that part of your money that represents the time I didn’t use) if the requirements are confused, keep changing, or it becomes too difficult to work together for any reason. Life’s too short.
- You retain all intellectual property rights and copyright. I’m not going to copy your code.
- You’re paying for my time, not for the result. I can’t guarantee that it will turn out as you are picturing it. I will do my best.
If this is cool, send me a message via the contact form and we can have a chat.