โœ–

Home Forums Trading view How do I plot an indicator in a separate pane together?

How do I plot an indicator in a separate pane together?

  • Author
    Posts
    • Hi everyone,

      I’m creating a custom indicator in Pine Script, and I want most of the indicator to appear in a separate pane below the chart. However, I also want to plot a few things, such as shapes, lines, labels, or signals, directly on the main price chart.

      Is it possible to display plots in both places within the same indicator? If yes, what is the correct way to do it?

      Any explanation with a simple example would be appreciated. *

    • Yes, this is completely possible in Pine Script.

      Normally, when you create an indicator with:

      indicator("My Indicator", overlay = false)

      the entire indicator is displayed in a separate pane below the price chart.

      However, Pine Script allows individual plots and drawings to be forced onto the main chart by using the force_overlay parameter.

      For example:

      indicator("My Indicator", overlay = false)
      plot(close, force_overlay = true)

      In this example, the indicator itself still lives in the separate pane because overlay = false, but the plot() is forced to appear on the main price chart using force_overlay = true.

      The same concept can be used with other drawing functions that support the force_overlay parameter, allowing you to keep your calculations in a separate pane while displaying important signals or visual elements directly on the chart.

      This approach is useful when you want the best of both worlds:

      Keep oscillators like RSI, MACD, or custom calculations in a separate pane.
      Display buy/sell signals, labels, or important plots on the main price chart.

      This keeps your indicator organized while still making the important trading signals easy to see.

      Below is an example showing how this works in practice.

Viewing 1 reply thread
×

Start a Discussion

Get help from the AlgoDelta community.

×

Welcome Back!

Enter your email to sign in or create an account. No passwords needed.

โณ

Pending Approval

โš ๏ธ

Delete This?

Are you sure you want to delete this? This action is permanent and cannot be undone.

Scroll to Top