Navigation´╝ÜHome > Content >

CCI_-_T3_smoothed.mq4

Time: 2015-10-12 | Download file:CCI_-_T3_smoothed.mq4

//+------------------------------------------------------------------+
//|                                                       CCI T3.mq4 |
//+------------------------------------------------------------------+
#property copyright "www,forex-tsd.com"
#property link      "www,forex-tsd.com"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1  PaleVioletRed
#property indicator_width1  2

//
//
//
//
//

extern int    CCIPeriod  = 50;
extern int    CCIPrice   = PRICE_TYPICAL;
extern int    T3Period   = 20;
extern double T3Hot      = 0.7;
extern bool   T3Original = false;
extern double OverSold   = -100;
extern double OverBought =  100;

double cci[];
double prices[];

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
//
//
//
//
//

int init()
{
   IndicatorBuffers(2);
      SetIndexBuffer(0,cci);
      SetIndexBuffer(1,prices);
         SetLevelValue(0,OverBought);
         SetLevelValue(1,OverSold);
   IndicatorShortName("CCI ("+CCIPeriod+")");
   return(0);
}

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
//
//
//
//

int start()
{
   int counted_bars=IndicatorCounted();
   int i,k,limit;

   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;
         limit = MathMin(Bars-counted_bars,Bars-1);

   //
   //
   //
   //
   //

   for(i=limit; i>=0; i--)
   {
      prices[i]  = iMA(NULL,0,1,0,MODE_SMA,CCIPrice,i);
      double avg = 0; for(k=0; k        

Recommend