//+------------------------------------------------------------------+ //| ļščģåš.mq4 | //| Copyright 2015, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2015, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict extern string ————————————————————————————————— = "Ķąńņšīéźč äė’ ēāóźīāūõ č żėåźņšīķķūõ ńčćķąėīā"; extern bool ShowAlert = true; // Use signals "Alert" ? extern bool SendPush = true; // PUSH send messages to your phone ? extern bool SendMailInfo = false; // Send notifications by e-mail ? extern bool ShowSound = true; // Use beeps "Sound" ? extern string SoundNameBuy = "buy.wav"; // Title signal "UP" extern string SoundNameSell = "sell.wav"; // Title signal "DOWN" string IndID = "*"; bool upAlert = false; bool dnAlert = false; bool Opn_B = false; bool Opn_S = false; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { double AO_1=iAO(NULL, 0, 0); double AO_2=iAO(NULL, 0, 1); double Al_Z_1=iAlligator(NULL,0,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MODE_GATORLIPS,0); double Al_S_1=iAlligator(NULL,0,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MODE_GATORJAW,0); double H_1=High[0]; double H_2=High[1]; double H_3=High[2]; double L_1=Low[0]; double L_2=Low[1]; double L_3=Low[2]; double C_1=Close[0]; double n_1=MathRound((H_1*100000-L_1*100000)/2)*0.00001; double N_1=L_1+n_1; Opn_B=false; if (L_1N_1 && L_2>N_1 && AO_1H_2 && H_1>H_3 && C_1AO_2 && L_1>Al_Z_1 && L_1>Al_S_1) {Opn_S=true;} //——————————————————————————————————————————————————————| if(ShowAlert || ShowSound || SendPush) { if(Opn_B && upAlert) { upAlert=false; if(SendPush) SendNotification(StringConcatenate(IndID, Symbol(), " « ", periods(), " » ( īņźšūņü BUY = ", High[0]+Ask-Bid, " )")); if(ShowAlert) Alert(IndID, Symbol(), " « ", periods(), " » ( īņźšūņü BUY = ", High[0]+Ask-Bid, " )"); if(ShowSound) PlaySound(SoundNameBuy); } if(!upAlert && !Opn_B) upAlert=true; //————————————————————————————————————————| if(Opn_S && dnAlert) { dnAlert=false; if(SendPush) SendNotification(StringConcatenate(IndID, Symbol(), " « ", periods(), " » ( īņźšūņü SELL = ", Low[0], " )")); if(ShowAlert) Alert(IndID, Symbol(), " « ", periods(), " » ( īņźšūņü SELL = ", Low[0], " )"); if(ShowSound) PlaySound(SoundNameSell); } if(!dnAlert && !Opn_S) dnAlert=true; } } //—————————————————————————————————| string periods() { switch (Period()) { case 0x000001 : return("M1" ); case 0x000005 : return("M5" ); case 0x00000F : return("M15"); case 0x00001E : return("M30"); case 0x00003C : return("H1" ); case 0x0000F0 : return("H4" ); case 0x0005A0 : return("D1" ); case 0x002760 : return("W1" ); case 0x00A8C0 : return("MN" ); default : return ( "default"); } } //————| end of the algorithm |—————|