//+------------------------------------------------------------------+ //| Z_MTF_Chimp2_MA.mq4 //+------------------------------------------------------------------+ #property copyright "AHGDP" #property link "Z_MTF_Chimp2_MA" #property indicator_separate_window #property indicator_buffers 4 #property indicator_color1 LimeGreen #property indicator_width1 2 #property indicator_color2 Red #property indicator_width2 2 #property indicator_color3 Aqua #property indicator_width3 2 #property indicator_color4 Yellow #property indicator_width4 2 //====================================================================== #property indicator_level1 0 #property indicator_level2 0.85 #property indicator_level3 0.6 #property indicator_level4 0.3 #property indicator_level5 -0.3 #property indicator_level6 -0.6 #property indicator_level7 -0.85 #property indicator_levelcolor BurlyWood //C'210,160,100'//BurlyWood #property indicator_levelstyle STYLE_DOT #property indicator_levelwidth 0 //======================================================================= extern double WeightDM = 2.5 ;//3.5 extern double WeightDI = 2.0 ;//3.0 extern double WeightDX = 1.0 ; extern double WeightOut = 2.0 ;//1.0 extern int MaPer = 10 ; extern int MA_SiEmSmWe3 = 0 ; extern int MaShift = 0 ; extern int TF = 0 ; extern int LineSizeHisto = 2 ; extern int LineSizeChimp = 2 ; extern int LineSizeMa = 2 ; extern int CountBars = 300 ; double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double ExtMapBuffer4[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { SetIndexStyle (0,DRAW_HISTOGRAM, STYLE_SOLID, LineSizeHisto); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle (1,DRAW_HISTOGRAM, STYLE_SOLID, LineSizeHisto); SetIndexBuffer(1,ExtMapBuffer2); SetIndexStyle (2, DRAW_LINE,STYLE_SOLID, LineSizeChimp); SetIndexBuffer(2, ExtMapBuffer3); SetIndexStyle (3, DRAW_LINE,STYLE_SOLID, LineSizeMa); SetIndexBuffer(3, ExtMapBuffer4); switch(TF) { case 1 : string TimeFrameStr="Period_M1"; break; case 5 : TimeFrameStr="Period_M5"; break; case 15 : TimeFrameStr="Period_M15"; break; case 30 : TimeFrameStr="Period_M30"; break; case 60 : TimeFrameStr="Period_H1"; break; case 240 : TimeFrameStr="Period_H4"; break; case 1440 : TimeFrameStr="Period_D1"; break; case 10080 : TimeFrameStr="Period_W1"; break; case 43200 : TimeFrameStr="Period_MN1"; break; default : TimeFrameStr="Current Timeframe"; } // IndicatorShortName("MTF_CCI("+CCIperiod+") ("+TimeFrameStr+")"); } //---- return(0); //+------------------------------------------------------------------+ //| MTF CCI | //+------------------------------------------------------------------+ int start() { datetime TimeArray[]; int i,limit,y=0,counted_bars=IndicatorCounted(); // Plot defined time frame on to current time frame ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TF); limit=Bars-counted_bars; for(i=0,y=0;i<limit;i++) { if (Time[i]<TimeArray[y]) y++; ExtMapBuffer1[i]=iCustom(NULL,TF,"Chimp2_MA",WeightDM,WeightDI,WeightDX,WeightOut,MaPer,MA_SiEmSmWe3,MaShift, 0, y); ExtMapBuffer2[i]=iCustom(NULL,TF,"Chimp2_MA",WeightDM,WeightDI,WeightDX,WeightOut,MaPer,MA_SiEmSmWe3,MaShift, 1, y); ExtMapBuffer3[i]=iCustom(NULL,TF,"Chimp2_MA",WeightDM,WeightDI,WeightDX,WeightOut,MaPer,MA_SiEmSmWe3,MaShift, 2, y); ExtMapBuffer4[i]=iCustom(NULL,TF,"Chimp2_MA",WeightDM,WeightDI,WeightDX,WeightOut,MaPer,MA_SiEmSmWe3,MaShift, 3, y); } return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Series array that contains open time of each bar
Indicator Curves created:
Indicators Used:
Custom Indicators Used:
Chimp2_MA
Order Management characteristics:
Other Features: