Download MetaTrader 5

SetIndex Buffer to class type

To add comments, please log in or register
Eggo
86
Eggo  

Hello, is it possible to set index buffer to class type?

Thanks, in advance.

I have a class:

 class SupportResistanceClass
 {
 public:
     double High;
     double Low;
     double CandleLowHigh; 
 };

Variable:

SupportResistanceClass _support[];

And I want to set index buffer to the support, I tried this version and got error.: '_support' - parameter conversion not allowed

 

  SetIndexBuffer(2, _support, INDICATOR_CALCULATIONS);

 

UPDATE:

Found: 

SetIndexBuffer

The function binds a specified indicator buffer with one-dimensional dynamic array of the double type. 

So Is it any  way to add buffer, for example, with ENUM(or other type) ?

Alain Verleyen
Moderator
33615
Alain Verleyen  

What is not clear in "one-dimensional dynamic array of the double type. " ?

That means it can't be an enum or a class or whatever, it should be a double array with 1 dimension !

To add comments, please log in or register