error take profit price using custom indicator

 
Hi all,

I tried to create a code from a custom indicator. From mt4 documentation I can create is using iCustom function. Below is my code, for the stop loss price the amount price is exactly what I want but for the take profit the result is 0. Can anyone tell me what's wrong with my code?

Thanks
//Global Variable
double  MA_Period[2] = {9,21};


void OnTick(){
        double EMA1 = iCustom(NULL,_Period,"ema",MA_Period[0],0,0};
        Double EMa2 = iCustom(NULL,_Period,"ema",MA_Period[1],0,0};
        if(EMA1 > EMA2){
                double stopLossPrice = Ask - 100*Point;
                double takeProfitPrice = EMA2 > EMA1;
        ...
        }
}
 
never mind, already find the bug. I never compile the custom ema indicator.
Reason: