//+------------------------------------------------------------------+ //| Áîëüøàÿ Êîëëåêöèÿ Ñåìàôîðîâ.mq4 | //+------------------------------------------------------------------+ #property copyright "Ñåðãååâ Àëåêñåé (ñ) 2007" #property indicator_separate_window #property indicator_minimum 0 #property indicator_maximum 1 #property indicator_buffers 2 #property indicator_width1 2 #property indicator_width2 2 #property indicator_color1 Crimson #property indicator_color2 LimeGreen #property indicator_style1 STYLE_SOLID #property indicator_style2 STYLE_SOLID //---- input parameters extern int FastEMA=8; extern int SlowEMA=12; extern int SignalMA=3; extern int Price=PRICE_CLOSE;//0-close, 1-open, 2-high, 3-low, 4-median, 5-typic, 6-wieight //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; int init() { //---- indicators SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_HISTOGRAM); SetIndexBuffer(1,ExtMapBuffer2); string Name = "MACD("+FastEMA+","+SlowEMA+","+SignalMA+")"; IndicatorShortName(Name); return(0); } int deinit() { return(0); } int start() { double macd, macds; //---- for (int i = 0; i < Bars; i++) { ExtMapBuffer1[i]=0; ExtMapBuffer2[i]=0; macd=iMACD(NULL,0, FastEMA, SlowEMA, SignalMA, Price, MODE_MAIN, i); macds=iMACD(NULL,0, FastEMA, SlowEMA, SignalMA, Price, MODE_SIGNAL, i); if (macd<macds) ExtMapBuffer1[i] = 1; //ïðîäàåì else ExtMapBuffer2[i] = 1; //ïîêóïàåì } return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Indicator Curves created:
Implements a curve of type DRAW_HISTOGRAM
Indicators Used:
MACD Histogram
Custom Indicators Used:
Order Management characteristics:
Other Features: