Can we create an indicator both display on main chart and separate window in one file?

 

As title, i intend to build an indicator that all-in-one include rsi and moving average and parabolic SAR, like this below. But I know how to to include all the indicators into one file. I dont want to invoke too much files because it affect to backtesting time. Please any one give me some suggestions. Thank you in advance!

pattern 

 

It's not possible, you need to choose main window or subwindow.

Anyway, you can create it for subwindow and create chart objects for SAR, it can work even if the code will become more complex.

MA on main window if indicator is set to work on separate window will be almost impossible from what I know...

 
Fabio Cavalloni #:

It's not possible, you need to choose main window or subwindow.

Anyway, you can create it for subwindow and create chart objects for SAR, it can work even if the code will become more complex.

MA on main window if indicator is set to work on separate window will be almost impossible from what I know...

so sad to hear that

 
Le Minh Duc #:

so sad to hear that

For advanced coding:

Create an indicator that reads inputs from a file or database. - Use it as your "child-indicator"

In your main indicator, include this child indicator as resource. Load it with iCustom() and feed it through either database or file...

Could be loaded multiple times even.

Possible, doable for advanced coders.



 
Le Minh Duc #:

so sad to hear that

Draw buffer on separate chart windows. Draw object on main windows. Or vice versel
 
Le Minh Duc:

As title, i intend to build an indicator that all-in-one include rsi and moving average and parabolic SAR, like this below. But I know how to to include all the indicators into one file. I dont want to invoke too much files because it affect to backtesting time. Please any one give me some suggestions. Thank you in advance!

 

https://www.mql5.com/ru/code/25414