iCustom and value

 

Good Morning all, 


i was testing iCustom function with the attached indicator. I call it on this way:


double EURUSDEMAUP0 = iCustom("EURUSD",_Period,"EMA_Cross__SES__BDv8_12_31__1",2,15,true,0,0);
double EURUSDEMADN0 = iCustom("EURUSD",_Period,"EMA_Cross__SES__BDv8_12_31__1",2,15,true,1,0);

And adding a comment with the value, i always have this as comment "2147483647"


This indicator show an alert at ema cross, how can i use that on an EA? if iCustom looks like is not working?

 
  1. 2147483647 is EMPTY_VALUE
  2. The Alert is irrevalent, code has no eyes.
  3. Your code is looking at bar zero only.
  4. Find what bar index the Data Window (Control+D) shows a value. That is how.
 
William Roeder:
  1. 2147483647 is EMPTY_VALUE
  2. The Alert is irrevalent, code has no eyes.
  3. Your code is looking at bar zero only.
  4. Find what bar index the Data Window (Control+D) shows a value. That is how.
I have moved to Bar1. When ema cross, an arrow appear and new value is the price where ema has crossed. So, I think that if I use <2147483647 it simulate the cross
 
SIMONE MARELLI:
I have moved to Bar1. When ema cross, an arrow appear and new value is the price where ema has crossed. So, I think that if I use <2147483647 it simulate the cross

That makes no sense at all.

William already told you that 2147483647 is an empty value complete with link, so it represents nothing... no data... no meaning...

So to use it as part of a test is meaningless, you may as well forget the indicator and flip a coin instead.

 
Paul Anscombe:

That makes no sense at all.

William already told you that 2147483647 is an empty value complete with link, so it represents nothing... no data... no meaning...

So to use it as part of a test is meaningless, you may as well forget the indicator and flip a coin instead.

Yes, it's an empty value. But value changes at the bar of the cross. So, i think that if i use a function to detect the change of that value, could work, or am i wrong again?