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

Asked by Radhesh Joshi · SOLVED
1 reply 460 views Jump to solution Reply
Radhesh Joshi Original Post
Strategy Builder

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. \*

Posted Jul 19
Reply

    1 Reply

    Tech Support AlgoDelta
    Tech Support AlgoDelta Automation Expert ·

    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.

    Verified Solution
    • Thanks for solving this doubt since there is not that much information of this and your solution is very accurate and easy. thanks for the answer. – Radhesh Joshi Jul 28
    Markdown supported · ```json for code blocks · paste or drop screenshots

    Be specific and kind. Never share API keys, passwords or personal account details.

    Welcome to the community

    Log in or create your account in under a minute.

    1. 1Mobile
    2. 2E-mail
    3. 3Password
    +91

    Have a password?

    By continuing you agree to the community guidelines. We’ll send a one-time code by SMS.