Given an indicator handle, how to get how many buffers it has?

To add comments, please log in or register
cyberglassed
524
cyberglassed  

Hello, I would like to know how many buffers an indicator has, given its handle?

maybe reading the property: "indicator_buffers"?, or somehow else?


Regards.

Alain Verleyen
36553
Alain Verleyen  
cyberglassed:

Hello, I would like to know how many buffers an indicator has, given its handle?

maybe reading the property: "indicator_buffers"?, or somehow else?


Regards.

I don't think it's possible.

By the way, what to do ? How can you work with an indicator if you don't know how many buffers it has ?

cyberglassed
524
cyberglassed  

It was for a generalizing code only. But anyway, as you mentioned,

I can specify previously the number of buffer in some array variable for a set of indicators I could use.


Thanks.

AnonymousTrades
9
AnonymousTrades  
Alain Verleyen:

I don't think it's possible.

By the way, what to do ? How can you work with an indicator if you don't know how many buffers it has ?

I actually have a use case for this which I hope to implement rather soon.

  1. I am implementing a panel based with the standard class CAppDialog for which I populate a CComboBox with all indicators currently loaded to the chart.
  2. When the user selects one of the indicators I want my panel to populate another CComboBox with the buffers provided by the selected indicator.
  3. Eventually the selected buffer would be shown in a label much like it can be seen in the data window. I am sure I will have lots of other interesting applications of this in the future.

I know this is not really something necessary for the profitability of any sort of trading tool but I expect it to be of tremendous value for investigating how components work together and for development in general. In my opinion it should be possible from the point of view of quality assurance, e.g. by a function like int IndicatorBuffers(handle)

Thanks.

To add comments, please log in or register