Gitalovsa.mq4
Gitalovsa.mq4 Forex MetaTrader4 Indicators All Free Download.
Gitalovsa.mq4 download link will appear after 20 seconds.
Gitalovsa.mq4 Programming source code.
#property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Lime #property indicator_color2 Red //---- input parameters extern string note1 = " Параметры для Бай-светиков:"; extern bool Включить_Бай_Светики = true; extern int Period_Buy=12; extern int Symbol_Buy=233; extern bool Alert_Buy = true; extern int Width_Buy = 1; extern string note2 = ""; extern string note3 = " Параметры для Селл-светиков:"; extern bool Включить_Селл_Светики = true; extern int Period_Sell=12; extern int Symbol_Sell=234; extern bool Alert_Sell = true; extern int Width_Sell = 1; extern string note4 = ""; extern string note5 = " Звуковое оповещение"; extern bool UseSound = true; extern string SoundFile = "Trumpet.wav"; extern int ЗадержкаМелодии = 1; int Stp=1; int Dev=1; extern int BarsCount = 1000; //+---- mod of TRO MODIFICATION ------------------------+ double Buy_BuferUp[], Buy_BuferDn[], Sell_BuferUp[], Sell_BuferDn[]; //+------------------------------------------------------------------+ string symbol; int digits, period, key, snd; //+------------------------------------------------------------------+ int init() { IndicatorBuffers(4); period = Period() ; symbol = Symbol() ; digits = Digits ; key=0; IndicatorDigits(5); //+------------------------------------------------------------------+ if (Period_Buy>0 && Включить_Бай_Светики) { SetIndexBuffer(0,Buy_BuferUp); SetIndexStyle(0,DRAW_ARROW,EMPTY,Width_Buy); SetIndexArrow(0,Symbol_Buy); SetIndexEmptyValue(0,0); SetIndexLabel(0,"BuyUp"); } if (Period_Sell>0 && Включить_Селл_Светики) { SetIndexBuffer(1,Sell_BuferDn); SetIndexStyle(1,DRAW_ARROW,EMPTY,Width_Sell); SetIndexArrow(1,Symbol_Sell); SetIndexEmptyValue(1,0); SetIndexLabel(1,"SellDn"); } SetIndexBuffer(2,Sell_BuferUp); SetIndexBuffer(3,Buy_BuferDn); return(0); } //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ int start() { //+------------------------------------------------------------------+ if (Period_Buy>0) CountZZ(Buy_BuferUp, Buy_BuferDn, Period_Buy, Dev,Stp); if (Period_Sell>0) CountZZ(Sell_BuferUp,Sell_BuferDn,Period_Sell,Dev,Stp); //+------------------------------------------------------------------+ if(UseSound) { if(key==Time[0] && snd>0) { if(snd>=ЗадержкаМелодии) { PlaySound(SoundFile); snd = 0; } else snd++; } } if(key!=Time[0]) { if( Alert_Buy) { if( Buy_BuferUp[1] != 0 ) { Alert(" Светик "+Period_Buy+" на " + symbol+" "+ Period()+ " на цене "+ DoubleToStr(Close[0] ,digits)); snd++; } } if( Alert_Sell) { if( Sell_BuferDn[1] != 0 ) { Alert(" Светик "+Period_Sell+" на " + symbol+" "+ Period()+ " на цене "+ DoubleToStr(Close[0] ,digits)); snd++; } } key=Time[0]; } return(0); } //+------------------------------------------------------------------+ int CountZZ( double& ExtMapBuffer[], double& ExtMapBuffer2[], int ExtDepth, int ExtDeviation, int ExtBackstep ) { int shift, back,lasthighpos,lastlowpos, limit; double val,res; double curlow,curhigh,lasthigh,lastlow; limit=Bars-ExtDepth; if(limit>BarsCount) limit=BarsCount; for(shift=limit; shift>=0; shift--) { val=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,shift)]; if(val==lastlow) val=00; else { lastlow=val; if((Low[shift]-val)>(ExtDeviation*Point)) val=00; else { for(back=1; back<=ExtBackstep; back++) { res=ExtMapBuffer[shift+back]; if((res!=0)&&(res>val)) ExtMapBuffer[shift+back]=00; } } } ExtMapBuffer[shift]=val; //--- high val=High[Highest(NULL,0,MODE_HIGH,ExtDepth,shift)]; if(val==lasthigh) val=00; else { lasthigh=val; if((val-High[shift])>(ExtDeviation*Point)) val=00; else { for(back=1; back<=ExtBackstep; back++) { res=ExtMapBuffer2[shift+back]; if((res!=0)&&(res=0; shift--) { curlow=ExtMapBuffer[shift]; curhigh=ExtMapBuffer2[shift]; if((curlow==0)&&(curhigh==0)) continue; //--- if(curhigh!=0) { if(lasthigh>0) { if(lasthigh 0) { if(lastlow>curlow) ExtMapBuffer[lastlowpos]=0; else ExtMapBuffer[shift]=0; } //--- if((curlow =0; shift--) { if(shift>=limit) ExtMapBuffer[shift]=00; else { res=ExtMapBuffer2[shift]; if(res!=00) ExtMapBuffer2[shift]=res; } } return(0); } //+------------------------------------------------------------------+