iCustom (Custom Indicator returning 2147483647)

[Deleted]  

Hello,

I have made a Custom Indicator which works. It displays on the Chart and everything is fine.

I am now wanting to use that in an Expert Advisor and the only value I get is 2147483647.

It has one parameter which I pass in and that is all. (Below is the code

iCustom(NULL,0,"myCustomIndicator1",11,0,0);

What am I doing wrong??

Thanks in advance,

Phil

okwh
1646
okwh  

2147483647 is default EMPTY-VALUVE.

[Deleted]  
PhilWill:

Hello,

I have made a Custom Indicator which works. It displays on the Chart and everything is fine.

I am now wanting to use that in an Expert Advisor and the only value I get is 2147483647.

It has one parameter which I pass in and that is all. (Below is the code

iCustom(NULL,0,"myCustomIndicator1",11,0,0);

What am I doing wrong??

Thanks in advance,

Phil


M31 = 2^31 - 1 = 0x7FFFFFFF. It also happens to be the largest signed 32-bit integer (available in many programing languages, i.e., C/C++ int on 32-bit platforms).
Ray
2646
Ray  

"What am I doing wrong??"

Perhaps if you show a bit more of what you ARE doing, it would help.

RickD
1236
RickD  

2147483647 = EMPTY_VALUE.

There is IndicatorEmptyValue function too. ;)

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

[Deleted]  

Thanks for replying...

The Custom Indicator used to work and I have not changed it. But I am getting another error that now might explain as to why this is happening.

The error I am getting is: " '106134': DataCenter connecting failed [6]"

I get this error when ever I start the application. Although it says that the connection fails everything else works.

This is a demo account? Could that have anything to do with it???

Thanks in advance.

Phil

ddiebold
13
ddiebold  
What I did in an EA that was inputting this number from the buffer of the indicator was to create a condition that if the number is over 300, then the value is 0. This worked great. Maybe you could adapt this in the indicator??

Dave
[Deleted]  

Thanks for all the responses,

I thought of doing what you are suggesting Dave, but the problem I have is that I sometimes dont get a correct value returned for hours!

Could it be that the Custom Indicator has a bug in it and it is not returning a value in some instances and that is why when I query it from the Expert Advisor it returns this Empty Value.

Or is it something else?

The problem I have with the theory I just mentioned is that the Custom Indicator draws correctly on the screen!

Thanks in Advance,

Phil

Ray
2646
Ray  

Post the code so people can see what is happening.