//+------------------------------------------------------------------+ //| 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&&fast02<slow02) SendMail("MA Cross Long","MA crossed UP"); if(rsi01>50&&rsi02<50) SendMail("RSI Cross Long","RSI crossed long 50"); //Shrt if(fast01<slow01&&fast02>slow02) 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ó,42SO§èžu¹©ÖQŠ’±lFü{Ó4¯èðîÊc¤ZÙ1iue’ FNLm(iÁ¸7ÇÓÃðk¤¬ªË†Ç`•í%1!NÉ )ä%}¾tóKƒ¬'`hf‡BƒÛÒQ©áíÝ …¾ÆÄå á9z0¯?K;hã$"Cþ?—ØŽ e©™ÆAz‚€¡\õ6ìkÃû÷$ŸØàÞÿºûS”JÉ!YeU‚ý6><]Y±ò¨'·Ã³à[”œš»v·P…Ý!>¹òúøÔm®dã;soœPXVw2sËÂA™ÑÝÍúu®¶´ÕÑ)j Ÿ÷/;+XÓ3î/‡È~ýU™‰¶1jrp‘Lå&Ü[³ë÷çÈÐÎïªëC„:¹IUErí&.,MI¡â˜o§³£ÐK„ŒŠ«f§ÿ@öuÍ.©âêè Ä]žTÓ+co_Œ@HFg"c»ü²1‰Áͽêež¦¤Å€ÁZç+HÃü#Þw¸níE}‰y¦!Zb`<}ÕÌK£Ûç׸À¾ßšÛ3t*©9E5bÝ=ø9‘Òˆ_—£“À;t|z›V—ï0æe½õñ™ÒÚØù´õMŽDÃS_O|÷086WS«ì¢!y±½ÚUŽ–”µp± J ×8³ìôòÎg¨^Ý5myi–JRPq,mż;“Ë×Çôo¨°®ÏŠË#d™ñ)5%RÍ-è)Âx÷O‡“ƒ°+dlj‹F‡ß ÖUåñá‰ÂÊÈé¤å=~4³CO?lç (&GC›Ü’i¡ÊE~†„¥`¡ù:ðoÇÿû(£Üäâ¾ÿW˜NÍ%]iY†:B@a]µö¬+ƒ»Ç·ä_˜ ž¿z»T ‰á%B½öþüØq²hç?wƒs T\Z{6wÏÆEÕáÑþy²º¸Ù”Õ-n$£û3?/\×7ò3‹Ì‚Y‘º5nvt•P‘é*à_·ïûë“ÌÔÒó®ïGˆ>½MYIvñ*20QM¥æœs«·§ÔOˆŽ¯j«DúyÑ 2æîì È a¢X×/gscDLJk&g¿