Free help with Pinescript

This page lists useful resources, gives advice on scripting, and explains how to get free help. If you want to hire me, see this page.

Scripting resources

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:

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.

Ask for 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://www.pinecoders.com/

🌍 Share this:

Get an email when I release new stuff.