#include <stdlib.mqh>
extern int StartCandle= 0;
extern int EndCandle= 1;
int i = 0;
int Precision = 8;
string space5617;
string sval;
int eval=0;
int empty=2147483647;
int start()
{
string candles;
int numbars = EndCandle - StartCandle;
if (numbars < 0 )
{
Comment("Error: EndCandle must be greater than or equal to StartCandle");
return(0);
}
for( i = EndCandle; i>=StartCandle; i-- )  candles = StringConcatenate( candles, " ", i);
string header2902="\nCIA Wizard: Currency Strength Meter\nCandles { " + candles + " }\n";
string bigcomment4775;
///// Mode: 0///////////////////////
double val0_2955[1];
ArrayResize(val0_2955, numbars+1);
///// Mode: 1///////////////////////
double val1_9291[1];
ArrayResize(val1_9291, numbars+1);
///// Mode: 2///////////////////////
double val2_3564[1];
ArrayResize(val2_3564, numbars+1);
///// Mode: 3///////////////////////
double val3_3049[1];
ArrayResize(val3_3049, numbars+1);
///// Mode: 4///////////////////////
double val4_3524[1];
ArrayResize(val4_3524, numbars+1);
///// Mode: 5///////////////////////
double val5_6650[1];
ArrayResize(val5_6650, numbars+1);
///// Mode: 6///////////////////////
double val6_6172[1];
ArrayResize(val6_6172, numbars+1);
///// Mode: 7///////////////////////
double val7_8969[1];
ArrayResize(val7_8969, numbars+1);

///// Mode: 0///////////////////////
string cmt4126= "\nmode"+0+": ";
for( i = EndCandle; i>=StartCandle; i-- )
{
val0_2955[i] = iCustom(NULL, 0, "Currency Strength Meter", 0, i );
space5617=" ";
if( val0_2955[i] >= 0)
space5617="  ";
sval = DoubleToStr(val0_2955[i], Precision);
eval = val0_2955[i];
if( eval == empty ) sval = "EMPTY     ";
cmt4126 = StringConcatenate(cmt4126 ,space5617, sval, "  " );
}
bigcomment4775 =  StringConcatenate(bigcomment4775,cmt4126);

///// Mode: 1///////////////////////
string cmt547= "\nmode"+1+": ";
for( i = EndCandle; i>=StartCandle; i-- )
{
val1_9291[i] = iCustom(NULL, 0, "Currency Strength Meter", 1, i );
space5617=" ";
if( val1_9291[i] >= 0)
space5617="  ";
sval = DoubleToStr(val1_9291[i], Precision);
eval = val1_9291[i];
if( eval == empty ) sval = "EMPTY     ";
cmt547 = StringConcatenate(cmt547 ,space5617, sval, "  " );
}
bigcomment4775 =  StringConcatenate(bigcomment4775,cmt547);

///// Mode: 2///////////////////////
string cmt7699= "\nmode"+2+": ";
for( i = EndCandle; i>=StartCandle; i-- )
{
val2_3564[i] = iCustom(NULL, 0, "Currency Strength Meter", 2, i );
space5617=" ";
if( val2_3564[i] >= 0)
space5617="  ";
sval = DoubleToStr(val2_3564[i], Precision);
eval = val2_3564[i];
if( eval == empty ) sval = "EMPTY     ";
cmt7699 = StringConcatenate(cmt7699 ,space5617, sval, "  " );
}
bigcomment4775 =  StringConcatenate(bigcomment4775,cmt7699);

///// Mode: 3///////////////////////
string cmt4127= "\nmode"+3+": ";
for( i = EndCandle; i>=StartCandle; i-- )
{
val3_3049[i] = iCustom(NULL, 0, "Currency Strength Meter", 3, i );
space5617=" ";
if( val3_3049[i] >= 0)
space5617="  ";
sval = DoubleToStr(val3_3049[i], Precision);
eval = val3_3049[i];
if( eval == empty ) sval = "EMPTY     ";
cmt4127 = StringConcatenate(cmt4127 ,space5617, sval, "  " );
}
bigcomment4775 =  StringConcatenate(bigcomment4775,cmt4127);

///// Mode: 4///////////////////////
string cmt5488= "\nmode"+4+": ";
for( i = EndCandle; i>=StartCandle; i-- )
{
val4_3524[i] = iCustom(NULL, 0, "Currency Strength Meter", 4, i );
space5617=" ";
if( val4_3524[i] >= 0)
space5617="  ";
sval = DoubleToStr(val4_3524[i], Precision);
eval = val4_3524[i];
if( eval == empty ) sval = "EMPTY     ";
cmt5488 = StringConcatenate(cmt5488 ,space5617, sval, "  " );
}
bigcomment4775 =  StringConcatenate(bigcomment4775,cmt5488);

///// Mode: 5///////////////////////
string cmt7488= "\nmode"+5+": ";
for( i = EndCandle; i>=StartCandle; i-- )
{
val5_6650[i] = iCustom(NULL, 0, "Currency Strength Meter", 5, i );
space5617=" ";
if( val5_6650[i] >= 0)
space5617="  ";
sval = DoubleToStr(val5_6650[i], Precision);
eval = val5_6650[i];
if( eval == empty ) sval = "EMPTY     ";
cmt7488 = StringConcatenate(cmt7488 ,space5617, sval, "  " );
}
bigcomment4775 =  StringConcatenate(bigcomment4775,cmt7488);

///// Mode: 6///////////////////////
string cmt1167= "\nmode"+6+": ";
for( i = EndCandle; i>=StartCandle; i-- )
{
val6_6172[i] = iCustom(NULL, 0, "Currency Strength Meter", 6, i );
space5617=" ";
if( val6_6172[i] >= 0)
space5617="  ";
sval = DoubleToStr(val6_6172[i], Precision);
eval = val6_6172[i];
if( eval == empty ) sval = "EMPTY     ";
cmt1167 = StringConcatenate(cmt1167 ,space5617, sval, "  " );
}
bigcomment4775 =  StringConcatenate(bigcomment4775,cmt1167);

///// Mode: 7///////////////////////
string cmt2386= "\nmode"+7+": ";
for( i = EndCandle; i>=StartCandle; i-- )
{
val7_8969[i] = iCustom(NULL, 0, "Currency Strength Meter", 7, i );
space5617=" ";
if( val7_8969[i] >= 0)
space5617="  ";
sval = DoubleToStr(val7_8969[i], Precision);
eval = val7_8969[i];
if( eval == empty ) sval = "EMPTY     ";
cmt2386 = StringConcatenate(cmt2386 ,space5617, sval, "  " );
}
bigcomment4775 =  StringConcatenate(bigcomment4775,cmt2386);
Comment( header2902,bigcomment4775 );
return(0);
}


