//+------------------------------------------------------------------+ //| VininI_RSI_FO_2.mq4 | //+------------------------------------------------------------------+ //| VininI_Cyber | //| Copyright © 2009, Victor Nicolaev | //| e-mail: vinin@mail.ru | //+------------------------------------------------------------------+ //mod x2 NikitaKiev //mod rvi #property copyright "Copyright © 2008, Victor Nicolaev" #property link "e-mail: vinin@mail.ru" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Green #property indicator_color2 Red #property indicator_level1 -0.5 #property indicator_level2 0.5 #property indicator_levelcolor SlateGray #property indicator_minimum -1.05 #property indicator_maximum 1.05 //---- input parameters extern string Pair1; extern int RVI_Period1 =10; extern int RVI_line_mode1 =0; extern int MA_Period1 =5; extern string Pair2; extern int RVI_Period2 =10; extern int RVI_line_mode2 =1; extern int MA_Period2 =5; extern string ___; extern int MA_Method =3; extern string note_ = "enter currency pair: EUSD GBPJPY etc"; extern string note = "line mode: 0main 1 sig"; //---- buffers double Value[],MA[],iFish[],Value1[],MA1[],iFish1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(6); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0, iFish); SetIndexBuffer(3, Value); SetIndexBuffer(2, MA); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1, iFish1); SetIndexBuffer(4, Value1); SetIndexBuffer(5, MA1); string name1=""+Pair1+" RVI "+RVI_Period1+" MA "+MA_Period1+""; string name2=""+Pair2+" RVI "+RVI_Period2+" MA "+MA_Period2+""; SetIndexLabel(0, name1); SetIndexLabel(1, name2); IndicatorShortName(" RVI FO: "+name1+"; "+name2+" "); return(0); } int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(),ii, i; if (counted_bars < 0) return(-1); if (counted_bars > 0) counted_bars--; int limit=Bars - counted_bars; for(i = limit; i >= 0; i--) Value[i]=(10*iRVI(Pair1,0,RVI_Period1,RVI_line_mode1,i)); for(i = limit; i >= 0; i--) MA[i]=iMAOnArray(Value,0,MA_Period1,0,MA_Method,i); for(i = limit; i >= 0; i--) iFish[i]=(MathExp(2.0*MA[i])-1.0)/(MathExp(2.0*MA[i])+1.0); for(i = limit; i >= 0; i--) Value1[i]=(10*iRVI(Pair2,0,RVI_Period2,RVI_line_mode2,i)); for(i = limit; i >= 0; i--) MA1[i]=iMAOnArray(Value1,0,MA_Period2,0,MA_Method,i); for(i = limit; i >= 0; i--) iFish1[i]=(MathExp(2.0*MA1[i])-1.0)/(MathExp(2.0*MA1[i])+1.0); return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Indicator Curves created:
Implements a curve of type DRAW_LINE
Indicators Used:
Relative Vigor index
Moving average indicator
Custom Indicators Used:
Order Management characteristics:
Other Features: