//وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو //| MACD+OsMA+BB_MOD.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو #property copyright "" #property link "" //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو #property indicator_separate_window #property indicator_buffers 8 #property indicator_color1 Lime #property indicator_color2 Red #property indicator_color3 Blue #property indicator_color4 Lime #property indicator_color5 Red #property indicator_color6 Peru #property indicator_color7 Peru #property indicator_color8 Yellow //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو extern int FastEMA=12; extern int SlowEMA=26; extern int SignalSMA=9; extern int BollingerPeriod=21; extern int BollingerDeviation=2; extern int BollingerShift=0; //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو double redBuffer[]; double blueBuffer[]; double blueBorder[]; double ind_buffer4[]; double ind_buffer5[]; double bandsUpper[]; double bandsLower[]; double bandsMiddle[]; int i; double osma1, osma2, fast, slow1, slow2; //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو int init() { IndicatorShortName("MACD("+FastEMA+","+SlowEMA+","+SignalSMA+")"); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+1); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,3); SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,1); SetIndexStyle(4,DRAW_HISTOGRAM,STYLE_SOLID,1); SetIndexStyle(5,DRAW_LINE,STYLE_SOLID,1); SetIndexStyle(6,DRAW_LINE,STYLE_SOLID,1); SetIndexStyle(7,DRAW_LINE,STYLE_DOT,1); //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو SetIndexEmptyValue(0,0.0); SetIndexEmptyValue(1,0.0); //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو SetIndexDrawBegin(0,SignalSMA); SetIndexDrawBegin(1,SignalSMA); SetIndexDrawBegin(2,SignalSMA); SetIndexDrawBegin(3,SignalSMA); SetIndexDrawBegin(4,SignalSMA); //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو SetIndexBuffer(0,redBuffer); SetIndexBuffer(1,blueBuffer); SetIndexBuffer(2,blueBorder); SetIndexBuffer(3,ind_buffer4); SetIndexBuffer(4,ind_buffer5); SetIndexBuffer(5,bandsUpper); SetIndexBuffer(6,bandsLower); SetIndexBuffer(7,bandsMiddle); //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو SetIndexLabel(0,"MACD"); SetIndexLabel(1,"Signal"); SetIndexLabel(2,"OsMA"); SetIndexLabel(3,"OsMAup"); SetIndexLabel(4,"OsMAdown"); SetIndexLabel(5,"bandsUpper"); SetIndexLabel(6,"bandsLower"); SetIndexLabel(7,"bandsMiddle"); return(0); } //وووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووووو int start() { int limit, counted_bars=IndicatorCounted(); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars-1; for(i=0;i0) { slow2=iCustom(NULL,0,"macdHelp",FastEMA,SlowEMA,SignalSMA,BollingerPeriod,BollingerDeviation,BollingerShift,4,i-1); if(fastosma2) ind_buffer4[i]=osma1; else ind_buffer4[i]=0.0; if(osma1