(3) TEST_BARS_GBPJPY_8v1_High_en





//+------------------------------------------------------------------+
//|                                    TEST_BARS_GBPJPY_8v1_High.mq4 |
//| Âíèìàíèå! Äîëæíû ðàáîòàòü ÄÂÀ èíäþêà  TEST_BARS_GBPJPY_8v1_High è  TEST_BARS_GBPJPY_8v1_Low                                        |
//|  ÝÒÎ "ïðîèçâåäåíèå" = äëÿ âå÷íî ñîìíåâàþùèõñÿ, â ñâîèõ äåéñòâèÿõ íà ðûíêå.
//| Â îäèí áàð!!! çàãíàíî 8 âîñåìü èíäèêàòîðîâ !!!          i++ !!!!
//| Âîçìîæíî áóäåò äîðàáàòûâàòüñÿ, à ìîæåò è íåò
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1  Blue//Black 
#property indicator_color2 Red//Black White
#property indicator_color3 Blue//Blue
#property indicator_color4  Red 
#property indicator_color5 Blue //Black 
#property indicator_color6 Red//Black White
#property indicator_color7  Blue  //Blue
#property indicator_color8 Red 
//----
 extern int ilimit =  555;
//=====================================
//---- input parameters
 extern int  RSI_Period=5;
extern int  RSI_Price =0; // 0=CLOSE 1=OPEN 2=HIGH 3=LOW 4=MEDIAN  5  6
extern int  MA_Period =5;
extern int  MA_Method =3; // 0=SMA 1=EMA 2=SMMA 3=LWMA
extern int ADXPeriod = 12;

//---- buffers
//=====================================

//---- buffers 
 double val1[],val2[],val3[],val4[];
 double val11[],val22[],val33[],val44[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexBuffer(0,val1);
   SetIndexDrawBegin(0,0);
   SetIndexStyle(1,DRAW_HISTOGRAM);
   SetIndexBuffer(1,val2);
   SetIndexDrawBegin(1,0);
   SetIndexStyle(2,DRAW_HISTOGRAM);
   SetIndexBuffer(2,val3);
   SetIndexDrawBegin(2,0);
   SetIndexStyle(3,DRAW_HISTOGRAM);
   SetIndexBuffer(3,val4);
   SetIndexDrawBegin(3,0);
       SetIndexLabel(0, " MOVE OF TWO CROSSES TOGETHER  " ); //" ÄÂÈÆÅÍÈÅ  ÄÂÓÕ ÊÐÎÑÑÎÂ ÂÌÅÑÒÅ  "
       SetIndexLabel(2, " MOVE OF USDJPY & GBPUSD TOGETHER " );//ÄÂÈÆÅÍÈÅ  USDJPY è GBPUSD ÂÌÅÑÒÅ
       SetIndexStyle(4,DRAW_HISTOGRAM);
   SetIndexBuffer(4,val11);
   SetIndexDrawBegin(4,0);
   SetIndexStyle(5,DRAW_HISTOGRAM);
   SetIndexBuffer(5,val22);
   SetIndexDrawBegin(5,0);
   SetIndexStyle(6,DRAW_HISTOGRAM);
   SetIndexBuffer(6,val33);
   SetIndexDrawBegin(6,0);
   SetIndexStyle(7,DRAW_HISTOGRAM);
   SetIndexBuffer(7,val44);
   SetIndexDrawBegin(7,0);
    SetIndexLabel(4, "  GBPJPY-r3           " );
    SetIndexLabel(6, "  GBPJPY-r4           " );
   return(0);
  }
//+------------------------------------------------------------------+
int start()
  { double w,ww,w1,ww1, r,rr,r1,rr1, rr2_DI,rr3_DI_S,  r2_ADX ,r3_ADX_S ;
   int limit;
   int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   for(int i=0; i<limit; i++)
{ 
	r=iCustom("EURJPY",0,"VininI_RSI_FO",RSI_Period,RSI_Price, MA_Period, MA_Method,0,i);
	r1=iCustom("EURJPY",0,"VininI_RSI_FO",RSI_Period,RSI_Price, MA_Period, MA_Method,0,i);
	rr=iCustom("GBPJPY",0,"VininI_RSI_FO",RSI_Period,RSI_Price, MA_Period, MA_Method,0,i);
	rr1=iCustom("GBPJPY",0,"VininI_RSI_FO",RSI_Period,RSI_Price, MA_Period, MA_Method,0,i);
    w=iCustom("USDJPY",0,"VininI_RSI_FO",RSI_Period,RSI_Price, MA_Period, MA_Method,0,i);
	w1=iCustom("USDJPY",0,"VininI_RSI_FO",RSI_Period,RSI_Price, MA_Period, MA_Method,0,i);
	ww=iCustom("GBPUSD",0,"VininI_RSI_FO",RSI_Period,RSI_Price, MA_Period, MA_Method,0,i);
	ww1=iCustom("GBPUSD",0,"VininI_RSI_FO",RSI_Period,RSI_Price, MA_Period, MA_Method,0,i);
//+------------------------------  	
 if (r>0 && rr>0)
 {
    val1[i]=High[i];    val2[i]=High[i]-(High[i]-Low[i])*0.125;
 }
 if (0>r1 && 0>rr1) 
 {
    val1[i]=High[i]-(High[i]-Low[i])*0.125;     val2[i]=High[i];
  }  
//+------------------------------   
 if (w>0 && ww>0)
 {
   val3[i]=High[i]-(High[i]-Low[i])*0.125;  
    val4[i]=High[i]-(High[i]-Low[i])*0.25; 
 }
 if (0>w1&&0>ww1) 
 {
    val3[i]=High[i]-(High[i]-Low[i])*0.25;
    val4[i]=High[i]-(High[i]-Low[i])*0.125;  
 }
//+------------------------------  
//==============================================================================
// Â èíäþêå "ADXm",  0 áóôåð = DI,( ðàçíîñòü +DI  è -DI), à 1 áóôåð = ADX , 
//==============================================================================
     rr2_DI =  iCustom("GBPJPY",0,"ADXm",ADXPeriod ,0,0,i);
     rr3_DI_S =iCustom("GBPUSD",0,"ADXm",ADXPeriod ,0, 0, i)*0.5+iCustom("USDJPY",0,"ADXm",ADXPeriod,0,0,i)*0.5; 
////  //+------------------------------          
     r2_ADX =  iCustom("GBPJPY",0,"ADXm",ADXPeriod*0.5,0,1, i);                        
     r3_ADX_S = iCustom("GBPUSD",0,"ADXm",ADXPeriod*0.5,0, 1, i)*0.5+ iCustom("USDJPY",0,"ADXm",ADXPeriod*0.5,0,1,i)*0.5;     
 //+------------------------------------------------------------------+  
//+----------------------------------- &&
if (rr2_DI> rr3_DI_S && rr2_DI > 0 )
{
	val11[i]=High[i]-(High[i]-Low[i])*0.25;
   val22[i]=High[i]-(High[i]-Low[i])*0.375;
}
if (rr2_DI< rr3_DI_S && rr2_DI  < 0 ) 
{
     val11[i]=High[i]-(High[i]-Low[i])*0.375; 
     val22[i]=  High[i]-(High[i]-Low[i])*0.25; 
}
//+-----------------------------------
if (r3_ADX_S >0)
{
  val33[i]=High[i]-(High[i]-Low[i])*0.375;
  val44[i]= High[i]-(High[i]-Low[i])*0.5;         
}
if ( r3_ADX_S <0) 
{
  val33[i]=High[i]-(High[i]-Low[i])*0.5;
  val44[i]= High[i]-(High[i]-Low[i])*0.375;
}
//+-----------------------------------
 }
   return(0);
  }
//+------------------------------------------------------------------+


//+------------------------------------------------------------------+







Sample





Analysis



Market Information Used:

Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar


Indicator Curves created:

Implements a curve of type DRAW_HISTOGRAM


Indicators Used:




Custom Indicators Used:
VininI_RSI_FO
ADXm

Order Management characteristics:

Other Features: