Overlay chart indicator with button to switch between line chart and bar chart

 

Hey guys, I have the sbt indicators that help for overlaying charts on another one. I have one for the line chart and one for candle chart. I know there is a way to put them together in one indicator so that when clicking a button for line it launches the line chart version and then when clicking for candle it swtiches to candle chart on the overlayed chart. I looked at it in old topics but didn't found any. And also if there is a way to apply indicators to the overlayed chart. Thanks in advance

 
Bryan Djoufack Nguessong :

Hey guys, I have the sbt indicators that help for overlaying charts on another one. I have one for the line chart and one for candle chart. I know there is a way to put them together in one indicator so that when clicking a button for line it launches the line chart version and then when clicking for candle it swtiches to candle chart on the overlayed chart. I looked at it in old topics but didn't found any. And also if there is a way to apply indicators to the overlayed chart. Thanks in advance

The indicator can be displayed OR in the main chart window - then the directive is used

#property indicator_chart_window

or In a subwindow - then the directive is used

#property indicator_separate_window


Simultaneously, both in the main window and in the subwindow, the indicator cannot have INDICATOR buffers.

 
Vladimir Karputov #:

The indicator can be displayed OR in the main chart window - then the directive is used

or In a subwindow - then the directive is used


Simultaneously, both in the main window and in the subwindow, the indicator cannot have INDICATOR buffers.

But if you see this indicator. He managed to put a moving average on the overlayed chart. So I guess it is possible to apply indicators on the overlayed like rsi for example and they display in the subwindow

<ex4 file deleted>

 
Bryan Djoufack Nguessong #: But if you see this indicator. He managed to put a moving average on the overlayed chart. So I guess it is possible to apply indicators on the overlayed like rsi for example and they display in the subwindow <ex4 file deleted>

No, it is not possible! There are however "tricks" that make it seem that way.

One way is use graphic objects instead of buffers for one of the windows, but another is to have two indicators where one is embedded as a resource in the main indicator and placed on the chart on the command of the first, making it look like just one indicator when they are actually two — one on the main chart window and another as a subwindow.

 
Fernando Carreiro #:

No, it is not possible! There are however "tricks" that make it seem that way.

One way is use graphic objects instead of buffers for one of the windows, but another is to have two indicators where one is embedded as a resource in the main indicator and placed on the chart on the command of the first, making it look like just one indicator when they are actually two — one on the main chart window and another as a subwindow.

Thanks for the reply

Reason: