TradeSig





//+------------------------------------------------------------------+
//|                                                        SmCCI.mq4 |
//|                      Copyright © 2006, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Lime
//---- input parameters

extern int       per=21;
/*extern int       nBar=300;*/
extern int       sdvig=5;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double malim, mared;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,ExtMapBuffer2);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int limit;
   int counted_bars=IndicatorCounted();
      //---- check for possible errors
   if(counted_bars<0) return(-1);
      //---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
      //---- macd counted in the 1-st buffer
   for(int i=0; i<limit; i++)
   
   {
      malim=iMA(NULL,0,per,0,MODE_SMA,PRICE_CLOSE,i);
      mared=iMA(NULL,0,per,0,MODE_SMA,PRICE_CLOSE,i+sdvig);
      ExtMapBuffer1[i]=malim;
      ExtMapBuffer2[i]=mared;
   }
   
   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: