Types
plot
The value `plot` gives back once it has drawn a series. Its use is to be passed on: hold it in a variable and hand two of them to `fill` to shade the band between the two plots. It exposes no fields of its own.
Example
indicator("Multi Plot Example", overlay=false)
// Generate a sample sine wave
length = 50
sineWave = math.sin(bar_index * 2 * 3.1415 / length) * 50
// Plot the sine wave as a solid line
plot(sineWave, title="Sine Wave", color=color.blue, linewidth=2, style=plotStyle.line)
// Plot the absolute sine wave as a histogram
plot(math.abs(sineWave), title="Absolute Sine Wave", color=color.green, style=plotStyle.histogram)
// Plot a cross marker at every bar based on sine wave peaks
plot(sineWave > 40 ? sineWave : na, title="Peaks", color=color.orange, style=plotStyle.cross)
// Plot circles at troughs of the sine wave
plot(sineWave < -40 ? sineWave : na, title="Troughs", color=color.purple, style=plotStyle.scatter)