//+------------------------------------------------------------------+ //| EMailSignals.mq4 | //| Steven Retz | //| http://www.interbankfx.com | //+------------------------------------------------------------------+ #property copyright "Steven Retz" #property link "http://www.interbankfx.com" extern int RSIPeriod=8; extern int RSIPrice=PRICE_CLOSE; extern int MAFastPeriod=3; extern int MAFastShift=0; extern int MAFastMethod=MODE_SMA; extern int MAFastPrice=PRICE_CLOSE; extern int MASlowPeriod=7; extern int MASlowShift=0; extern int MASlowMethod=MODE_SMA; extern int MASlowPrice=PRICE_CLOSE; bool runnable=true; bool initialize=true; datetime timeprev=0; int init() { return(0); } int deinit() { return(0); } int start() { //Runnable if(runnable!=true) return(-1); //Init if(initialize==true) { initialize=false; if(!InterbankFXServer()) { runnable=false; return(-1); }// }//Init // //New Bar // if(timeprev==Time[0]) return(0); timeprev=Time[0]; // //Calculation // double fast01=iMA(NULL,0,MAFastPeriod,MAFastShift,MAFastMethod,MAFastPrice,1); double fast02=iMA(NULL,0,MAFastPeriod,MAFastShift,MAFastMethod,MAFastPrice,2); double slow01=iMA(NULL,0,MASlowPeriod,MASlowShift,MASlowMethod,MASlowPrice,1); double slow02=iMA(NULL,0,MASlowPeriod,MASlowShift,MASlowMethod,MASlowPrice,2); double rsi01=iRSI(NULL,0,RSIPeriod,RSIPrice,1); double rsi02=iRSI(NULL,0,RSIPeriod,RSIPrice,2); //Long if(fast01>slow01&&fast0250&&rsi02<50) SendMail("RSI Cross Long","RSI crossed long 50"); //Shrt if(fast01slow02) SendMail("MA Cross Shrt","MA crossed DN"); if(rsi01<50&&rsi02>50) SendMail("RSI Cross Shrt","RSI crossed shrt 50"); return(0); } bool InterbankFXServer() { if(ServerAddress()=="InterbankFX-Server"||ServerAddress()=="InterbankFX-Demo"||ServerAddress()=="66.114.105.89") return(true); else return(false); }//bool InterBanFXServer() I@O[Kx,42SOuQlF{ 4 cZ1iue FNLm(i7kˆ`%1!N )%}tK'`hfBQ 9z0?K;h$"C?؎ eAz\6k$SJ!YeU6><]Y'ó[vP!>md;soPXVw2s AuՐ)j /;+X 3/~U1jrpL&[C:IUEr&.,MIoKf@u. ]T+co_@HFg"c1ͽeŀZ+H#wnE}y!Zb`<}Kߚ3t*9E5b=9҈_;t|zV0eMDS_O|086WS!yUp J 8g^5myiJRPq,m;oϊ#d)5%R -)xO+dljF U=~4 CO?l (&GCܒiE~`:o (WN%]iY:B@a]+Ƿ_zT %Bqh?wsT\Z{6wEyٔ-n$3?/\73̂Y5nvtP*_G>MYIv*20Q MsOjDy 2 aX/gsc DLJk&g5iɄ^#/L'#{rI}%^fd@O7x.=I9f" A=֌ c?x~Z4i"QHWcS4<:[W%}Yt N<kb9q}mNVTu0q ?sӎ'h-9)V 1-|S/hpnJ$YA8GSCp$,*KGmId>s,[R)am]>FDe a/˻c~X)F!ulC{wX`^:{I}ݘ1r(7C3`;7І]9rzxT.cKBQ]Mz.64UQwSnH}  6 e\3kwgHPNo*k9m͈!b'3#P +'vM)bjhDS ;|2 AM=j&$EAڐgC|^8m &UL#[gW8@>_[)ŵ]xR#@of=uqRZXy4uCwג+l"1=-Z