Download MetaTrader 5
To add comments, please log in or register
Have you found a good programmer? Make a targeted order!
Eggo
85
Eggo 2015.03.22 08:22 

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
28693
Alain Verleyen 2015.03.22 13:25  

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