VininI Trend WPR MA

MT4 Indicator VininI Trend WPR MA for technical analysis

MT4 Indicator VininI Trend WPR MA for technical analysis
Vinin Trend
MT4 Indicator VininI Trend WPR MA for technical analysis
Vinin Trend
MT4 Indicator VininI Trend WPR MA for technical analysis
Vinin Trend
MT4 Indicator VininI Trend WPR MA for technical analysis
Vinin Trend





Indicator VininI Trend WPR MA created by the author Victor Nicolaev (Vinin), is a relatively new and very popular technical indicator. Indicator VininI Trend WPR MA be advised to use to determine the long-term trend that can identify with above average accuracy. It should be combined with other indicators such as Commodity Channel Index - CCI, METRO and the like, which will help clarify the buying and selling market signals.


VininI Trend WPR MA MQ4 Code Base (Copy Code)
//+------------------------------------------------------------------+
//|                                          VininI_Trend_MA_WPR.mq4 |
//|                                  Ńopyright 2008. Victor Nicolaev |
//|                                                    vinin@mail.ru |
//+------------------------------------------------------------------+
#property copyright "Ńopyright 2008. Victor Nicolaev"
#property link      "vinin@mail.ru"


#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Yellow
#property indicator_level1 0
#property indicator_maximum 1
#property indicator_minimum -1

extern int WPR_Period=100;
extern int Trend_MA_Period=3;

extern int MA_Start=10;
extern int MA_Step=10;
extern int MA_Count=50;
extern int MA_Mode=0;
extern int Limit=1440;
//---- buffers
double Buffer[];
double WPR[];
double Trend[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init() {
//---- drawing settings
   IndicatorBuffers(3);
   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexBuffer(0,Trend);
   SetIndexBuffer(1,WPR);
   SetIndexBuffer(0,Buffer);

   return(0); }//int init() 
   
//+------------------------------------------------------------------+
int start() {
   int limit;
   int counted_bars=IndicatorCounted();
   int i,j;
   double sum=0;
   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   if (Limit>0) limit=MathMin(Limit,limit); 
   
   for (i = limit;i>=0;i--) WPR[i]=iWPR(NULL,0,WPR_Period,i);
   
   for (i = limit;i>=0;i--){
      sum=0;
      for (j=0;j<MA_Count;j++) 
         if (WPR[i]>iMAOnArray(WPR,0,MA_Start+j*MA_Step,0,MA_Mode,i)) sum+=1; else sum-=1;
      Buffer[i]=sum/MA_Count;
   }

   for (i = limit;i>=0;i--)Trend[i]=iMAOnArray(Buffer,0,Trend_MA_Period,0,MA_Mode,i);
   

   return(0); 
}