[i]MovingMedian_v1





//+-------------------------+
//| Moving Median indicator |
//+-------------------------+
#property copyright "Ron Thompson"
#property link      "http://www.lightpatch.com/forex/"

#property indicator_chart_window
#property indicator_buffers 1

#property indicator_color1 Red

// User Input
extern int MedianPeriods = 21;


//---- buffers
double Buffer0[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//|------------------------------------------------------------------|

int init()
  {

   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0, Buffer0);
   
  }


//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
  }


//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+


int start()
  {
   int      pos=Bars-(MedianPeriods*2); // leave room for moving median periods
   int      ctr=0;

   while(pos>=0)
     {
      for(ctr=MedianPeriods; ctr>=0; ctr--)
        {
        }



      Buffer0[pos]=ma0; 

      
 	   pos--;
     }

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



Sample





Analysis



Market Information Used:



Indicator Curves created:

Implements a curve of type DRAW_LINE


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features: