helped needed with very simple EA

 

Hi,I'm trying to code what i think should be an extremely simple EA. I just want a push notification sent to my android device when the 5sma crosses the 34sma,no trades entered just an alert. Here's what ive got

//Inputs

//Declaration
double _MA_Fast;
double _MA_Slow;
bool _Compare;

int start(){

//Level 1
_MA_Fast = iMA(Symbol(),0,5,0,0,0,0);
_MA_Slow = iMA(Symbol(),0,34,0,0,0,0);

//Level 2
_Compare = _MA_Fast >= _MA_Slow;

//Level 3
if(_Compare)Alert();
if(!_Compare)Alert();
return(0);

}

Any help on this would be greatly appreciated as its took a week to get to get this far and it just does'nt work.I'm using mt4

Thanks.

 

  1. Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. "it just does'nt work" is meaning less to us. There are no mindreaders here. What does it do? What do you think it should be doing?
  3. _MA_Fast = iMA(Symbol(),0,5,0,0,0,0);
    Why are you putting zeros in your iMA call instead of the proper enumerations.
 
hi, "it just does'nt work" means it does nothing at all.
 

I note the OP wishes to use 5 and 34. There is a signal on MT4 that has done well up to recently, using these two averages on GBP/JPY. Is that your proclivity?

 
I've used an EA builder software to compile it so i dont know why there is so many zeros
Reason: