This post had a duplicate so I deleted the second one.
So let me me explain what you are actually doing before providing the solution. When you say:
plot data = mm and cc;
What you are actually plotting is a true/false statement that says both mm and cc are true. Problem is that is not all what you want.
You can do this very simply by making very subtle changes to your existing code:
declare lower;
plot cc = ExpAverage(close, 13);
plot mm = ExpAverage(close, 48);
Yep, that really is all there is to it. If you want to see an example of displaying multiple plots in a lower study just take a look at the standard MACD study included with Thinkorswim. Experiment with it for a bit to understand how it works. The process of writing code, which is the continual process of learning, is nothing much more than taking something that works and breaking it. After you see the result of breaking something, you instantly learn something about it’s nature. The advanced programmer has highly developed skills of breaking things, in a way that reveals the true nature of the object being broken. Wow, that is a bit deep. Hope it inspires someone!
Thank you….. that was pretty inspiring…