Part of my learning process with TradingView has been to delve a bit into Pinescript.
I've been programming for a while now - more than 20 years. But I focus on developing modeling systems, adaptive AI types of solutions, and fully automated trading systems for clients.
Pinescript has been fun. Overall, I believe there are many advanced capabilities achievable in Pinescript as long as one sticks to simple principles.
_ a focus on core elements as separate script components _ remember to clean/document up your processes/arrays as you go _ develop core logic functions first, then go back and address display features _ remember to organize your code in a way you can clearly address version changes
In this example, I started with the idea of building a tool based on Fibonacci Price Theory, then came up with an idea to measure price pressure differently than others had done.
Once I started playing with the display features (plot) I was able to see how my initial scripts worked and how the calculated data represents price trends/changes.
For me, seeing is the biggest part of the process. If I can't see how the data looks - then it is almost unusable for me to build more advanced logical features.
That's why I suggest building each component of your system out as unique indicators. I want to see the data/indicator work before I try to build some additional trading logic with it.
Overall, I'm very happy with what I've built. It has taken me about 2 weeks to build all of this (only really applying a few hours every other day or so).
One last thing, use the newbar feature to control persistent variable features. Otherwise, you may end up creating something that processes every tick.