//+------------------------------------------------------------------+ 
//|   TRO_Multi_Meter_Internal                                       | 
//|                                                                  | 
//|   Copyright © 2008, Avery T. Horton, Jr. aka TheRumpledOne       |
//|                                                                  |
//|   PO BOX 43575, TUCSON, AZ 85733                                 |
//|                                                                  |
//|   GIFT AND DONATIONS ACCEPTED                                    | 
//|                                                                  |
//|   therumpledone@gmail.com                                        |  
//+------------------------------------------------------------------+ 
//|                                                                  |
//| go to www.kreslik.com for the latest indicator updates           |  
//+------------------------------------------------------------------+ 
//|                                                                  |
//| Use mbtrading as your forex broker...                            |  
//| http://therumpledone.mbtrading.com/fx/demo.asp                   |  
//+------------------------------------------------------------------+ 

#property indicator_chart_window

extern bool Show_Heading = true;

 
 
extern string myName       ="RSI";
extern string Ind_Name_1 ="iRSI";

//extern double iParm1 = 0;
//extern double iParm2 = 0;

extern double iParm3 = 2;
extern double iParm4 = 0 ;
extern double iParm5 = 0;
extern double iParm6 = 0;
extern double iParm7 = 0;
extern double iParm8 = 0;

extern bool Corner_of_Chart_RIGHT_TOP = true;

extern int myWindow = 0; 
extern int Shift_UP_DN = 200; 
extern int Adjust_Side_to_side  = 20; // 20

extern color BarLabel_color = LightBlue;
extern color CommentLabel_color = LightBlue;


extern bool Use.Levels = false ;
extern color colorUp =  Lime ;
//extern color colorEq =  Yellow ;
extern color colorDn =  Red ;

//extern double Level5 =  95 ;
extern double Level4 =  95 ;
extern double Level3 =  80 ;
extern double Level2 =  50 ;
extern double Level1 =  20 ;
extern double Level0 =  5 ;


extern color colorLevel5 =  Red ;
extern color colorLevel4 =  Crimson ;
extern color colorLevel3 =  Orange;
extern color colorLevel2 =  YellowGreen  ;
extern color colorLevel1 =  Aqua ;
extern color colorLevel0 =  Navy;




string ObjHead01,ObjHead02,ObjHead03,ObjHead04,ObjHead05,ObjHead06,ObjHead07,ObjHead08,ObjHead09,ObjHead10,ObjHead11;  

string Obj0001,Obj0002,Obj0003,Obj0004,Obj0005,Obj0006,Obj0007,Obj0008,Obj0009,Obj0010,Obj0011;  

int    MAMode;
string strMAType, LabelTime ;

string symbol, tChartPeriod,  tShortName ;  
int    digits, period  ; 
 

   string CCI_ObjHead01 ="M1 " ;
   string CCI_ObjHead02 ="M5  " ;     
   string CCI_ObjHead03 ="M15 " ;
   string CCI_ObjHead04 =" M30 " ;
   string CCI_ObjHead05 ="H1  " ;     
   string CCI_ObjHead06 ="H4  " ;
   string CCI_ObjHead07 ="D1  " ;
   string CCI_ObjHead08 ="W1  " ;
   string CCI_ObjHead09 ="MN1" ;   
   
string ArrowHeadUp =  "Ù" ; // 217 up arrow head
string ArrowHeadDn =  "Ú" ; // 218 up arrow head

string Arrow12 = "ñ"; // 12 oclock
string Arrow2  = "ö";  // 2 oclock
string Arrow3  = "ð";  // 3 oclock
string Arrow5  = "ø";  // 5 oclock
string Arrow6  = "ò";  // 6 oclock

string ArrowCCI ;

double cVal = 0, pVal = 0;
 
//+------------------------------------------------------------------+

int init()
  {
  

   period       = Period() ;   
   tChartPeriod = TimeFrameToString(period) ;
   symbol       = Symbol() ;
   LabelTime    = symbol + tChartPeriod  ;  
 
   ObjHead01 = iParm3+iParm4+Ind_Name_1+"ColHead01" ; 
   ObjHead02 = iParm3+iParm4+Ind_Name_1+"ColHead02" ; 
   ObjHead03 = iParm3+iParm4+Ind_Name_1+"ColHead03" ; 
   ObjHead04 = iParm3+iParm4+Ind_Name_1+"ColHead04" ; 
   ObjHead05 = iParm3+iParm4+Ind_Name_1+"ColHead05" ; 
   ObjHead06 = iParm3+iParm4+Ind_Name_1+"ColHead06" ; 
   ObjHead07 = iParm3+iParm4+Ind_Name_1+"ColHead07" ; 
   ObjHead08 = iParm3+iParm4+Ind_Name_1+"ColHead08" ; 
   ObjHead09 = iParm3+iParm4+Ind_Name_1+"ColHead09" ; 
         
   Obj0002 = iParm3+iParm4+Ind_Name_1+"SignalM1t" ; 
   Obj0003 = iParm3+iParm4+Ind_Name_1+"SignalM1" ;  
   Obj0004 = iParm3+iParm4+Ind_Name_1+"SignalM5" ;  
   Obj0005 = iParm3+iParm4+Ind_Name_1+"SignalM15" ;    
   Obj0006 = iParm3+iParm4+Ind_Name_1+"SignalM30" ;    
   Obj0007 = iParm3+iParm4+Ind_Name_1+"SignalM60" ;     
   Obj0008 = iParm3+iParm4+Ind_Name_1+"SignalM240" ;   
   Obj0009 = iParm3+iParm4+Ind_Name_1+"SignalM1440" ;   
   Obj0010 = iParm3+iParm4+Ind_Name_1+"SignalW1" ;  
   Obj0011 = iParm3+iParm4+Ind_Name_1+"SignalMN1" ;   
   
   return(0);
  }


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

int start()
  {    

        
    if (Corner_of_Chart_RIGHT_TOP == true)
    { int Col01x = 170+Adjust_Side_to_side ;                 
      int Col01y = 28+Shift_UP_DN ;
    }
    if (Corner_of_Chart_RIGHT_TOP == false)
   { Col01x = 159+Adjust_Side_to_side ;       
     Col01y = 24+Shift_UP_DN ;
    } 
    
   int ColAdj = -20 ; 
   int Col02x = Col01x + ColAdj ;   
   int Col03x = Col01x + ColAdj*2 ; 
   int Col04x = Col01x + ColAdj*3 ; 
   int Col05x = Col01x + ColAdj*4 ; 
   int Col06x = Col01x + ColAdj*5 ; 
   int Col07x = Col01x + ColAdj*6 ;    
   int Col08x = Col01x + ColAdj*7 ; 
   int Col09x = Col01x + ColAdj*8 ;     
   
   if ( Show_Heading) {        
   ObjectCreate(ObjHead01, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(ObjHead01,CCI_ObjHead01 , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(ObjHead01, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(ObjHead01, OBJPROP_XDISTANCE, Col01x);
   ObjectSet(ObjHead01, OBJPROP_YDISTANCE, Col01y); 

   ObjectCreate(ObjHead02, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(ObjHead02,CCI_ObjHead02 , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(ObjHead02, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(ObjHead02, OBJPROP_XDISTANCE, Col02x);
   ObjectSet(ObjHead02, OBJPROP_YDISTANCE, Col01y);   
       
   ObjectCreate(ObjHead03, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(ObjHead03,CCI_ObjHead03 , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(ObjHead03, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(ObjHead03, OBJPROP_XDISTANCE, Col03x);
   ObjectSet(ObjHead03, OBJPROP_YDISTANCE, Col01y); 
 
   ObjectCreate(ObjHead04, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(ObjHead04,CCI_ObjHead04 , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(ObjHead04, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(ObjHead04, OBJPROP_XDISTANCE, Col04x);
   ObjectSet(ObjHead04, OBJPROP_YDISTANCE, Col01y); 
   
   ObjectCreate(ObjHead05, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(ObjHead05,CCI_ObjHead05 , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(ObjHead05, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(ObjHead05, OBJPROP_XDISTANCE, Col05x);
   ObjectSet(ObjHead05, OBJPROP_YDISTANCE, Col01y); 
            
   ObjectCreate(ObjHead06, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(ObjHead06,CCI_ObjHead06 , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(ObjHead06, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(ObjHead06, OBJPROP_XDISTANCE, Col06x);
   ObjectSet(ObjHead06, OBJPROP_YDISTANCE, Col01y); 

   ObjectCreate(ObjHead07, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(ObjHead07,CCI_ObjHead07 , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(ObjHead07, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(ObjHead07, OBJPROP_XDISTANCE, Col07x);
   ObjectSet(ObjHead07, OBJPROP_YDISTANCE, Col01y); 
         
   ObjectCreate(ObjHead08, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(ObjHead08,CCI_ObjHead08 , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(ObjHead08, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(ObjHead08, OBJPROP_XDISTANCE, Col08x);
   ObjectSet(ObjHead08, OBJPROP_YDISTANCE, Col01y); 

   ObjectCreate(ObjHead09, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(ObjHead09,CCI_ObjHead09 , 7, "Tahoma Narrow", BarLabel_color);
   ObjectSet(ObjHead09, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(ObjHead09, OBJPROP_XDISTANCE, Col09x);
   ObjectSet(ObjHead09, OBJPROP_YDISTANCE, Col01y); 
       
} // Show_Heading

 //*******************   change for  your indicator ********************
 
    
    string M1_CCI= "-",M5_CCI= "-", M15_CCI= "-", M30_CCI= "-", H1_CCI= "-", H4_CCI= "-", D1_CCI= "-",PRC1, W1_CCI= "-", MN1_CCI= "-";

    color  color_CCIm1,color_CCIm5,color_CCIm15,color_CCIm30,color_CCIH1,color_CCIH4,color_CCID1,color_CCIW1,color_CCIMN1;     
         

   //CCI Signals

string symbol = Symbol() ;

 color_CCIm1  = ColorCCI( symbol, PERIOD_M1  ) ;
 M1_CCI       = ArrowCCI ;
              
 color_CCIm5  = ColorCCI( symbol, PERIOD_M5  ) ;
 M5_CCI       = ArrowCCI ;
 
// Comment("M5 Pivot =", DoubleToStr(cPivot,Digits) ); 
 
 color_CCIm15 = ColorCCI( symbol, PERIOD_M15  ) ;
 M15_CCI       = ArrowCCI ; 

 
 color_CCIm30 = ColorCCI( symbol, PERIOD_M30  ) ;
 M30_CCI       = ArrowCCI ;
  
 color_CCIH1  = ColorCCI( symbol, PERIOD_H1  ) ;
 H1_CCI       = ArrowCCI ;
 
 color_CCIH4  = ColorCCI( symbol, PERIOD_H4  ) ;
 H4_CCI       = ArrowCCI ;

 color_CCID1  = ColorCCI( symbol, PERIOD_D1  ) ;
 D1_CCI       = ArrowCCI ;
 
 color_CCIW1  = ColorCCI( symbol, PERIOD_W1  ) ;
 W1_CCI       = ArrowCCI ;

 color_CCIMN1 = ColorCCI( symbol, PERIOD_MN1  ) ;
 MN1_CCI      = ArrowCCI ;
               
    
 //*******************          
    
    int Col00x = Col01x + 20 ;
    int Col00y = 50+Shift_UP_DN ;
    
    Col01y = Shift_UP_DN + 47 ;
    
   string sObj0002 = Ind_Name_1 + "(" + DoubleToStr( iParm3,0)  + ")" ;
   
           ObjectCreate(Obj0002, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0002,sObj0002, 7, "Tahoma Narrow",  BarLabel_color);  
   ObjectSet(Obj0002, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0002, OBJPROP_XDISTANCE, Col00x);
   ObjectSet(Obj0002, OBJPROP_YDISTANCE, Col00y);  // 50+Shift_UP_DN

      
           ObjectCreate(Obj0003, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0003, M1_CCI, 12, "WingDings",  color_CCIm1);
   ObjectSet(Obj0003, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0003, OBJPROP_XDISTANCE, Col01x);
   ObjectSet(Obj0003, OBJPROP_YDISTANCE, Col01y); 

          
           ObjectCreate(Obj0004, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0004, M5_CCI, 12, "WingDings",  color_CCIm5);
   ObjectSet(Obj0004, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0004, OBJPROP_XDISTANCE, Col02x);
   ObjectSet(Obj0004, OBJPROP_YDISTANCE, Col01y); 
      

   ObjectCreate(Obj0005, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0005, M15_CCI, 12, "WingDings",  color_CCIm15);
   ObjectSet(Obj0005, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0005, OBJPROP_XDISTANCE, Col03x);
   ObjectSet(Obj0005, OBJPROP_YDISTANCE, Col01y); 
      

   ObjectCreate(Obj0006, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0006, M30_CCI, 12, "WingDings",  color_CCIm30);
   ObjectSet(Obj0006, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0006, OBJPROP_XDISTANCE, Col04x);
   ObjectSet(Obj0006, OBJPROP_YDISTANCE, Col01y); 

    
           ObjectCreate(Obj0007, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0007, H1_CCI, 12, "WingDings",  color_CCIH1);
   ObjectSet(Obj0007, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0007, OBJPROP_XDISTANCE, Col05x);
   ObjectSet(Obj0007, OBJPROP_YDISTANCE, Col01y); 

          
           ObjectCreate(Obj0008, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0008, H4_CCI, 12, "WingDings",  color_CCIH4);
   ObjectSet(Obj0008, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0008, OBJPROP_XDISTANCE, Col06x);
   ObjectSet(Obj0008, OBJPROP_YDISTANCE, Col01y);

    
           ObjectCreate(Obj0009, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0009, D1_CCI, 12, "WingDings",  color_CCID1);
   ObjectSet(Obj0009, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0009, OBJPROP_XDISTANCE, Col07x);
   ObjectSet(Obj0009, OBJPROP_YDISTANCE, Col01y);
   
    
           ObjectCreate(Obj0010, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0010, W1_CCI, 12, "WingDings",  color_CCIW1);
   ObjectSet(Obj0010, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0010, OBJPROP_XDISTANCE, Col08x);
   ObjectSet(Obj0010, OBJPROP_YDISTANCE, Col01y);   
   
   
           ObjectCreate(Obj0011, OBJ_LABEL, myWindow, 0, 0);
   ObjectSetText(Obj0011, MN1_CCI, 12, "WingDings",  color_CCIMN1);
   ObjectSet(Obj0011, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP);
   ObjectSet(Obj0011, OBJPROP_XDISTANCE, Col09x);
   ObjectSet(Obj0011, OBJPROP_YDISTANCE, Col01y); 



     
   WindowRedraw() ;   
     
     
 //----
   return(0);
  }
  
//+------------------------------------------------------------------+


int deinit()
  {
//----

deleteObject(); 

//----
   return(0);
  }
  
void deleteObject()
  { 
//ObjectDelete(Obj0001);  
ObjectDelete(Obj0002); 
ObjectDelete(Obj0003); 
ObjectDelete(Obj0004); 
ObjectDelete(Obj0005); 
ObjectDelete(Obj0006); 
ObjectDelete(Obj0007); 
ObjectDelete(Obj0008); 
ObjectDelete(Obj0009); 
ObjectDelete(Obj0010); 
ObjectDelete(Obj0011); 

ObjectDelete(ObjHead01);  
ObjectDelete(ObjHead02); 
ObjectDelete(ObjHead03); 
ObjectDelete(ObjHead04); 
ObjectDelete(ObjHead05); 
ObjectDelete(ObjHead06); 
ObjectDelete(ObjHead07); 
ObjectDelete(ObjHead08); 
ObjectDelete(ObjHead09); 
 
  }
//+------------------------------------------------------------------+

color ColorCCI( string myPair, int myPeriod )  
{


color MA_color;

    
    
DoWork(myPair,myPeriod) ;    
    
if( cVal >= pVal ) { ArrowCCI = ArrowHeadUp ; MA_color = colorUp; } else { ArrowCCI = ArrowHeadDn ; MA_color = colorDn ; }
    
if(Use.Levels) { MA_color = MeterColor( cVal ) ; }

   
    
return( MA_color ) ;   
                                    
} //  

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

color MeterColor( double CCImeter )
{
//if( CCImeter > Level5 ) { return( colorLevel5 ); } 
if( CCImeter > Level4 ) { return( colorLevel5 ); } 
if( CCImeter > Level3 ) { return( colorLevel4 ); } 
if( CCImeter > Level2 ) { return( colorLevel3 ); } 
if( CCImeter > Level1 ) { return( colorLevel2 ); } 
if( CCImeter > Level0 ) { return( colorLevel1 ); } 
return( colorLevel0 );  
}

//+------------------------------------------------------------------+
 
string TimeFrameToString(int tf)
{
   string tfs;
   switch(tf) {
      case PERIOD_M1:  tfs="M1"  ; break;
      case PERIOD_M5:  tfs="M5"  ; break;
      case PERIOD_M15: tfs="M15" ; break;
      case PERIOD_M30: tfs="M30" ; break;
      case PERIOD_H1:  tfs="H1"  ; break;
      case PERIOD_H4:  tfs="H4"  ; break;
      case PERIOD_D1:  tfs="D1"  ; break;
      case PERIOD_W1:  tfs="W1"  ; break;
      case PERIOD_MN1: tfs="MN";
   }
   return(tfs);
}

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

void DoWork( string myPair, int myPeriod )  
{

double cX, pX ;

while(true)
{

if ( Ind_Name_1=="tMid"  ) { cVal = (iHigh(myPair, myPeriod, 0 ) + iLow(myPair, myPeriod, 0 ) ) * 0.5  ; 
                             pVal = (iHigh(myPair, myPeriod, 1 ) + iLow(myPair, myPeriod, 1 ) ) * 0.5  ;  break;}

if ( Ind_Name_1=="tPrMid"  ) { cVal = (iHigh(myPair, myPeriod, 1 ) + iLow(myPair, myPeriod, 1 ) ) * 0.5  ; 
                             pVal = (iHigh(myPair, myPeriod, 2 ) + iLow(myPair, myPeriod, 2 ) ) * 0.5  ;  break;}


if ( Ind_Name_1=="iOpen"  ) { cVal = iOpen(myPair, myPeriod, iParm3 ); pVal = iOpen(myPair, myPeriod, iParm3+1 ); break;}

if ( Ind_Name_1=="iClose"  ) { cVal = iClose(myPair, myPeriod, iParm3 ); pVal = iClose(myPair, myPeriod, iParm3+1 ); break;}

if ( Ind_Name_1=="iHigh"  ) { cVal = iHigh(myPair, myPeriod, iParm3 ); pVal = iHigh(myPair, myPeriod, iParm3+1 ); break;}

if ( Ind_Name_1=="iLow"  )  { cVal = iLow(myPair, myPeriod, iParm3 );  pVal = iLow(myPair, myPeriod, iParm3+1 ); break;}

if ( Ind_Name_1=="iHighest"  ) { cX = iHighest(myPair, myPeriod, iParm3, iParm4, iParm5 );    cVal = iHigh(myPair, myPeriod, cX ) ;
                                 pX = iHighest(myPair, myPeriod, iParm3, iParm4, iParm5+1 );  pVal = iHigh(myPair, myPeriod, pX );  break;}
                                 
if ( Ind_Name_1=="iLowest"  )  { cX = iLowest(myPair, myPeriod, iParm3, iParm4, iParm5);    cVal = iLow(myPair, myPeriod, cX ) ;
                                 pX = iLowest(myPair, myPeriod, iParm3, iParm4, iParm5+1 ); pVal = iLow(myPair, myPeriod, pX ) ; break;}



if ( Ind_Name_1=="iAC"  ) { cVal = iAC(myPair, myPeriod, 0 ); pVal = iAC(myPair, myPeriod, 1 ); break;}
                            
if ( Ind_Name_1=="iAD"  ) { cVal = iAD(myPair, myPeriod, 0 ); pVal = iAD(myPair, myPeriod, 1 ); break;}
 
if ( Ind_Name_1=="iADX" ) { cVal = iADX(myPair,myPeriod, iParm3, iParm4, iParm5, 0 ) ;  
                            pVal = iADX(myPair,myPeriod, iParm3, iParm4, iParm5, 1 ) ; break;}

if ( Ind_Name_1=="iATR" ) { cVal = iATR(myPair,myPeriod, iParm3,  0 ) ;  
                            pVal = iATR(myPair,myPeriod, iParm3,  1 ) ; break;} 
                            
if ( Ind_Name_1=="iAO" )  { cVal = iAO(myPair,myPeriod, 0 ) ;  
                            pVal = iAO(myPair,myPeriod,  1 ) ; break;} 
                            
if ( Ind_Name_1=="iBearsPower" ) { cVal = iBearsPower(myPair,myPeriod, iParm3, iParm4,  0 ) ;  
                                   pVal = iBearsPower(myPair,myPeriod, iParm3, iParm4,  1 ) ; break;}  

if ( Ind_Name_1=="iBullsPower" ) { cVal = iBullsPower(myPair,myPeriod, iParm3, iParm4,  0 ) ;  
                                   pVal = iBullsPower(myPair,myPeriod, iParm3, iParm4,  1 ) ; break;}  

if ( Ind_Name_1=="iCCI" ) { cVal = iCCI(myPair,myPeriod, iParm3, iParm4,  0 ) ;  
                            pVal = iCCI(myPair,myPeriod, iParm3, iParm4,  1 ) ; break;}  

if ( Ind_Name_1=="iDeMarker" ) { cVal = iDeMarker(myPair,myPeriod, iParm3,  0 ) ;  
                                 pVal = iDeMarker(myPair,myPeriod, iParm3,  1 ) ; break;}  

if ( Ind_Name_1=="iRSI" ) { cVal = iRSI(myPair,myPeriod, iParm3, iParm4,  0 ) ;  
                            pVal = iRSI(myPair,myPeriod, iParm3, iParm4,  1 ) ; break;}  

if ( Ind_Name_1=="iForce" ) { cVal = iForce(myPair,myPeriod, iParm3, iParm4, iParm5, 0 ) ;  
                              pVal = iForce(myPair,myPeriod, iParm3, iParm4, iParm5, 1 ) ; break;}

if ( Ind_Name_1=="iFractals" ) { cVal = iFractals(myPair,myPeriod, iParm3,  0 ) ;  
                                 pVal = iFractals(myPair,myPeriod, iParm3,  1 ) ; break;} 

if ( Ind_Name_1=="iBWMFI" )  { cVal = iBWMFI(myPair,myPeriod, 0 ) ;  
                               pVal = iBWMFI(myPair,myPeriod,  1 ) ; break;} 
                               
if ( Ind_Name_1=="iMomentum" ) { cVal = iMomentum(myPair,myPeriod, iParm3, iParm4,  0 ) ;  
                                 pVal = iMomentum(myPair,myPeriod, iParm3, iParm4,  1 ) ; break;}                                 
                               

if ( Ind_Name_1=="iMFI" ) { cVal = iMFI(myPair,myPeriod, iParm3,  0 ) ;  
                            pVal = iMFI(myPair,myPeriod, iParm3,  1 ) ; break;}                                
                               
if ( Ind_Name_1=="iMA" ) { cVal = iMA(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, 0 ) ;  
                           pVal = iMA(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, 1 ) ; break;}
                              
                              
if ( Ind_Name_1=="iOsMA" ) { cVal = iOsMA(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, 0 ) ;  
                             pVal = iOsMA(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, 1 ) ; break;}   
                             
                             
if ( Ind_Name_1=="iMACD" ) { cVal = iMACD(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, iParm7, 0 ) ;  
                             pVal = iMACD(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, iParm7, 1 ) ; break;}                               
                                                             

if ( Ind_Name_1=="iOBV" ) { cVal = iOBV(myPair,myPeriod, iParm3,  0 ) ;  
                            pVal = iOBV(myPair,myPeriod, iParm3,  1 ) ; break;} 


if ( Ind_Name_1=="iSAR" ) { cVal = iSAR(myPair,myPeriod, iParm3, iParm4,  0 ) ;  
                            pVal = iSAR(myPair,myPeriod, iParm3, iParm4,  1 ) ; break;} 

if ( Ind_Name_1=="iRVI" ) { cVal = iRVI(myPair,myPeriod, iParm3, iParm4,  0 ) ;  
                            pVal = iRVI(myPair,myPeriod, iParm3, iParm4,  1 ) ; break;} 

if ( Ind_Name_1=="iStdDev" ) { cVal = iStdDev(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, 0 ) ;  
                               pVal = iStdDev(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, 1 ) ; break;} 
                                                              

if ( Ind_Name_1=="iStochastic" ) { cVal = iStochastic(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, iParm7, iParm8, 0 ) ;  
                                   pVal = iStochastic(myPair,myPeriod, iParm3, iParm4, iParm5, iParm6, iParm7, iParm8, 1 ) ; break;}                               
                                                             
if ( Ind_Name_1=="iWPR" ) { cVal = iWPR(myPair,myPeriod, iParm3,  0 ) ;  
                            pVal = iWPR(myPair,myPeriod, iParm3,  1 ) ; break;} 
                                
//IndHead = "ERROR! NO SUCH INDICATOR"; cVal = -999.99;  break;
}                                
                                                                                                                      


}