Navigation:Home > Content >

i_FD_FS_Separate_W.mq4

Time: 2015-03-05 | Download file:i_FD_FS_Separate_W.mq4

//+------------------------------------------------------------------+
//|                                                      i_FD_FS.mq4 |
//|                                                                  |
//|                                             dmfedoseev@yandex.ru |
//+------------------------------------------------------------------+
#property copyright ""
#property link      "dmfedoseev@yandex.ru"

#property indicator_separate_window
#property indicator_buffers 7
#property indicator_color1 Red
#property indicator_color2 Orange
#property indicator_color3 Yellow
#property indicator_color4 Lime
#property indicator_color5 Blue
#property indicator_color6 DodgerBlue
#property indicator_color7 DarkViolet

//---- input parameters

extern int       i_Period=240;
int LastTime;
double A[],B[],R[],RM[];
int RN[];
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
 
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,ExtMapBuffer2);
   
   SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(2,ExtMapBuffer3);
 
   SetIndexStyle(3,DRAW_LINE);
   SetIndexBuffer(3,ExtMapBuffer4);   
   
   SetIndexStyle(4,DRAW_LINE);
   SetIndexBuffer(4,ExtMapBuffer5);
   
   SetIndexStyle(5,DRAW_LINE);
   SetIndexBuffer(5,ExtMapBuffer6);
 
   SetIndexStyle(6,DRAW_LINE);
   SetIndexBuffer(6,ExtMapBuffer7);      
   
   IndicatorShortName("FSSW");
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   ObjectDelete("FSSW_Line_1");
   ObjectDelete("FSSW_Line_2");
   ObjectDelete("FSSW_Line_3");
   ObjectDelete("FSSW_Line_4");   
   ObjectDelete("FSSW_Line_5");
   ObjectDelete("FSSW_Line_6");
   ObjectDelete("FSSW_Line_7");      
      
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----
   if(Time[0]!=LastTime){
      LastTime=Time[0];
      
      for(int i=0;iRM[j]){
                     RM[j]=R[i];
                     RN[j]=i;
                     break;
                  }
               }
            
            }            
            
            for(i=0;i        

Recommend