简体   繁体   中英

How to plot an indicator on top of another [Pine Script]

I need some help in pine script. In the charting we can plot multiple indicators on top of one another by Move to existing pane above or Move to existing pane below . Can we achieve this same functionality programmatically with pine script?

I have added a picture for better understanding.

在此处输入图像描述

In pinescript, you cannot create indicator in the both pane at the same time.

If you indicator is declared with overlay=true , the indicator will be added in the pane above.

indicator("My script", overlay=true)

If your indicator doesn't have overlay=true, the indicator will be added in th pane below.

indicator("My script")

It is possible to show multiple indicator with one script.
Simply copy the code of one indicator after the code of the first indicator.
Be carefull, in your code you must only have ONE declaration for indicator,
and each code must use it's own variable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM