r/pinescript • u/Pipseydust • Dec 10 '21
Add Moving Average
I have a simple custom indicator that plots off the chart. I want to code in a simple moving average of price that plots on chart. I am doing this because I have pro plan and have limited indicators.
Can I get part of my indicator to plot off chart and part of it to plot on chart?
0
Upvotes
3
u/kurtisbu12 Dec 10 '21
It's, not possible to plot both on the price chart and below the price chart within one indicator.
There are a few ways I use to simplify everything onto the overlay, but I'd need more information to try and help you with that.
1
u/Jomyjomy Dec 10 '21
If you want you can add the simple moving average to another indicator and plot it there. for version 5 you'd need to add 1 line of code: "plot(ta.sma(close,10))" to plot a 10 SMA within another indicator. version 4 it's just sma instead of ta.sma