Buffer Question

 

I'm trying to bring the value of a buffer into my EA with the iCustom function, but no matter what I do, change the calculations, assign another value to the buffer, I get the same result:

2147483647.00000000

Does this value represent an error in the buffer, such as an overflow?

 
Yellowbeard:

I'm trying to bring the value of a buffer into my EA with the iCustom function, but no matter what I do, change the calculations, assign another value to the buffer, I get the same result:

2147483647.00000000

Does this value represent an error in the buffer, such as an overflow?

0x7FFFFFFF = 2147483647 = EMPTY_VALUE

 
robofx.org wrote >>

0x7FFFFFFF = 2147483647 = EMPTY_VALUE

Are buffers by default set at: EMPTY_VALUE; or do they have to be assigned this value.

If I,

SetIndexBuffer(5,CNT);

Assign a value to CNT;

CNT[1]= 2;

Call this value into my EA with iCustom function;

val1 = iCustom(NULL,0,"Test",CNT,5,0);

Display the value;

Alert("Value = " + val1);

Should I get;

Value = 2?

instead of;

Value = 2147483647.00000000

Thanks!

 
Yellowbeard:

Are buffers by default set at: EMPTY_VALUE; or do they have to be assigned this value.

If I,

SetIndexBuffer(5,CNT);

Assign a value to CNT;

CNT[1]= 2;

Call this value into my EA with iCustom function;

val1 = iCustom(NULL,0,"Test",CNT,5,0);

Display the value;

Alert("Value = " + val1);

Should I get;

Value = 2?

instead of;

Value = 2147483647.00000000

Thanks!

https://docs.mql4.com/customind/SetIndexEmptyValue

void SetIndexEmptyValue(int index, double value)
Sets drawing line empty value. Empty values are not drawn or shown in the DataWindow. By default, empty value is EMPTY_VALUE.

 
robofx.org wrote >>

https://docs.mql4.com/customind/SetIndexEmptyValue

void SetIndexEmptyValue( int index, double value)
Sets drawing line empty value. Empty values are not drawn or shown in the DataWindow. By default, empty value is EMPTY_VALUE.

Would that mean, then:

SetIndexBuffer(5,CNT);

SetIndexEmptyValue(5,CNT[1]);

CNT[1]= 2;

val1 = iCustom(NULL,0,"Test",CNT,5,0);

Alert("Value = " + val1);

What I get then, for a value is:

0.00000000

Thanks for the help!

Reason: