How to set indicator properties for indicators created from the indicator classes?

 

Hello,

I have a (maybe understanding) problem with indicators created from the classes provided by the standard library. I want to write a class including a mixture of custom an prefined indicators. In my case I´ve created an instance of the CiDeMarker class within the Oscilators. The class provides a lot os usefull methods, and the indicator can be added to the Chart with AddToChart(). So far, no problem.

Now I ask myself, how I can set the properties of this indicator, like I would do it when creating a "nomal" indicator. I would like to add 2 levels, change the color of the indicator drawing and would like to "design" the level lines to my desired shapes. How to do this? Normally, when creating a "normal" indicator, there are the IndicatorSetInteger(), ...SetDouble() ... and SetString() functions or some properties can be predefined with the #propertie directive. But how to do this with a class instance of an indicator? Furthermore, I also found no way yet, to set these properties with the "handle" obtained from the technical indicator funtions (iDeMarker() , in my case).

I´m pretty sure, that there is an easy solution for this problem, but so far, since 3 days I cannot find one. So, I please ask the community to give me a clue.

Thank you very much in advance.

 

As far as I understand what you want, it's not possible (except by modifying the source code of the indicator if available).

IndicatorSetInteger(), ...SetDouble() ... and SetString() functions or some properties can be predefined with the #propertie directive.

Can only be used inside an indicator.

Classes from the SL are to use indicator within an EA.

 
angevoyageur:

As far as I understand what you want, it's not possible (except by modifying the source code of the indicator if available).

Can only be used inside an indicator.

Classes from the SL are to use indicator within an EA.

Thank you very much for your reply! This helped me to save futher time.

As I understand, the indicator classes from the standard library are only for calculation and using the results within EA´s and classes. I thought, if there is a method to add them to a chart, there should also be an interface to access the drawing etc. properties. Thats why I spent so much time on finding them ;-(

So I have to predefine all my desired indicators in separate indicator files (indicator programs) and can instance them using the CiCustom class? Will all predefined properties (linestyle, color of plot etc.) be applied using "my indicator" as an instance of CiCustom or only the buffers? 


Regards,

olle.onkel

 
olle.onkel:

Thank you very much for your reply! This helped me to save futher time.

As I understand, the indicator classes from the standard library are only for calculation and using the results within EA´s and classes. I thought, if there is a method to add them to a chart, there should also be an interface to access the drawing etc. properties. Thats why I spent so much time on finding them ;-(

So I have to predefine all my desired indicators in separate indicator files (indicator programs) and can instance them using the CiCustom class? Will all predefined properties (linestyle, color of plot etc.) be applied using "my indicator" as an instance of CiCustom or only the buffers? 


Regards,

olle.onkel

Yes.
Reason: