Another Heiken Ashi question

 

I want to use Heiken Ashi Real (attached) in my ea via iCustom

double p1.val=iCustom(pair1, chart.time.frame, "Heiken Ashi Real",13,1,0);

How do I get the value of the white line, and the red line?

I want to be able to compare the 2 in my ea... ie; if(white line < red line) signal is "sell";

and I want it for the most recently closed bar... not the currently changing bar.

(I'm not exactly sure what the,13,1,0 is... the 0 I thought if changed to 1 would be the last bar, but I'm not sure its working like that)

Any help appreciated... thanks

Files:
 

Here is,

double open =iCustom(NULL,15,"Heiken Ashi",0,2,1);//Previous Open
double close =iCustom(NULL,15,"Heiken Ashi",0,3,1);//Previous Close

bool Up = (close>open);
bool Down = (close<open);

Good luck!

Reason: