iCustom + SMI

 
Hi,

Last days i've been testing to see how mql4 works, i'm able to place an order, to cancel it and do basic tasks. Now I want to add a custom indicator to my EA, the indicator is already done, it's the Stochastic Momemtum Index (SMI). I want to place an order when red line crosses blue and vice-versa.

I think it should look something like this

double redLine = iCustom(Symbol(),0,"SMI",13,29,2,9,0,10);
double blueLine = iCustom(Symbol(),0,"SMI",13,29,2,9,1,10);

if (...)
{
\\ Place an order
}

But the point is that I don't know what to put as condition, i've tried ==, <=, >=, etc.
Here's a graphic that shows what I want to, when blue line crosses red from bottom go long, when it does from top go short

I've also attached the indicator, hope someone can help me with this.

Thanx!

Files:
smi.mq4  4 kb
 
Update :

I've tried this to see what the iCustom function returns... (nbBars!=Bars is to check the value only then I get a new bar)

if(nbBars!=Bars)
{

Print(iCustom(Symbol(),0,"SMI",13,29,2,9,0,0));
Print(iCustom(Symbol(),0,"SMI",13,29,2,9,0,1));
nbBars=Bars;

}


And when I test and see the logs the indicators returns this !!!!!

2010.05.06 20:42:50 2010.02.10 16:00 WaldirV1 EURUSD,H4: 2147483647
2010.05.06 20:42:50 2010.02.10 12:00 WaldirV1 EURUSD,H4: 2147483647
2010.05.06 20:42:50 2010.02.10 12:00 WaldirV1 EURUSD,H4: 2147483647
2010.05.06 20:42:50 2010.02.10 08:00 WaldirV1 EURUSD,H4: 2147483647
2010.05.06 20:42:50 2010.02.10 08:00 WaldirV1 EURUSD,H4: 2147483647
2010.05.06 20:42:50 2010.02.10 04:00 WaldirV1 EURUSD,H4: -18.9528
2010.05.06 20:42:50 2010.02.10 04:00 WaldirV1 EURUSD,H4: 2147483647
2010.05.06 20:42:50 2010.02.10 00:00 WaldirV1 EURUSD,H4: -23.5936
2010.05.06 20:42:50 2010.02.10 00:00 WaldirV1 EURUSD,H4: -18.9528
2010.05.06 20:42:50 2010.02.10 00:00 SMI EURUSD,H4: loaded successfully
2010.05.06 20:42:50 WaldirV1 started for testing

Can anyone please help me with this! =)