So far, we’ve written our code manually so you can get a feel for it. But let’s introduce something that can save us time, particularly if we’re writing more complex scripts, and we don’t want to do them from scratch.
On the top, right-hand side of your editor, click on New. You’ll get a dropdown menu with all kinds of different technical indicators. Click Moving Average Exponential to see the source code for an EMA indicator.
Go ahead and add this to the chart.
This one is different from ours – you’ll notice the input() functions. These are nice from a usability perspective since you can click on this box…
...and easily change some of the values in a pop-up window by clicking on the Settings wheel.
We’ll add a couple of input() functions in our next script to demonstrate this.
Plotting the Relative Strength Index (RSI) indicator
The Relative Strength Index (RSI) is another essential indicator in technical analysis. It’s known as a momentum indicator, meaning that it measures the rate at which assets are bought and sold. Presented on a scale of 0 to 100, an RSI score attempts to inform investors on whether assets are overbought or oversold.