//+------------------------------------------------------------------+ //| Áîëüøàÿ Êîëëåêöèÿ Ñåìàôîðîâ.mq4 | //+------------------------------------------------------------------+ #property copyright "Ñåðãååâ Àëåêñåé (ñ) 2007" #property indicator_separate_window #property indicator_minimum 0 #property indicator_maximum 1 #property indicator_buffers 4 #property indicator_width1 2 #property indicator_width2 2 #property indicator_width3 1 #property indicator_width4 1 #property indicator_color1 Crimson #property indicator_color2 LimeGreen #property indicator_color3 Crimson #property indicator_color4 LimeGreen #property indicator_style1 STYLE_SOLID #property indicator_style2 STYLE_SOLID #property indicator_style3 STYLE_SOLID #property indicator_style4 STYLE_SOLID //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double ExtMapBuffer4[]; int init() { //---- indicators SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_HISTOGRAM); SetIndexBuffer(1,ExtMapBuffer2); SetIndexStyle(2,DRAW_HISTOGRAM); SetIndexBuffer(2,ExtMapBuffer3); SetIndexStyle(3,DRAW_HISTOGRAM); SetIndexBuffer(3,ExtMapBuffer4); IndicatorShortName("SAR+ADX"); return(0); } int deinit() { return(0); } int start() { double sar; double adxP,adxN; for (int i = 0; i < Bars; i++) { ExtMapBuffer1[i]=0; ExtMapBuffer2[i]=0; ExtMapBuffer3[i]=0; ExtMapBuffer4[i]=0; adxP=iADX(NULL,0,14 ,PRICE_CLOSE,1,i);//+DI adxN=iADX(NULL,0,14 ,PRICE_CLOSE,2,i);//-DI sar = iSAR(NULL,0,0.02,0.2,i) ; if (sar > Close[i] && adxN > adxP){ ExtMapBuffer1[i] = 1; }//ïðîäàåì ñèëüíî if (sar < Close[i] && adxP > adxN){ ExtMapBuffer2[i] = 1; }//ïîêóïàåì ñèëüíî if (sar > Close[i] && adxP > adxN){ ExtMapBuffer3[i] = 1; }//ïðîäàåì ñëàáî if (sar < Close[i] && adxN > adxP){ ExtMapBuffer4[i] = 1; }//ïîêóïàåì ñëàáî } return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Series array that contains close prices for each bar
Indicator Curves created:
Implements a curve of type DRAW_HISTOGRAM
Indicators Used:
Movement directional index
Parabolic Stop and Reverse system
Custom Indicators Used:
Order Management characteristics:
Other Features: