mt4_Pathfinder

mt4_Pathfinder
0 Views
0 Downloads
0 Favorites
mt4_Pathfinder
//--------------------------------------------------------------------
// Pathfinder
// Search and destroy
// Multi Timeframe RSL Tests
//--------------------------------------------------------------------
#property indicator_separate_window    // Indicator is drawn in the main window
#property indicator_buffers 2         // Number of buffers
#property indicator_color1 Silver      // Buf_0 M30 RSL 
#property indicator_color2 Orange      // Buf_1 H1 RSL



double Buf_0[],Buf_1[];

//--------------------------------------------------------------------
int init()                          // Special function init()
  {
//--------------------------------------------------------------------
   SetIndexBuffer(0,Buf_0);         // M30 RSL
   SetIndexStyle (0,DRAW_LINE,STYLE_SOLID,1);// Line style
//--------------------------------------------------------------------
   SetIndexBuffer(1,Buf_1);         // H1 RSL
   SetIndexStyle (1,DRAW_LINE,STYLE_SOLID,1);// Line style
//--------------------------------------------------------------------


  }

int start()
  {
   int i,counted_bars=IndicatorCounted(),n;

//----
   i=Bars;
      if(counted_bars<1) i=0;
   
   while(i>=0)
     {

//-------RSL für Timeframe 30 zeichnen
         double RSLm30=iCustom(NULL,PERIOD_M30,"mt4_PF_RSL_30m",26,0,i);       
         Buf_0[i]=RSLm30;
//------------------------------------       
         
//-------RSL für Timeframe 60 zeichnen
         double RSLm60=iCustom(PERIOD_H1, 0, "mt4_PF_RSL_60m",26,1,i);
         Buf_1[i+n]=RSLm60;
//------------------------------------   

         
        
          i--;
     }
   return(0);
  }
//+------------------------------------------------------------------+

Comments