ACBB.mq4
ACBB.mq4 FOREX MetaTrader4 Indicators Download
ACBB.mq4 download link will appear after 10 seconds.
ACBB.mq4 Programming source code.
#property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 clrLightSeaGreen #property indicator_color2 clrLightSeaGreen #property indicator_color3 clrLightSeaGreen //+------------------------------------------------------------------+ //--- indicator parameters extern string a00 = "====================================";//================================= input int BB_Period = 20; // Bands Period input int BB_Shift = 0; // Bands Shift input double BB_Deviations = 2.0; // Bands Deviations input ENUM_APPLIED_PRICE BB_Price= 0; // Bands Price extern bool Show_Line_Ind = true; // œÓ͇Á‡Ú¸ ÎËÌËË Ë̉Ë͇ÚÓ‡ //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ extern string a01 = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> extern bool V1_Alert = true; // Alert ̇ ¿—¿Õ»≈ ÎËÌËÈ Ë̉Ë͇ÚÓ‡ extern string b00 = "------------------------------------";//------------------------------------ extern bool V1_Alert_Up_Line = true; // ‡Ò‡ÌË ¬≈–’Õ≈… ÎËÌËÈ extern bool V1_Alert_Md_Line = true; // ‡Ò‡ÌË —–≈ƒÕ≈… ÎËÌËÈ extern bool V1_Alert_Dn_Line = true; // ‡Ò‡ÌË ջ∆Õ≈… ÎËÌËÈ extern string b01 = "------------------------------------";//------------------------------------ extern int V1_Arr_otstup = 0; // ŒÚÒÚÛÔ ‚ÂıÌËı/ÌËÊÌËı ÒÚÂÎÓÍ extern int V1_Arr_Md_otstup = 3; // ŒÚÒÚÛÔ Ò‰ÌËı ÒÚÂÎÓÍ extern int V1_Arr_width = 1; // –‡ÁÏ ÒÚÂÎÓÍ extern int V1_Arr_Up_code = 159; // Ó‰ ‚ÂıÌÂÈ ÒÚÂÎÍË extern int V1_Arr_Md_code = 159; // Ó‰ Ò‰ÌÂÈ ÒÚÂÎÍË extern int V1_Arr_Dn_code = 159; // Ó‰ ÌËÊÌÂÈ ÒÚÂÎÍË extern color V1_Arr_Up_col = clrLime; // ÷‚ÂÚ ‚ÂıÌÂÈ ÒÚÂÎÍË extern color V1_Arr_Md_col = clrYellow; // ÷‚ÂÚ Ò‰ÌÂÈ ÒÚÂÎÍË extern color V1_Arr_Dn_col = clrRed; // ÷‚ÂÚ ÌËÊÌÂÈ ÒÚÂÎÍË extern string b02 = "------------------------------------";//------------------------------------ extern bool V1_AlertsMessage = true; // Alerts Message extern bool V1_AlertsSound = false; // Alerts Sound extern bool V1_AlertsEmail = false; // Alerts Email extern bool V1_AlertsMobile = false; // Alerts Mobile extern string b03 = "------------------------------------";//------------------------------------ extern string V1_Sound_Up = "alert.wav"; // ‘‡ÈÎ Á‚Û͇ ‰Îˇ ‚ÂıÌÂÈ ÒÚÂÎÍË extern string V1_Sound_Md = "alert.wav"; // ‘‡ÈÎ Á‚Û͇ ‰Îˇ Ò‰ÌÂÈ ÒÚÂÎÍË extern string V1_Sound_Dn = "alert.wav"; // ‘‡ÈÎ Á‚Û͇ ‰Îˇ ÌËÊÌÂÈ ÒÚÂÎÍË extern string b04 = "------------------------------------";//------------------------------------ extern string V1_Txt_Up = "͇҇ÌË ÎËÌËÈ Up"; // “ÂÍÒÚ ÒÓÓ·˘. ‰Îˇ ‚ÂıÌÂÈ ÒÚÂÎÍË extern string V1_Txt_Md = "͇҇ÌË ÎËÌËÈ Md"; // “ÂÍÒÚ ÒÓÓ·˘. ‰Îˇ Ò‰ÌÂÈ ÒÚÂÎÍË extern string V1_Txt_Dn = "͇҇ÌË ÎËÌËÈ Dn"; // “ÂÍÒÚ ÒÓÓ·˘. ‰Îˇ ÌËÊÌÂÈ ÒÚÂÎÍË //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ extern string a02 = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> extern bool V2_Alert = true; // Alert ̇ œ–Œ¡Œ… ÎËÌËÈ Ë̉Ë͇ÚÓ‡ extern string b05 = "------------------------------------";//------------------------------------ extern bool V2_Alert_Up_Line = true; // œÓ·ÓÈ ¬≈–’Õ≈… ÎËÌËÈ extern bool V2_Alert_Md_Line = true; // œÓ·ÓÈ —–≈ƒÕ≈… ÎËÌËÈ extern bool V2_Alert_Dn_Line = true; // œÓ·ÓÈ Õ»∆Õ≈… ÎËÌËÈ extern string b06 = "------------------------------------";//------------------------------------ extern int V2_Arr_otstup = 10; // ŒÚÒÚÛÔ ‚ÂıÌËı/ÌËÊÌËı ÒÚÂÎÓÍ extern int V2_Arr_Md_otstup = 3; // ŒÚÒÚÛÔ Ò‰ÌËı ÒÚÂÎÓÍ extern int V2_Arr_width = 1; // –‡ÁÏ ÒÚÂÎÓÍ extern int V2_Arr_Up_code = 116; // Ó‰ ‚ÂıÌÂÈ ÒÚÂÎÍË extern int V2_Arr_Md_code = 116; // Ó‰ Ò‰ÌÂÈ ÒÚÂÎÍË extern int V2_Arr_Dn_code = 116; // Ó‰ ÌËÊÌÂÈ ÒÚÂÎÍË extern color V2_Arr_Up_col = clrLime; // ÷‚ÂÚ ‚ÂıÌÂÈ ÒÚÂÎÍË extern color V2_Arr_Md_col = clrYellow; // ÷‚ÂÚ Ò‰ÌÂÈ ÒÚÂÎÍË extern color V2_Arr_Dn_col = clrRed; // ÷‚ÂÚ ÌËÊÌÂÈ ÒÚÂÎÍË extern string b07 = "------------------------------------";//------------------------------------ extern bool V2_AlertsMessage = true; // Alerts Message extern bool V2_AlertsSound = false; // Alerts Sound extern bool V2_AlertsEmail = false; // Alerts Email extern bool V2_AlertsMobile = false; // Alerts Mobile extern string b08 = "------------------------------------";//------------------------------------ extern string V2_Sound_Up = "alert.wav"; // ‘‡ÈÎ Á‚Û͇ ‰Îˇ ‚ÂıÌÂÈ ÒÚÂÎÍË extern string V2_Sound_Md = "alert.wav"; // ‘‡ÈÎ Á‚Û͇ ‰Îˇ Ò‰ÌÂÈ ÒÚÂÎÍË extern string V2_Sound_Dn = "alert.wav"; // ‘‡ÈÎ Á‚Û͇ ‰Îˇ ÌËÊÌÂÈ ÒÚÂÎÍË extern string b09 = "------------------------------------";//------------------------------------ extern string V2_Txt_Up = "ÔÓ·ÓÈ ÎËÌËÈ Up"; // “ÂÍÒÚ ÒÓÓ·˘. ‰Îˇ ‚ÂıÌÂÈ ÒÚÂÎÍË extern string V2_Txt_Md = "ÔÓ·ÓÈ ÎËÌËÈ Md"; // “ÂÍÒÚ ÒÓÓ·˘. ‰Îˇ Ò‰ÌÂÈ ÒÚÂÎÍË extern string V2_Txt_Dn = "ÔÓ·ÓÈ ÎËÌËÈ Dn"; // “ÂÍÒÚ ÒÓÓ·˘. ‰Îˇ ÌËÊÌÂÈ ÒÚÂÎÍË extern string b10 = "------------------------------------";//------------------------------------ extern int V2_delta = 0; // ¬Â΢Ë̇ ÔÓ·Óˇ (ÂÒÎË ÏÂ̸¯Â "0"-ÓÚÍÎ.) extern int V2_txt_size = 11; // –‡ÁÏ ÚÂÍÒÚ‡ extern int V2_txt_otstup = 25; // ŒÚÒÚÛÔ ÓÚ ·‡‡ extern color V2_txt_color = clrWhite; // ÷‚ÂÚ ÚÂÍÒÚ‡ extern string V2_txt_font = "Arial"; // ÿËÙÚ //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ extern string a03 = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> extern bool V3_Alert = true; // Alert ̇ —≈–»fi ¿—¿Õ»≈/œ–Œ¡Œ… ÎËÌËÈ Ë̉Ë͇ÚÓ‡ extern string b11 = "------------------------------------";//------------------------------------ extern bool V3_Alert_Up_Line = true; // —Âˡ ̇ ͇҇ÌËÂ/ÔÓ·ÓÈ ¬≈–’Õ≈… ÎËÌËË extern bool V3_Alert_Dn_Line = true; // —Âˡ ̇ ͇҇ÌËÂ/ÔÓ·ÓÈ Õ»∆Õ≈… ÎËÌËË extern string b12 = "------------------------------------";//------------------------------------ extern int Serial = 3; // —Âˡ ËÁ ·‡Ó‚ extern bool StepSerial = false; // ŒÚÓ·‡Ê‡Ú¸ ÌÂÔÂ˚‚ÌÛ˛ ÒÂ˲ extern string b13 = "------------------------------------";//------------------------------------ extern int V3_Arr_otstup = 20; // ŒÚÒÚÛÔ ‚ÂıÌËı/ÌËÊÌËı ÒÚÂÎÓÍ extern int V3_Arr_width = 1; // –‡ÁÏ ÒÚÂÎÓÍ extern int V3_Arr_Up_code = 142; // Ó‰ ‚ÂıÌÂÈ ÒÚÂÎÍË (ÂÒÎË "0"-‡‚ÚÓ.) extern int V3_Arr_Dn_code = 142; // Ó‰ ÌËÊÌÂÈ ÒÚÂÎÍË (ÂÒÎË "0"-‡‚ÚÓ.) extern color V3_Arr_Up_col = clrCadetBlue;// ÷‚ÂÚ ‚ÂıÌÂÈ ÒÚÂÎÍË extern color V3_Arr_Dn_col = clrDarkOrange;// ÷‚ÂÚ ÌËÊÌÂÈ ÒÚÂÎÍË extern string b14 = "------------------------------------";//------------------------------------ extern bool V3_AlertsMessage = true; // Alerts Message extern bool V3_AlertsSound = false; // Alerts Sound extern bool V3_AlertsEmail = false; // Alerts Email extern bool V3_AlertsMobile = false; // Alerts Mobile extern string b15 = "------------------------------------";//------------------------------------ extern string V3_Sound_Up = "alert.wav"; // ‘‡ÈÎ Á‚Û͇ ‰Îˇ ‚ÂıÌÂÈ ÒÚÂÎÍË extern string V3_Sound_Dn = "alert.wav"; // ‘‡ÈÎ Á‚Û͇ ‰Îˇ ÌËÊÌÂÈ ÒÚÂÎÍË extern string b16 = "------------------------------------";//------------------------------------ extern string V3_Txt_Up = "ÒÂˡ ͇҇ÌËÂ/ÔÓ·ÓÈ ÎËÌËÈ Up";// “ÂÍÒÚ ÒÓÓ·˘. ‰Îˇ ‚ÂıÌÂÈ ÒÚÂÎÍË extern string V3_Txt_Dn = "ÒÂˡ ͇҇ÌËÂ/ÔÓ·ÓÈ ÎËÌËÈ Dn";// “ÂÍÒÚ ÒÓÓ·˘. ‰Îˇ ÌËÊÌÂÈ ÒÚÂÎÍË extern string a04 = "====================================";//================================= //+------------------------------------------------------------------+ //--- buffers double Md_Buf[]; double Up_Buf[]; double Dn_Buf[]; double Std_Buf[]; #define PREFIX "123" double Up_delta = 0.0; double Dn_delta = 0.0; datetime V1_TimeBar; datetime V2_TimeBar; datetime V3_TimeBar; int V1_Alert_Up = 0; int V1_Alert_Md = 0; int V1_Alert_Dn = 0; int V2_Alert_Up = 0; int V2_Alert_Md = 0; int V2_Alert_Dn = 0; int V3_Alert_Up = 0; int V3_Alert_Dn = 0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit(void) { //--- IndicatorBuffers(4); IndicatorDigits(Digits); //--- upper band SetIndexBuffer(0,Up_Buf); SetIndexLabel (0,"Upper"); //--- middle line SetIndexBuffer(1,Md_Buf); SetIndexLabel (1,"Middle"); //--- lower band SetIndexBuffer(2,Dn_Buf); SetIndexLabel (2,"Lower"); //--- if(Show_Line_Ind) { SetIndexStyle (0,DRAW_LINE); SetIndexStyle (1,DRAW_LINE); SetIndexStyle (2,DRAW_LINE); }else{ SetIndexStyle (0,DRAW_NONE); SetIndexStyle (1,DRAW_NONE); SetIndexStyle (2,DRAW_NONE); } //--- initialization done V1_TimeBar = Time[0]; V2_TimeBar = Time[0]; V3_TimeBar = Time[0]; return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //Comment(""); for (int i = ObjectsTotal()-1; i >= 0; i--) if (StringSubstr(ObjectName(i), 0, StringLen(PREFIX)) == PREFIX) ObjectDelete(ObjectName(i)); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) //--- { int i,limit; if(rates_total<=1) return(0); limit=rates_total-prev_calculated; if(prev_calculated>0) limit = limit+1; if(prev_calculated==0) limit = limit-2-Serial; //+------------------------------------------------------------------+ for(i=limit; i>=0; i--) { Up_Buf[i] = iBands (NULL,0,BB_Period,BB_Deviations,BB_Shift,BB_Price,MODE_UPPER,i); Md_Buf[i] = iBands (NULL,0,BB_Period,BB_Deviations,BB_Shift,BB_Price,MODE_MAIN,i); Dn_Buf[i] = iBands (NULL,0,BB_Period,BB_Deviations,BB_Shift,BB_Price,MODE_LOWER,i); // +------------------------------------------------------------------+ // | —ÚÂÎ͇ ̇ ͇҇ÌË ÎËÌËÈ Ë̉Ë͇ÚÓ‡ | // +------------------------------------------------------------------+ if(V1_Alert) { if(V1_Alert_Up_Line && High[i]>Up_Buf[i] && Close[i+1]Md_Buf[i] && Close[i+1] Md_Buf[i+1]) { V1_Alert_Md = 1; arrows_wind(i,"V1_Md",V1_Arr_Md_otstup,V1_Arr_Md_code,V1_Arr_Md_col,V1_Arr_width,0); }else V1_Alert_Md = 0; //--- if(V1_Alert_Dn_Line && Low[i] Dn_Buf[i+1]) { V1_Alert_Dn = 1; arrows_wind(i,"V1_Dn",V1_Arr_otstup,V1_Arr_Dn_code,V1_Arr_Dn_col,V1_Arr_width,0); }else V1_Alert_Dn = 0; } // +------------------------------------------------------------------+ // | —ÚÂÎ͇ ̇ ÔÓ·ÓÈ ÎËÌËÈ Ë̉Ë͇ÚÓ‡ | // +------------------------------------------------------------------+ if(V2_Alert) { Up_delta = MathAbs(Close[i+1]-Up_Buf[i+1])/Point; Dn_delta = MathAbs(Close[i+1]-Dn_Buf[i+1])/Point; if(V2_Alert_Up_Line && Close[i+1]>Up_Buf[i+1] && Open[i+1] =0)txtobj(i+1,"V2_Up_txt",Up_delta,1); }else V2_Alert_Up = 0; //--- if(V2_Alert_Md_Line && Close[i+1]>Md_Buf[i+1] && Open[i+1] Md_Buf[i+1]) { V2_Alert_Md = 1; arrows_wind(i+1,"V2_Md",V2_Arr_Md_otstup,V2_Arr_Md_code,V2_Arr_Md_col,V2_Arr_width,0); }else V2_Alert_Md = 0; //--- if(V2_Alert_Dn_Line && Close[i+1] Dn_Buf[i+1] && V2_delta =0)txtobj(i+1,"V2_Dn_txt",Dn_delta,0); }else V2_Alert_Dn = 0; } // +------------------------------------------------------------------+ // | —ÚÂÎ͇ ̇ ÒÂ˲ ͇҇ÌËÂ/ÔÓ·ÓÈ ÎËÌËÈ Ë̉Ë͇ÚÓ‡ | // +------------------------------------------------------------------+ if(V3_Alert) { if(V3_Alert_Up_Line) { int k = 0; int countb = 0; int countb2 = 0; while(k =Up_Buf[i+k] && Low[i+k]<=Up_Buf[i+k])|| Open[i+k]>=Up_Buf[i+k]) countb++; k++; } k = 0; while(k =Up_Buf[i+k] && Low[i+k]<=Up_Buf[i+k])|| Open[i+k]>=Up_Buf[i+k]) countb2++; k++; } if(StepSerial) countb2--; if(Serial==countb && Serial+1!=countb2) { V3_Alert_Up = 1; if(V3_Arr_Up_code==0 && Serial<=10 && Serial>0) V3_Arr_Up_code = 139+Serial; arrows_wind(i,"V3_Up",V3_Arr_otstup,V3_Arr_Up_code,V3_Arr_Up_col,V3_Arr_width,1); }else V3_Alert_Up = 0; } //--- if(V3_Alert_Dn_Line) { int k = 0; int counts = 0; int counts2 = 0; while(k =Dn_Buf[i+k] && Low[i+k]<=Dn_Buf[i+k])|| Open[i+k]<=Dn_Buf[i+k]) counts++; k++; } k = 0; while(k =Dn_Buf[i+k] && Low[i+k]<=Dn_Buf[i+k])|| Open[i+k]<=Dn_Buf[i+k]) counts2++; k++; } if(StepSerial) counts2--; if(Serial==counts && Serial+1!=counts2) { V3_Alert_Dn = 1; if(V3_Arr_Dn_code==0 && Serial<=10 && Serial>0) V3_Arr_Dn_code = 139+Serial; arrows_wind(i,"V3_Dn",V3_Arr_otstup,V3_Arr_Dn_code,V3_Arr_Dn_col,V3_Arr_width,0); }else V3_Alert_Dn = 0; } } //+------------------------------------------------------------------+ } //+------------------------------------------------------------------+ //| —˄̇Π̇ ͇҇ÌË ÎËÌËÈ Ë̉Ë͇ÚÓ‡ | //+------------------------------------------------------------------+ if(V1_Alert &&(V1_AlertsMessage || V1_AlertsEmail || V1_AlertsMobile || V1_AlertsSound)) { string message1 = (WindowExpertName()+" - "+Symbol()+" "+PeriodString()+" - "+V1_Txt_Up); string message2 = (WindowExpertName()+" - "+Symbol()+" "+PeriodString()+" - "+V1_Txt_Md); string message3 = (WindowExpertName()+" - "+Symbol()+" "+PeriodString()+" - "+V1_Txt_Dn); if(V1_Alert_Up_Line && V1_TimeBar!=Time[0] && V1_Alert_Up==1) { if (V1_AlertsMessage) Alert(message1); if (V1_AlertsEmail) SendMail(Symbol()+" - "+WindowExpertName()+" - ",message1); if (V1_AlertsMobile) SendNotification(message1); if (V1_AlertsSound) PlaySound(V1_Sound_Up); V1_TimeBar=Time[0]; } if(V1_Alert_Md_Line && V1_TimeBar!=Time[0] && V1_Alert_Md==1) { if (V1_AlertsMessage) Alert(message2); if (V1_AlertsEmail) SendMail(Symbol()+" - "+WindowExpertName()+" - ",message2); if (V1_AlertsMobile) SendNotification(message2); if (V1_AlertsSound) PlaySound(V1_Sound_Md); V1_TimeBar=Time[0]; } if(V1_Alert_Dn_Line && V1_TimeBar!=Time[0] && V1_Alert_Dn==1) { if (V1_AlertsMessage) Alert(message3); if (V1_AlertsEmail) SendMail(Symbol()+" - "+WindowExpertName()+" - ",message3); if (V1_AlertsMobile) SendNotification(message3); if (V1_AlertsSound) PlaySound(V1_Sound_Dn); V1_TimeBar=Time[0]; } } //+------------------------------------------------------------------+ //| —˄̇Π̇ ÔÓ·ÓÈ ÎËÌËÈ Ë̉Ë͇ÚÓ‡ | //+------------------------------------------------------------------+ if(V2_Alert &&(V2_AlertsMessage || V2_AlertsEmail || V2_AlertsMobile || V2_AlertsSound)) { string message1 = (WindowExpertName()+" - "+Symbol()+" "+PeriodString()+" - "+V2_Txt_Up); string message2 = (WindowExpertName()+" - "+Symbol()+" "+PeriodString()+" - "+V2_Txt_Md); string message3 = (WindowExpertName()+" - "+Symbol()+" "+PeriodString()+" - "+V2_Txt_Dn); if(V2_Alert_Up_Line && V2_TimeBar!=Time[0] && V2_Alert_Up==1) { if (V2_AlertsMessage) Alert(message1); if (V2_AlertsEmail) SendMail(Symbol()+" - "+WindowExpertName()+" - ",message1); if (V2_AlertsMobile) SendNotification(message1); if (V2_AlertsSound) PlaySound(V2_Sound_Up); V2_TimeBar=Time[0]; } if(V2_Alert_Md_Line && V2_TimeBar!=Time[0] && V2_Alert_Md==1) { if (V2_AlertsMessage) Alert(message2); if (V2_AlertsEmail) SendMail(Symbol()+" - "+WindowExpertName()+" - ",message2); if (V2_AlertsMobile) SendNotification(message2); if (V2_AlertsSound) PlaySound(V2_Sound_Md); V2_TimeBar=Time[0]; } if(V2_Alert_Dn_Line && V2_TimeBar!=Time[0] && V2_Alert_Dn==1) { if (V2_AlertsMessage) Alert(message3); if (V2_AlertsEmail) SendMail(Symbol()+" - "+WindowExpertName()+" - ",message3); if (V2_AlertsMobile) SendNotification(message3); if (V2_AlertsSound) PlaySound(V2_Sound_Dn); V2_TimeBar=Time[0]; } } //+------------------------------------------------------------------+ //| —˄̇Π̇ ÒÂ˲ ͇҇ÌËÂ/ÔÓ·ÓÈ ÎËÌËÈ Ë̉Ë͇ÚÓ‡ | //+------------------------------------------------------------------+ if(V3_Alert &&(V3_AlertsMessage || V3_AlertsEmail || V3_AlertsMobile || V3_AlertsSound)) { string message1 = (WindowExpertName()+" - "+Symbol()+" "+PeriodString()+" - "+V3_Txt_Up); string message3 = (WindowExpertName()+" - "+Symbol()+" "+PeriodString()+" - "+V3_Txt_Dn); if(V3_Alert_Up_Line && V3_TimeBar!=Time[0] && V3_Alert_Up==1) { if (V3_AlertsMessage) Alert(message1); if (V3_AlertsEmail) SendMail(Symbol()+" - "+WindowExpertName()+" - ",message1); if (V3_AlertsMobile) SendNotification(message1); if (V3_AlertsSound) PlaySound(V3_Sound_Up); V3_TimeBar=Time[0]; } if(V3_Alert_Dn_Line && V3_TimeBar!=Time[0] && V3_Alert_Dn==1) { if (V3_AlertsMessage) Alert(message3); if (V3_AlertsEmail) SendMail(Symbol()+" - "+WindowExpertName()+" - ",message3); if (V3_AlertsMobile) SendNotification(message3); if (V3_AlertsSound) PlaySound(V3_Sound_Dn); V3_TimeBar=Time[0]; } } //+------------------------------------------------------------------+ //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void arrows_wind(int k, string N,int ots,int Code,color clr, int ArrowSize,bool up) { string objName = PREFIX+N+TimeToStr(Time[k]); double gap = ots*Point; ObjectCreate(objName, OBJ_ARROW,0,Time[k],0); ObjectSet (objName, OBJPROP_COLOR, clr); ObjectSet (objName, OBJPROP_ARROWCODE,Code); ObjectSet (objName, OBJPROP_WIDTH,ArrowSize); if (up) { ObjectSet(objName, OBJPROP_ANCHOR,ANCHOR_BOTTOM); ObjectSet(objName, OBJPROP_PRICE1,High[k]+gap); }else{ ObjectSet(objName, OBJPROP_ANCHOR,ANCHOR_TOP); ObjectSet(objName, OBJPROP_PRICE1,Low[k]-gap); } ObjectSet (objName, OBJPROP_SELECTABLE,0); ObjectSet (objName, OBJPROP_SELECTED,0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ string PeriodString() { switch (_Period) { case PERIOD_M1: return("M1"); case PERIOD_M5: return("M5"); case PERIOD_M15: return("M15"); case PERIOD_M30: return("M30"); case PERIOD_H1: return("H1"); case PERIOD_H4: return("H4"); case PERIOD_D1: return("D1"); case PERIOD_W1: return("W1"); case PERIOD_MN1: return("MN1"); } return("M" + string(_Period)); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void txtobj(int k, string N, double delt, bool up) { double gap; int chart_ID = 0; string objName = PREFIX+N+TimeToStr(Time[k]); if(up) gap = High[k]+V2_txt_otstup*Point; else gap = Low[k]-V2_txt_otstup*Point; ObjectCreate (chart_ID,objName,OBJ_TEXT,0,Time[k],gap); ObjectSetString (chart_ID,objName,OBJPROP_TEXT,DoubleToStr(delt,0)); ObjectSetString (chart_ID,objName,OBJPROP_FONT,V2_txt_font); ObjectSetInteger(chart_ID,objName,OBJPROP_FONTSIZE,V2_txt_size); ObjectSetInteger(chart_ID,objName,OBJPROP_ANCHOR,ANCHOR_CENTER); ObjectSetInteger(chart_ID,objName,OBJPROP_COLOR,V2_txt_color); ObjectSetInteger(chart_ID,objName,OBJPROP_BACK,0); ObjectSetInteger(chart_ID,objName,OBJPROP_SELECTABLE,0); ObjectSetInteger(chart_ID,objName,OBJPROP_SELECTED,0); } //+------------------------------------------------------------------+