0
votes

New to pine script so forgive me if this is a dumb question.

Say I have a strategy that I would like to plot a moving average and MACD. It seems that it is not possible get the moving average on the price panel and the MACD on a separate panel? If I use overlay = true everything is on the price panel. If I use overlay = false, everything is squished together on a secondary panel.

Would the best way to have the indicators show as I would be to have the strategy only plot say the MACD and then add the moving average indicator to the chart outside of the strategy for visual purposes?

1
Not possible. The single option for a script that is loaded on a separate pane to plot/draw somthing on the chart pane at the same time - is to use 'barcolor()' function that will assign colors to price bars/candles. Any 'plot()', 'plotshape()' etc will be only drawn on the indicator's pane.e2e4

1 Answers

0
votes

Unfortunately this is yet another PineScript limitation, you can only plot everything as an overlay, or everything as a separate panel.