Adding a second plot to a new panel in an indicator

I’ve written a new indicator, and I’d like to add a second plot to it that would be displayed in its own panel at the bottom of the chart, similar to how the built in RSI indicator displays.

I read an old forum post about it, but couldn’t quite make sense of it. In particular, I don’t see how to specify what panel the plot appears in, or how to set the range or thresholds. If it makes a difference, what I’m plotting will return values of 1, 0, or -1. These are buy/do nothing/sell signals, and I want to turn them into a plot so they’re accessible from Strategy Builder.

After I get it set up, it looks like within OnBarUpdate() I just assign values for each plot in the order of their creation with Values[0][0], Values[1][0] etc. But how should I create it?

Old forum post