MTF_MA





//+------------------------------------------------------------------+
//|                                                       MTF_MA.mq4 |
//|                                                         omelette |
//|                                           omelette@oceanfree.net |
//+------------------------------------------------------------------+
#property copyright "omelette"
#property link      "omelette@oceanfree.net"

#property indicator_chart_window

extern int MA_Type = 0;
extern int MA_Price = 0;
extern int MA_TF = 60;
extern int MA_Period = 10;

double MA_buff[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3,Yellow);
   SetIndexBuffer(0,MA_buff);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----
   int i = Bars - counted_bars + 1;
   
   while (i >= 0)
   {
    MA_buff[i] = iMA(NULL,MA_TF,MA_Period,0,MA_Type,MA_Price,i);
    
    i--;
   }
//----
   return(0);
  }
//+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:



Indicator Curves created:

Implements a curve of type DRAW_LINE


Indicators Used:

Moving average indicator


Custom Indicators Used:

Order Management characteristics:

Other Features: