#property indicator_chart_window
extern string tf = "TF_of_MA_ATR";
extern int LookBack = 14;

extern string pus1 = "";
extern string DS = "Sub symbol";
extern string SS = "";

extern string pus2 = "";
extern string HM = "HeatMap";
extern bool HeatMapM1 = TRUE;
extern bool HeatMapM5 = FALSE;
extern bool HeatMapM15 = FALSE;
extern bool HeatMapM30 = FALSE;
extern bool HeatMapH1 = FALSE;
extern bool HeatMapH4 = FALSE;
extern bool HeatMapD1 = FALSE;

extern string pus3 = "";
extern string OT = "Overall currency strengths";
extern int TF1 = 5;
extern int TF2 = 15;
extern int TF3 = 0;

extern string pus4 = "";
extern string Si = "Size";
extern int FontSize = 8;

extern string pus5 = "";
extern string co = "Commodities";
extern bool show_commodities = false;
extern string _gold = "GOLD";
extern string _silver = "SILVER";

extern string pus6 = "";
extern string st = "Stocks";
extern bool show_stocks = false;
extern string stock1 = "#AIG";
extern string stock2 = "#AXP";
extern string stock3 = "#QQQ";
extern string stock4 = "#MSFT";
extern string stock5 = "#MCD";
extern string stock6 = "#KO";
extern string stock7 = "#INTC";
extern string stock8 = "#GM";
extern string stock9 = "#DIS";





string Alarms;
bool EnableAlarms = FALSE;
bool EnableEmail = FALSE;
int AlarmsDelay = 180;
string AlertsStartTime = "00:00";
string AlertsEndTime = "23:59";
int AUDUpperLevel = 100;
int AUDLowerLevel = -100;
int CHFUpperLevel = 100;
int CHFLowerLevel = -100;
int CADUpperLevel = 100;
int CADLowerLevel = -100;
int EURUpperLevel = 100;
int EURLowerLevel = -100;
int GBPUpperLevel = 100;
int GBPLowerLevel = -100;
int JPYUpperLevel = 100;
int JPYLowerLevel = -100;
int NZDUpperLevel = 100;
int NZDLowerLevel = -100;
int USDUpperLevel = 100;
int USDLowerLevel = -100;

int gi_316 = 0;
int gi_320 = MODE_SMMA;
int gi_324 = PRICE_MEDIAN;
double gd_328;
double gd_336;
double gd_344;
double gd_352;
double gd_360;
double gd_368;
double gd_376;
double gd_384;
double gd_392;
double gd_400;
double gd_408;
double gd_416;
double gd_424;
double gd_432;
double gd_440;
double gd_448;
double gd_456;
double gd_464;
double gd_472;
double gd_480;
double gd_488;
double gd_496;
double gd_504;
double gd_512;
double gd_520;
double gd_528;
double gd_536;
double gd_544;
double gd_552;
double gd_560;
double gd_568;
double gd_576;
double gd_584;
double gd_592;
double gd_600;
double gd_608;
double gd_616;
double gd_624;
double gd_632;
double gd_640;
double gd_648;
double gd_656;
double gd_664;
double gd_672;
double gd_680;
double gd_688;
double gd_696;
double gd_704;
double gd_712;
double gd_720;
double gd_728;
double gd_736;
double gd_744;
double gd_752;
double gd_760;
double gd_768;
double gd_776;
double gd_784;
double gd_792;
double gd_800;
double gd_808;
double gd_816;
double gd_824;
double gd_832;
double gd_840;
double gd_848;
double gd_856;
double gd_864;
double gd_872;
double gd_880;
double gd_888;
double gd_896;
double gd_904;
double gd_912;
double gd_920;
double gd_928;
double gd_936;
double gd_944;
double gd_952;
double gd_960;
double gd_968;
double gd_976;
double gd_984;
double gd_992;
double gd_1000;
double gd_1008;
double gd_1016;
double gd_1024;
double gd_1032;
double gd_1040;
double gd_1048;
double gd_1056;
double gd_1064;
double gd_1072;
double gd_1080;
double gd_1088;
double gd_1096;
double gd_1104;
double gd_1112;
double gd_1120;
double gd_1128;
double gd_1136;
double gd_1144;
double gd_1152;
double gd_1160;
double gd_1168;
double gd_1176;
double gd_1184;
double gd_1192;
double gd_1200;
double gd_1208;
double gd_1216;
double gd_1224;
double gd_1232;
double gd_1240;
double gd_1248;
double gd_1256;
double gd_1264;
double gd_1272;
double gd_1280;
double gd_1288;
double gd_1296;
double gd_1304;
double gd_1312;
double gd_1320;
double gd_1328;
double gd_1336;
double gd_1344;
double gd_1352;
double gd_1360;
double gd_1368;
double gd_1376;
double gd_1384;
double gd_1392;
double gd_1400;
double gd_1408;
double gd_1416;
double gd_1424;
double gd_1432;
double gd_1440;
double gd_1448;
double gd_1456;
double gd_1464;
double gd_1472;
double gd_1480;
double gd_1488;
double gd_1496;
double gd_1504;
double gd_1512;
double gd_1520;
double gd_1528;
double gd_1536;
double gd_1544;
double gd_1552;
double gd_1560;
double gd_1568;
double gd_1576;
double gd_1584;
double gd_1592;
double gd_1600;
double gd_1608;
double gd_1616;
double gd_1624;
double gd_1632;
double gd_1640;
double gd_1648;
double gd_1656;
double gd_1664;
double gd_1672;
double gd_1680;
double gd_1688;
double gd_1696;
double gd_1704;
double gd_1712;
double gd_1720;
double gd_1728;
double gd_1736;
double gd_1744;
double gd_1752;
double gd_1760;
double gd_1768;
double gd_1776;
double gd_1784;
double gd_1792;
double gd_1800;
double gd_1808;
double gd_1816;
double gd_1824;
double gd_1832;
double gd_1840;
double gd_1848;
double gd_1856;
double gd_1864;
double gd_1872;
double gd_1880;
double gd_1888;
double gd_1896;
double gd_1904;
double gd_1912;
double gd_1920;
double gd_1928;
double gd_1936;
double gd_1944;
double gd_1952;
double gd_1960;
double gd_1968;
double gd_1976;
double gd_1984;
double gd_1992;
double gd_2000;
double gd_2008;
double gd_2016;
double gd_2024;
double gd_2032;
double gd_2040;
double gd_2048;
double gd_2056;
double gd_2064;
double gd_2072;
double gd_2080;
double gd_2088;
double gd_2096;
double gd_2104;
double gd_2112;
double gd_2120;
double gd_2128;
double gd_2136;
double gd_2144;
double gd_2152;
double gd_2160;
double gd_2168;
double gd_2176;
double gd_2184;
double gd_2192;
double gd_2200;
double gd_2208;
double gd_2216;
double gd_2224;
double gd_2232;
double gd_2240;
double gd_2248;
double gd_2256;
double gd_2264;
double gd_2272;
double gd_2280;
double gd_2288;
double gd_2296;
double gd_2304;
double gd_2312;
double gd_2320;
double gd_2328;
double gd_2336;
double gd_2344;
double gd_2352;
double gd_2360;
double gd_2368;
double gd_2376;
double gd_2384;
double gd_2392;
double gd_2400;
double gd_2408;
double gd_2416;
double gd_2424;
double gd_2432;
double gd_2440;
double gd_2448;
double gd_2456;
double gd_2464;
double gd_2472;
double gd_2480;
double gd_2488;
double gd_2496;
double gd_2504;
double gd_2512;
double gd_2520;
double gd_2528;
double gd_2536;
double gd_2544;
double gd_2552;
double gd_2560;
double gd_2568;
double gd_2576;
double gd_2584;
double gd_2592;
double gd_2600;
double gd_2608;
double gd_2616;
double gd_2624;
double gd_2632;
double gd_2640;
double gd_2648;
double gd_2656;
double gd_2664;
double gd_2672;
double gd_2680;
double gd_2688;
double gd_2696;
double gd_2704;
double gd_2712;
double gd_2720;
double gd_2728;
double gd_2736;
double gd_2744;
double gd_2752;
double gd_2760;
double gd_2768;
double gd_2776;
double gd_2784;
double gd_2792;
double gd_2800;
double gd_2808;
double gd_2816;
double gd_2824;
double gd_2832;
double gd_2840;
double gd_2848;
double gd_2856;
double gd_2864;
double gd_2872;
double gd_2880;
double gd_2888;
double gd_2896;
double gd_2904;
double gd_2912;
double gd_2920;
double gd_2928;
double gd_2936;
double gd_2944;
double gd_2952;
double gd_2960;
double gd_2968;
double gd_2976;
double gd_2984;
double gd_2992;
double gd_3000;
double gd_3008;
double gd_3016;
double gd_3024;
double gd_3032;
double gd_3040;
double gd_3048;
double gd_3056;
double gd_3064;
double gd_3072;
double gd_3080;
double gd_3088;
double gd_3096;
double gd_3104;
double gd_3112;
double gd_3120;
double gd_3128;
double gd_3136;
double gd_3144;
double gd_3152;
double gd_3160;
double gd_3168;
double gd_3176;
double gd_3184;
double gd_3192;
double gd_3200;
double gd_3208;
double gd_3216;
double gd_3224;
double gd_3232;
double gd_3240;
double gd_3248;
double gd_3256;
double gd_3264;
int gi_3272 = 0;
int gi_3276 = 0;
int gi_3280 = 0;
double gd_3284;
double gd_3292;
double gd_3300;
double gd_3308;
double gd_3316;
int gi_3324;
bool gi_3328;
string gs_3332 = "!! Do NOT! Change Below This Line !!";
string gs_3340 = "[5][38730][67][][[3]7[][45][r32][5[6][34]67]54]6[856][83061]";
string gs_3348 = "[23]6[54]8[6]9[6]79[67][]3[32]6[]5[56]8]57[34]6[43]67[54]74]";
string gs_3356 = "[8]658]7[9[67][]2[3[]765[]9[][3]5[[8]5[7][8]8]9[][][5[][685]";
string gs_3364 = "[12]5[5]78]973[23]6[54]8[6]9[6]79[67][]3[32]6[]5[56]8]57[34]";

int init() {
   gi_3324 = 0;
   initGraph();
   return (0);
}

int deinit() {
   ObjectsDeleteAll(0, OBJ_LABEL);
   return (0);
}

int start() {
   int li_0 = IndicatorCounted();
   gi_3328 = FALSE;
   CalculateStrength();
   objectBlank();
   CreateTitle();
   paint("AUD", gd_328);
   paint("CHF", gd_336);
   paint("CAD", gd_344);
   paint("EUR", gd_352);
   paint("GBP", gd_360);
   paint("JPY", gd_368);
   paint("NZD", gd_376);
   paint("USD", gd_384);
   
   if(show_commodities)
   {
   paint("GOLD", gd_392);
   paint("SILVER", gd_400);
   }
   
   
   if(show_stocks)
   {
   paint(stock1, gd_416);
   paint(stock2, gd_408);
   paint(stock3, gd_424);
   paint(stock4, gd_432);
   paint(stock5, gd_440);
   paint(stock6, gd_448);
   paint(stock7, gd_456);
   paint(stock8, gd_464);
   paint(stock9, gd_472);
   }
   
   paintAvg("M1_eur", gd_880);
   paintAvg("M5_eur", gd_888);
   paintAvg("M15_eur", gd_896);
   paintAvg("M30_eur", gd_904);
   paintAvg("H1_eur", gd_912);
   paintAvg("H4_eur", gd_920);
   paintAvg("D1_eur", gd_928);
   paintAvg("M1_gbp", gd_1272);
   paintAvg("M5_gbp", gd_1280);
   paintAvg("M15_gbp", gd_1288);
   paintAvg("M30_gbp", gd_1296);
   paintAvg("H1_gbp", gd_1304);
   paintAvg("H4_gbp", gd_1312);
   paintAvg("D1_gbp", gd_1320);
   paintAvg("M1_chf", gd_1608);
   paintAvg("M5_chf", gd_1616);
   paintAvg("M15_chf", gd_1624);
   paintAvg("M30_chf", gd_1632);
   paintAvg("H1_chf", gd_1640);
   paintAvg("H4_chf", gd_1648);
   paintAvg("D1_chf", gd_1656);
   paintAvg("M1_aud", gd_1888);
   paintAvg("M5_aud", gd_1896);
   paintAvg("M15_aud", gd_1904);
   paintAvg("M30_aud", gd_1912);
   paintAvg("H1_aud", gd_1920);
   paintAvg("H4_aud", gd_1928);
   paintAvg("D1_aud", gd_1936);
   paintAvg("M1_nzd", gd_2112);
   paintAvg("M5_nzd", gd_2120);
   paintAvg("M15_nzd", gd_2128);
   paintAvg("M30_nzd", gd_2136);
   paintAvg("H1_nzd", gd_2144);
   paintAvg("H4_nzd", gd_2152);
   paintAvg("D1_nzd", gd_2160);
   paintAvg("M1_cad", gd_2280);
   paintAvg("M5_cad", gd_2288);
   paintAvg("M15_cad", gd_2296);
   paintAvg("M30_cad", gd_2304);
   paintAvg("H1_cad", gd_2312);
   paintAvg("H4_cad", gd_2320);
   paintAvg("D1_cad", gd_2328);
   paintAvg("M1_usd", gd_2392);
   paintAvg("M5_usd", gd_2400);
   paintAvg("M15_usd", gd_2408);
   paintAvg("M30_usd", gd_2416);
   paintAvg("H1_usd", gd_2424);
   paintAvg("H4_usd", gd_2432);
   paintAvg("D1_usd", gd_2440);
   paintAvg("M1_jpy", gd_2448);
   paintAvg("M5_jpy", gd_2456);
   paintAvg("M15_jpy", gd_2464);
   paintAvg("M30_jpy", gd_2472);
   paintAvg("H1_jpy", gd_2480);
   paintAvg("H4_jpy", gd_2488);
   paintAvg("D1_jpy", gd_2496);
   paintAvg("M1_gold", gd_2504);
   paintAvg("M5_gold", gd_2512);
   paintAvg("M15_gold", gd_2520);
   paintAvg("M30_gold", gd_2528);
   paintAvg("H1_gold", gd_2536);
   paintAvg("H4_gold", gd_2544);
   paintAvg("D1_gold", gd_2552);
   paintAvg("M1_silver", gd_2560);
   paintAvg("M5_silver", gd_2568);
   paintAvg("M15_silver", gd_2576);
   paintAvg("M30_silver", gd_2584);
   paintAvg("H1_silver", gd_2592);
   paintAvg("H4_silver", gd_2600);
   paintAvg("D1_silver", gd_2608);
   paintAvg("M1_#aig", gd_2616);
   paintAvg("M5_#aig", gd_2624);
   paintAvg("M15_#aig", gd_2632);
   paintAvg("M30_#aig", gd_2640);
   paintAvg("H1_#aig", gd_2648);
   paintAvg("H4_#aig", gd_2656);
   paintAvg("D1_#aig", gd_2664);
   paintAvg("M1_#axp", gd_2672);
   paintAvg("M5_#axp", gd_2680);
   paintAvg("M15_#axp", gd_2688);
   paintAvg("M30_#axp", gd_2696);
   paintAvg("H1_#axp", gd_2704);
   paintAvg("H4_#axp", gd_2712);
   paintAvg("D1_#axp", gd_2720);
   paintAvg("M1_#qqq", gd_2728);
   paintAvg("M5_#qqq", gd_2736);
   paintAvg("M15_#qqq", gd_2744);
   paintAvg("M30_#qqq", gd_2752);
   paintAvg("H1_#qqq", gd_2760);
   paintAvg("H4_#qqq", gd_2768);
   paintAvg("D1_#qqq", gd_2776);
   paintAvg("M1_#msft", gd_2784);
   paintAvg("M5_#msft", gd_2792);
   paintAvg("M15_#msft", gd_2800);
   paintAvg("M30_#msft", gd_2808);
   paintAvg("H1_#msft", gd_2816);
   paintAvg("H4_#msft", gd_2824);
   paintAvg("D1_#msft", gd_2832);
   paintAvg("M1_#mcd", gd_2840);
   paintAvg("M5_#mcd", gd_2848);
   paintAvg("M15_#mcd", gd_2856);
   paintAvg("M30_#mcd", gd_2864);
   paintAvg("H1_#mcd", gd_2872);
   paintAvg("H4_#mcd", gd_2880);
   paintAvg("D1_#mcd", gd_2888);
   paintAvg("M1_#ko", gd_2896);
   paintAvg("M5_#ko", gd_2904);
   paintAvg("M15_#ko", gd_2912);
   paintAvg("M30_#ko", gd_2920);
   paintAvg("H1_#ko", gd_2928);
   paintAvg("H4_#ko", gd_2936);
   paintAvg("D1_#ko", gd_2944);
   paintAvg("M1_#intc", gd_2952);
   paintAvg("M5_#intc", gd_2960);
   paintAvg("M15_#intc", gd_2968);
   paintAvg("M30_#intc", gd_2976);
   paintAvg("H1_#intc", gd_2984);
   paintAvg("H4_#intc", gd_2992);
   paintAvg("D1_#intc", gd_3000);
   paintAvg("M1_#gm", gd_3008);
   paintAvg("M5_#gm", gd_3016);
   paintAvg("M15_#gm", gd_3024);
   paintAvg("M30_#gm", gd_3032);
   paintAvg("H1_#gm", gd_3040);
   paintAvg("H4_#gm", gd_3048);
   paintAvg("D1_#gm", gd_3056);
   paintAvg("M1_#dis", gd_3064);
   paintAvg("M5_#dis", gd_3072);
   paintAvg("M15_#dis", gd_3080);
   paintAvg("M30_#dis", gd_3088);
   paintAvg("H1_#dis", gd_3096);
   paintAvg("H4_#dis", gd_3104);
   paintAvg("D1_#dis", gd_3112);
   paintTotAvg("eur", gd_3264);
   paintTotAvg("gbp", gd_3256);
   paintTotAvg("chf", gd_3248);
   paintTotAvg("aud", gd_3240);
   paintTotAvg("nzd", gd_3232);
   paintTotAvg("cad", gd_3224);
   paintTotAvg("usd", gd_3216);
   paintTotAvg("jpy", gd_3208);
   paintTotAvg("gold", gd_3200);
   paintTotAvg("silver", gd_3192);
   paintTotAvg("#aig", gd_3184);
   paintTotAvg("#axp", gd_3176);
   paintTotAvg("#qqq", gd_3168);
   paintTotAvg("#msft", gd_3160);
   paintTotAvg("#mcd", gd_3152);
   paintTotAvg("#ko", gd_3144);
   paintTotAvg("#intc", gd_3136);
   paintTotAvg("#gm", gd_3128);
   paintTotAvg("#dis", gd_3120);
   ObjectsRedraw();
   if (gi_3328) gi_3324 = TimeCurrent();
   return (0);
}

void CreateTitle() {
   ObjectCreate("Overalltitle", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Overalltitle", "OVERALL CURRENCY STRENGTHS    " + PeriodToStr(TF1) + "   " + PeriodToStr(TF2) + "   " + PeriodToStr(TF3) + "   (" + LookBack + ")", FontSize +
      2, "Segoe UI", Yellow);
   ObjectSet("Overalltitle", OBJPROP_CORNER, gi_3272);
   ObjectSet("Overalltitle", OBJPROP_XDISTANCE, gd_3284 - 13 * FontSize);
   ObjectSet("Overalltitle", OBJPROP_YDISTANCE, gi_3280 + 2.25 * FontSize);
   
   if(show_stocks)
   {
   ObjectCreate("Stocktitle", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Stocktitle", "STOCK INDICES", FontSize + 2, "Segoe UI", Yellow);
   ObjectSet("Stocktitle", OBJPROP_CORNER, gi_3272);
   ObjectSet("Stocktitle", OBJPROP_XDISTANCE, gd_3316 - 6 * FontSize);
   ObjectSet("Stocktitle", OBJPROP_YDISTANCE, gi_3280 + FontSize / 0.8);
   }
   
   if(show_commodities)
   {
   ObjectCreate("Commtitle", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Commtitle", "COMMODITIES", FontSize + 2, "Segoe UI", Yellow);
   ObjectSet("Commtitle", OBJPROP_CORNER, gi_3272);
   ObjectSet("Commtitle", OBJPROP_XDISTANCE, gd_3292 - 5 * FontSize);
   ObjectSet("Commtitle", OBJPROP_YDISTANCE, gi_3280 + 3.75 * FontSize);
 }
 
   ObjectSetText("MTFStrengthTitle", "MULTI TIME FRAME STRENGTH (%)", FontSize + 2, "Segoe UI", Yellow);
   ObjectSet("MTFStrengthTitle", OBJPROP_CORNER, gi_3272);
   ObjectSet("MTFStrengthTitle", OBJPROP_XDISTANCE, gd_3292 - 5 * FontSize);
   ObjectSet("MTFStrengthTitle", OBJPROP_YDISTANCE, gi_3280 + 56.25 * FontSize);
}

void CalculateStrength() {
   CalculateEUR();
   CalculateAUD();
   CalculateCHF();
   CalculateCAD();
   CalculateGBP();
   CalculateJPY();
   CalculateNZD();
   CalculateUSD();
   
   
   CalculateGOLD();
   CalculateSILVER();
   
   
   
   
   CalculateMSFT();
   CalculateMCD();
   CalculateKO();
   CalculateINTC();
   CalculateGM();
   CalculateDIS();
   CalculateAIG();
   CalculateNASDQ();
   CalculateQQQ();
   CalculateMTFStrengths();
   
   
}

void CalculateMTFStrengths() {
   CalculateMTFEUR();
   CalculateMTFGBP();
   CalculateMTFCHF();
   CalculateMTFAUD();
   CalculateMTFNZD();
   CalculateMTFCAD();
   CalculateMTFUSD();
   CalculateMTFJPY();
   
   
   CalculateMTFGOLD();
   CalculateMTFSILVER();
   
   
   
   
   CalculateMTFAIG();
   CalculateMTFNASDQ();
   CalculateMTFQQQ();
   CalculateMTFMSFT();
   CalculateMTFMCD();
   CalculateMTFKO();
   CalculateMTFINTC();
   CalculateMTFGM();
   CalculateMTFDIS();
   
   
}


void CalculateMTFDIS() {if(!show_stocks)return;
   if (HeatMapM1) gd_3064 = NormalizeDouble(CalculateStrengthPairsTF(stock9, PERIOD_M1), 0);
   if (HeatMapM5) gd_3072 = NormalizeDouble(CalculateStrengthPairsTF(stock9, PERIOD_M5), 0);
   if (HeatMapM15) gd_3080 = NormalizeDouble(CalculateStrengthPairsTF(stock9, PERIOD_M15), 0);
   if (HeatMapM30) gd_3088 = NormalizeDouble(CalculateStrengthPairsTF(stock9, PERIOD_M30), 0);
   if (HeatMapH1) gd_3096 = NormalizeDouble(CalculateStrengthPairsTF(stock9, PERIOD_H1), 0);
   if (HeatMapH4) gd_3104 = NormalizeDouble(CalculateStrengthPairsTF(stock9, PERIOD_H4), 0);
   if (HeatMapD1) gd_3112 = NormalizeDouble(CalculateStrengthPairsTF(stock9, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3120 = 0;
   if (gd_3064 != 0.0) li_0++;
   if (gd_3072 != 0.0) li_0++;
   if (gd_3080 != 0.0) li_0++;
   if (gd_3088 != 0.0) li_0++;
   if (gd_3096 != 0.0) li_0++;
   if (gd_3104 != 0.0) li_0++;
   if (gd_3112 != 0.0) li_0++;
   if (li_0 != 0) gd_3120 = (gd_3064 + gd_3072 + gd_3080 + gd_3088 + gd_3096 + gd_3104 + gd_3112) / li_0;
}

void CalculateMTFGM() {if(!show_stocks)return;
   if (HeatMapM1) gd_3008 = NormalizeDouble(CalculateStrengthPairsTF(stock8, PERIOD_M1), 0);
   if (HeatMapM5) gd_3016 = NormalizeDouble(CalculateStrengthPairsTF(stock8, PERIOD_M5), 0);
   if (HeatMapM15) gd_3024 = NormalizeDouble(CalculateStrengthPairsTF(stock8, PERIOD_M15), 0);
   if (HeatMapM30) gd_3032 = NormalizeDouble(CalculateStrengthPairsTF(stock8, PERIOD_M30), 0);
   if (HeatMapH1) gd_3040 = NormalizeDouble(CalculateStrengthPairsTF(stock8, PERIOD_H1), 0);
   if (HeatMapH4) gd_3048 = NormalizeDouble(CalculateStrengthPairsTF(stock8, PERIOD_H4), 0);
   if (HeatMapD1) gd_3056 = NormalizeDouble(CalculateStrengthPairsTF(stock8, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3128 = 0;
   if (gd_3008 != 0.0) li_0++;
   if (gd_3016 != 0.0) li_0++;
   if (gd_3024 != 0.0) li_0++;
   if (gd_3032 != 0.0) li_0++;
   if (gd_3040 != 0.0) li_0++;
   if (gd_3048 != 0.0) li_0++;
   if (gd_3056 != 0.0) li_0++;
   if (li_0 != 0) gd_3128 = (gd_3008 + gd_3016 + gd_3024 + gd_3032 + gd_3040 + gd_3048 + gd_3056) / li_0;
}

void CalculateMTFINTC() {if(!show_stocks)return;
   if (HeatMapM1) gd_2952 = NormalizeDouble(CalculateStrengthPairsTF(stock7, PERIOD_M1), 0);
   if (HeatMapM5) gd_2960 = NormalizeDouble(CalculateStrengthPairsTF(stock7, PERIOD_M5), 0);
   if (HeatMapM15) gd_2968 = NormalizeDouble(CalculateStrengthPairsTF(stock7, PERIOD_M15), 0);
   if (HeatMapM30) gd_2976 = NormalizeDouble(CalculateStrengthPairsTF(stock7, PERIOD_M30), 0);
   if (HeatMapH1) gd_2984 = NormalizeDouble(CalculateStrengthPairsTF(stock7, PERIOD_H1), 0);
   if (HeatMapH4) gd_2992 = NormalizeDouble(CalculateStrengthPairsTF(stock7, PERIOD_H4), 0);
   if (HeatMapD1) gd_3000 = NormalizeDouble(CalculateStrengthPairsTF(stock7, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3136 = 0;
   if (gd_2952 != 0.0) li_0++;
   if (gd_2960 != 0.0) li_0++;
   if (gd_2968 != 0.0) li_0++;
   if (gd_2976 != 0.0) li_0++;
   if (gd_2984 != 0.0) li_0++;
   if (gd_2992 != 0.0) li_0++;
   if (gd_3000 != 0.0) li_0++;
   if (li_0 != 0) gd_3136 = (gd_2952 + gd_2960 + gd_2968 + gd_2976 + gd_2984 + gd_2992 + gd_3000) / li_0;
}

void CalculateMTFKO() {if(!show_stocks)return;
   if (HeatMapM1) gd_2896 = NormalizeDouble(CalculateStrengthPairsTF(stock6, PERIOD_M1), 0);
   if (HeatMapM5) gd_2904 = NormalizeDouble(CalculateStrengthPairsTF(stock6, PERIOD_M5), 0);
   if (HeatMapM15) gd_2912 = NormalizeDouble(CalculateStrengthPairsTF(stock6, PERIOD_M15), 0);
   if (HeatMapM30) gd_2920 = NormalizeDouble(CalculateStrengthPairsTF(stock6, PERIOD_M30), 0);
   if (HeatMapH1) gd_2928 = NormalizeDouble(CalculateStrengthPairsTF(stock6, PERIOD_H1), 0);
   if (HeatMapH4) gd_2936 = NormalizeDouble(CalculateStrengthPairsTF(stock6, PERIOD_H4), 0);
   if (HeatMapD1) gd_2944 = NormalizeDouble(CalculateStrengthPairsTF(stock6, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3144 = 0;
   if (gd_2896 != 0.0) li_0++;
   if (gd_2904 != 0.0) li_0++;
   if (gd_2912 != 0.0) li_0++;
   if (gd_2920 != 0.0) li_0++;
   if (gd_2928 != 0.0) li_0++;
   if (gd_2936 != 0.0) li_0++;
   if (gd_2944 != 0.0) li_0++;
   if (li_0 != 0) gd_3144 = (gd_2896 + gd_2904 + gd_2912 + gd_2920 + gd_2928 + gd_2936 + gd_2944) / li_0;
}

void CalculateMTFMCD() {if(!show_stocks)return;
   if (HeatMapM1) gd_2840 = NormalizeDouble(CalculateStrengthPairsTF(stock5, PERIOD_M1), 0);
   if (HeatMapM5) gd_2848 = NormalizeDouble(CalculateStrengthPairsTF(stock5, PERIOD_M5), 0);
   if (HeatMapM15) gd_2856 = NormalizeDouble(CalculateStrengthPairsTF(stock5, PERIOD_M15), 0);
   if (HeatMapM30) gd_2864 = NormalizeDouble(CalculateStrengthPairsTF(stock5, PERIOD_M30), 0);
   if (HeatMapH1) gd_2872 = NormalizeDouble(CalculateStrengthPairsTF(stock5, PERIOD_H1), 0);
   if (HeatMapH4) gd_2880 = NormalizeDouble(CalculateStrengthPairsTF(stock5, PERIOD_H4), 0);
   if (HeatMapD1) gd_2888 = NormalizeDouble(CalculateStrengthPairsTF(stock5, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3152 = 0;
   if (gd_2840 != 0.0) li_0++;
   if (gd_2848 != 0.0) li_0++;
   if (gd_2856 != 0.0) li_0++;
   if (gd_2864 != 0.0) li_0++;
   if (gd_2872 != 0.0) li_0++;
   if (gd_2880 != 0.0) li_0++;
   if (gd_2888 != 0.0) li_0++;
   if (li_0 != 0) gd_3152 = (gd_2840 + gd_2848 + gd_2856 + gd_2864 + gd_2872 + gd_2880 + gd_2888) / li_0;
}

void CalculateMTFMSFT() {if(!show_stocks)return;
   if (HeatMapM1) gd_2784 = NormalizeDouble(CalculateStrengthPairsTF(stock4, PERIOD_M1), 0);
   if (HeatMapM5) gd_2792 = NormalizeDouble(CalculateStrengthPairsTF(stock4, PERIOD_M5), 0);
   if (HeatMapM15) gd_2800 = NormalizeDouble(CalculateStrengthPairsTF(stock4, PERIOD_M15), 0);
   if (HeatMapM30) gd_2808 = NormalizeDouble(CalculateStrengthPairsTF(stock4, PERIOD_M30), 0);
   if (HeatMapH1) gd_2816 = NormalizeDouble(CalculateStrengthPairsTF(stock4, PERIOD_H1), 0);
   if (HeatMapH4) gd_2824 = NormalizeDouble(CalculateStrengthPairsTF(stock4, PERIOD_H4), 0);
   if (HeatMapD1) gd_2832 = NormalizeDouble(CalculateStrengthPairsTF(stock4, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3160 = 0;
   if (gd_2784 != 0.0) li_0++;
   if (gd_2792 != 0.0) li_0++;
   if (gd_2800 != 0.0) li_0++;
   if (gd_2808 != 0.0) li_0++;
   if (gd_2816 != 0.0) li_0++;
   if (gd_2824 != 0.0) li_0++;
   if (gd_2832 != 0.0) li_0++;
   if (li_0 != 0) gd_3160 = (gd_2784 + gd_2792 + gd_2800 + gd_2808 + gd_2816 + gd_2824 + gd_2832) / li_0;
}

void CalculateMTFQQQ() {if(!show_stocks)return;
   if (HeatMapM1) gd_2728 = NormalizeDouble(CalculateStrengthPairsTF(stock3, PERIOD_M1), 0);
   if (HeatMapM5) gd_2736 = NormalizeDouble(CalculateStrengthPairsTF(stock3, PERIOD_M5), 0);
   if (HeatMapM15) gd_2744 = NormalizeDouble(CalculateStrengthPairsTF(stock3, PERIOD_M15), 0);
   if (HeatMapM30) gd_2752 = NormalizeDouble(CalculateStrengthPairsTF(stock3, PERIOD_M30), 0);
   if (HeatMapH1) gd_2760 = NormalizeDouble(CalculateStrengthPairsTF(stock3, PERIOD_H1), 0);
   if (HeatMapH4) gd_2768 = NormalizeDouble(CalculateStrengthPairsTF(stock3, PERIOD_H4), 0);
   if (HeatMapD1) gd_2776 = NormalizeDouble(CalculateStrengthPairsTF(stock3, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3168 = 0;
   if (gd_2728 != 0.0) li_0++;
   if (gd_2736 != 0.0) li_0++;
   if (gd_2744 != 0.0) li_0++;
   if (gd_2752 != 0.0) li_0++;
   if (gd_2760 != 0.0) li_0++;
   if (gd_2768 != 0.0) li_0++;
   if (gd_2776 != 0.0) li_0++;
   if (li_0 != 0) gd_3168 = (gd_2728 + gd_2736 + gd_2744 + gd_2752 + gd_2760 + gd_2768 + gd_2776) / li_0;
}

void CalculateMTFNASDQ() {if(!show_stocks)return;
   if (HeatMapM1) gd_2672 = NormalizeDouble(CalculateStrengthPairsTF(stock2, PERIOD_M1), 0);
   if (HeatMapM5) gd_2680 = NormalizeDouble(CalculateStrengthPairsTF(stock2, PERIOD_M5), 0);
   if (HeatMapM15) gd_2688 = NormalizeDouble(CalculateStrengthPairsTF(stock2, PERIOD_M15), 0);
   if (HeatMapM30) gd_2696 = NormalizeDouble(CalculateStrengthPairsTF(stock2, PERIOD_M30), 0);
   if (HeatMapH1) gd_2704 = NormalizeDouble(CalculateStrengthPairsTF(stock2, PERIOD_H1), 0);
   if (HeatMapH4) gd_2712 = NormalizeDouble(CalculateStrengthPairsTF(stock2, PERIOD_H4), 0);
   if (HeatMapD1) gd_2720 = NormalizeDouble(CalculateStrengthPairsTF(stock2, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3176 = 0;
   if (gd_2672 != 0.0) li_0++;
   if (gd_2680 != 0.0) li_0++;
   if (gd_2688 != 0.0) li_0++;
   if (gd_2696 != 0.0) li_0++;
   if (gd_2704 != 0.0) li_0++;
   if (gd_2712 != 0.0) li_0++;
   if (gd_2720 != 0.0) li_0++;
   if (li_0 != 0) gd_3176 = (gd_2672 + gd_2680 + gd_2688 + gd_2696 + gd_2704 + gd_2712 + gd_2720) / li_0;
}

void CalculateMTFAIG() {if(!show_stocks)return;
   if (HeatMapM1) gd_2616 = NormalizeDouble(CalculateStrengthPairsTF(stock1, PERIOD_M1), 0);
   if (HeatMapM5) gd_2624 = NormalizeDouble(CalculateStrengthPairsTF(stock1, PERIOD_M5), 0);
   if (HeatMapM15) gd_2632 = NormalizeDouble(CalculateStrengthPairsTF(stock1, PERIOD_M15), 0);
   if (HeatMapM30) gd_2640 = NormalizeDouble(CalculateStrengthPairsTF(stock1, PERIOD_M30), 0);
   if (HeatMapH1) gd_2648 = NormalizeDouble(CalculateStrengthPairsTF(stock1, PERIOD_H1), 0);
   if (HeatMapH4) gd_2656 = NormalizeDouble(CalculateStrengthPairsTF(stock1, PERIOD_H4), 0);
   if (HeatMapD1) gd_2664 = NormalizeDouble(CalculateStrengthPairsTF(stock1, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3184 = 0;
   if (gd_2616 != 0.0) li_0++;
   if (gd_2624 != 0.0) li_0++;
   if (gd_2632 != 0.0) li_0++;
   if (gd_2640 != 0.0) li_0++;
   if (gd_2648 != 0.0) li_0++;
   if (gd_2656 != 0.0) li_0++;
   if (gd_2664 != 0.0) li_0++;
   if (li_0 != 0) gd_3184 = (gd_2616 + gd_2624 + gd_2632 + gd_2640 + gd_2648 + gd_2656 + gd_2664) / li_0;


}

void CalculateMTFSILVER() {if(!show_commodities)return;
   if (HeatMapM1) gd_2560 = NormalizeDouble(CalculateStrengthPairsTF(_silver, PERIOD_M1), 0);
   if (HeatMapM5) gd_2568 = NormalizeDouble(CalculateStrengthPairsTF(_silver, PERIOD_M5), 0);
   if (HeatMapM15) gd_2576 = NormalizeDouble(CalculateStrengthPairsTF(_silver, PERIOD_M15), 0);
   if (HeatMapM30) gd_2584 = NormalizeDouble(CalculateStrengthPairsTF(_silver, PERIOD_M30), 0);
   if (HeatMapH1) gd_2592 = NormalizeDouble(CalculateStrengthPairsTF(_silver, PERIOD_H1), 0);
   if (HeatMapH4) gd_2600 = NormalizeDouble(CalculateStrengthPairsTF(_silver, PERIOD_H4), 0);
   if (HeatMapD1) gd_2608 = NormalizeDouble(CalculateStrengthPairsTF(_silver, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3192 = 0;
   if (gd_2560 != 0.0) li_0++;
   if (gd_2568 != 0.0) li_0++;
   if (gd_2576 != 0.0) li_0++;
   if (gd_2584 != 0.0) li_0++;
   if (gd_2592 != 0.0) li_0++;
   if (gd_2600 != 0.0) li_0++;
   if (gd_2608 != 0.0) li_0++;
   if (li_0 != 0) gd_3192 = (gd_2560 + gd_2568 + gd_2576 + gd_2584 + gd_2592 + gd_2600 + gd_2608) / li_0;
}

void CalculateMTFGOLD() {if(!show_commodities)return;
   if (HeatMapM1) gd_2504 = NormalizeDouble(CalculateStrengthPairsTF(_gold, PERIOD_M1), 0);
   if (HeatMapM5) gd_2512 = NormalizeDouble(CalculateStrengthPairsTF(_gold, PERIOD_M5), 0);
   if (HeatMapM15) gd_2520 = NormalizeDouble(CalculateStrengthPairsTF(_gold, PERIOD_M15), 0);
   if (HeatMapM30) gd_2528 = NormalizeDouble(CalculateStrengthPairsTF(_gold, PERIOD_M30), 0);
   if (HeatMapH1) gd_2536 = NormalizeDouble(CalculateStrengthPairsTF(_gold, PERIOD_H1), 0);
   if (HeatMapH4) gd_2544 = NormalizeDouble(CalculateStrengthPairsTF(_gold, PERIOD_H4), 0);
   if (HeatMapD1) gd_2552 = NormalizeDouble(CalculateStrengthPairsTF(_gold, PERIOD_D1), 0);
   int li_0 = 0;
   gd_3200 = 0;
   if (gd_2504 != 0.0) li_0++;
   if (gd_2512 != 0.0) li_0++;
   if (gd_2520 != 0.0) li_0++;
   if (gd_2528 != 0.0) li_0++;
   if (gd_2536 != 0.0) li_0++;
   if (gd_2544 != 0.0) li_0++;
   if (gd_2552 != 0.0) li_0++;
   if (li_0 != 0) gd_3200 = (gd_2504 + gd_2512 + gd_2520 + gd_2528 + gd_2536 + gd_2544 + gd_2552) / li_0;
}

void CalculateMTFJPY() {
   int li_0 = 0;
   gd_2448 = 0;
   gd_2456 = 0;
   gd_2464 = 0;
   gd_2472 = 0;
   gd_2480 = 0;
   gd_2488 = 0;
   gd_2496 = 0;
   if (HeatMapM1) {
      gd_1664 = -1.0 * CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_M1);
      if (gd_1664 != 0.0) li_0++;
      gd_1328 = -1.0 * CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_M1);
      if (gd_1328 != 0.0) li_0++;
      gd_2168 = -1.0 * CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_M1);
      if (gd_2168 != 0.0) li_0++;
      gd_488 = -1.0 * CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_M1);
      if (gd_488 != 0.0) li_0++;
      gd_936 = -1.0 * CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_M1);
      if (gd_936 != 0.0) li_0++;
      gd_1944 = -1.0 * CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_M1);
      if (gd_1944 != 0.0) li_0++;
      gd_2336 = -1.0 * CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_M1);
      if (gd_2336 != 0.0) li_0++;
      if (li_0 != 0) gd_2448 = NormalizeDouble((gd_1664 + gd_1328 + gd_2168 + gd_488 + gd_936 + gd_1944 + gd_2336) / li_0, 0);
   }
   if (HeatMapM5) {
      li_0 = 0;
      gd_1696 = -1.0 * CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_M5);
      if (gd_1696 != 0.0) li_0++;
      gd_1368 = -1.0 * CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_M5);
      if (gd_1368 != 0.0) li_0++;
      gd_2184 = -1.0 * CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_M5);
      if (gd_2184 != 0.0) li_0++;
      gd_544 = -1.0 * CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_M5);
      if (gd_544 != 0.0) li_0++;
      gd_984 = -1.0 * CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_M5);
      if (gd_984 != 0.0) li_0++;
      gd_1968 = -1.0 * CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_M5);
      if (gd_1968 != 0.0) li_0++;
      gd_2344 = -1.0 * CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_M5);
      if (gd_2344 != 0.0) li_0++;
      if (li_0 != 0) gd_2456 = NormalizeDouble((gd_1696 + gd_1368 + gd_2184 + gd_544 + gd_984 + gd_1968 + gd_2344) / li_0, 0);
   }
   if (HeatMapM15) {
      li_0 = 0;
      gd_1728 = -1.0 * CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_M15);
      if (gd_1728 != 0.0) li_0++;
      gd_1408 = -1.0 * CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_M15);
      if (gd_1408 != 0.0) li_0++;
      gd_2200 = -1.0 * CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_M15);
      if (gd_2200 != 0.0) li_0++;
      gd_600 = -1.0 * CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_M15);
      if (gd_600 != 0.0) li_0++;
      gd_1032 = -1.0 * CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_M15);
      if (gd_1032 != 0.0) li_0++;
      gd_1992 = -1.0 * CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_M15);
      if (gd_1992 != 0.0) li_0++;
      gd_2352 = -1.0 * CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_M15);
      if (gd_2352 != 0.0) li_0++;
      if (li_0 != 0) gd_2464 = NormalizeDouble((gd_1728 + gd_1408 + gd_2200 + gd_600 + gd_1032 + gd_1992 + gd_2352) / li_0, 0);
   }
   if (HeatMapM30) {
      li_0 = 0;
      gd_1760 = -1.0 * CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_M30);
      if (gd_1760 != 0.0) li_0++;
      gd_1448 = -1.0 * CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_M30);
      if (gd_1448 != 0.0) li_0++;
      gd_2216 = -1.0 * CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_M30);
      if (gd_2216 != 0.0) li_0++;
      gd_656 = -1.0 * CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_M30);
      if (gd_656 != 0.0) li_0++;
      gd_1080 = -1.0 * CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_M30);
      if (gd_1080 != 0.0) li_0++;
      gd_2016 = -1.0 * CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_M30);
      if (gd_2016 != 0.0) li_0++;
      gd_2360 = -1.0 * CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_M30);
      if (gd_2360 != 0.0) li_0++;
      if (li_0 != 0) gd_2472 = NormalizeDouble((gd_1760 + gd_1448 + gd_2216 + gd_656 + gd_1080 + gd_2016 + gd_2360) / li_0, 0);
   }
   if (HeatMapH1) {
      li_0 = 0;
      gd_1792 = -1.0 * CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_H1);
      if (gd_1792 != 0.0) li_0++;
      gd_1488 = -1.0 * CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_H1);
      if (gd_1488 != 0.0) li_0++;
      gd_2232 = -1.0 * CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_H1);
      if (gd_2232 != 0.0) li_0++;
      gd_712 = -1.0 * CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_H1);
      if (gd_712 != 0.0) li_0++;
      gd_1128 = -1.0 * CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_H1);
      if (gd_1128 != 0.0) li_0++;
      gd_2040 = -1.0 * CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_H1);
      if (gd_2040 != 0.0) li_0++;
      gd_2368 = -1.0 * CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_H1);
      if (gd_2368 != 0.0) li_0++;
      if (li_0 != 0) gd_2480 = NormalizeDouble((gd_1792 + gd_1488 + gd_2232 + gd_712 + gd_1128 + gd_2040 + gd_2368) / li_0, 0);
   }
   if (HeatMapH4) {
      li_0 = 0;
      gd_1824 = -1.0 * CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_H4);
      if (gd_1824 != 0.0) li_0++;
      gd_1528 = -1.0 * CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_H4);
      if (gd_1528 != 0.0) li_0++;
      gd_2248 = -1.0 * CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_H4);
      if (gd_2248 != 0.0) li_0++;
      gd_768 = -1.0 * CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_H4);
      if (gd_768 != 0.0) li_0++;
      gd_1176 = -1.0 * CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_H4);
      if (gd_1176 != 0.0) li_0++;
      gd_2064 = -1.0 * CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_H4);
      if (gd_2064 != 0.0) li_0++;
      gd_2376 = -1.0 * CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_H4);
      if (gd_2376 != 0.0) li_0++;
      if (li_0 != 0) gd_2488 = NormalizeDouble((gd_1824 + gd_1528 + gd_2248 + gd_768 + gd_1176 + gd_2064 + gd_2376) / li_0, 0);
   }
   if (HeatMapD1) {
      li_0 = 0;
      gd_1856 = -1.0 * CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_D1);
      if (gd_1856 != 0.0) li_0++;
      gd_1568 = -1.0 * CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_D1);
      if (gd_1568 != 0.0) li_0++;
      gd_2264 = -1.0 * CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_D1);
      if (gd_2264 != 0.0) li_0++;
      gd_824 = -1.0 * CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_D1);
      if (gd_824 != 0.0) li_0++;
      gd_1224 = -1.0 * CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_D1);
      if (gd_1224 != 0.0) li_0++;
      gd_2088 = -1.0 * CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_D1);
      if (gd_2088 != 0.0) li_0++;
      gd_2384 = -1.0 * CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_D1);
      if (gd_2384 != 0.0) li_0++;
      if (li_0 != 0) gd_2496 = NormalizeDouble((gd_1856 + gd_1568 + gd_2264 + gd_824 + gd_1224 + gd_2088 + gd_2384) / li_0, 0);
   }
   int li_4 = 0;
   gd_3208 = 0;
   if (gd_2448 != 0.0) li_4++;
   if (gd_2456 != 0.0) li_4++;
   if (gd_2464 != 0.0) li_4++;
   if (gd_2472 != 0.0) li_4++;
   if (gd_2480 != 0.0) li_4++;
   if (gd_2488 != 0.0) li_4++;
   if (gd_2496 != 0.0) li_4++;
   if (li_4 != 0) gd_3208 = (gd_2448 + gd_2456 + gd_2464 + gd_2472 + gd_2480 + gd_2488 + gd_2496) / li_4;
}

void CalculateMTFUSD() {
   int li_0 = 0;
   gd_2392 = 0;
   gd_2400 = 0;
   gd_2408 = 0;
   gd_2416 = 0;
   gd_2424 = 0;
   gd_2432 = 0;
   gd_2440 = 0;
   if (HeatMapM1) {
      gd_1680 = -1.0 * CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_M1);
      if (gd_1680 != 0.0) li_0++;
      gd_1344 = CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_M1);
      if (gd_1344 != 0.0) li_0++;
      gd_2176 = CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_M1);
      if (gd_2176 != 0.0) li_0++;
      gd_504 = -1.0 * CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_M1);
      if (gd_504 != 0.0) li_0++;
      gd_952 = -1.0 * CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_M1);
      if (gd_952 != 0.0) li_0++;
      gd_2336 = CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_M1);
      if (gd_2336 != 0.0) li_0++;
      gd_1952 = -1.0 * CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_M1);
      if (gd_1952 != 0.0) li_0++;
      if (li_0 != 0) gd_2392 = NormalizeDouble((gd_1680 + gd_1344 + gd_2176 + gd_504 + gd_952 + gd_2336 + gd_1952) / li_0, 0);
   }
   if (HeatMapM5) {
      li_0 = 0;
      gd_1712 = -1.0 * CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_M5);
      if (gd_1712 != 0.0) li_0++;
      gd_1384 = CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_M5);
      if (gd_1384 != 0.0) li_0++;
      gd_2192 = CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_M5);
      if (gd_2192 != 0.0) li_0++;
      gd_560 = -1.0 * CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_M5);
      if (gd_560 != 0.0) li_0++;
      gd_1000 = -1.0 * CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_M5);
      if (gd_1000 != 0.0) li_0++;
      gd_2344 = CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_M5);
      if (gd_2344 != 0.0) li_0++;
      gd_1976 = -1.0 * CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_M5);
      if (gd_1976 != 0.0) li_0++;
      if (li_0 != 0) gd_2400 = NormalizeDouble((gd_1712 + gd_1384 + gd_2192 + gd_560 + gd_1000 + gd_2344 + gd_1976) / li_0, 0);
   }
   if (HeatMapM15) {
      li_0 = 0;
      gd_1744 = -1.0 * CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_M15);
      if (gd_1744 != 0.0) li_0++;
      gd_1424 = CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_M15);
      if (gd_1424 != 0.0) li_0++;
      gd_2208 = CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_M15);
      if (gd_2208 != 0.0) li_0++;
      gd_616 = -1.0 * CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_M15);
      if (gd_616 != 0.0) li_0++;
      gd_1048 = -1.0 * CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_M15);
      if (gd_1048 != 0.0) li_0++;
      gd_2352 = CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_M15);
      if (gd_2352 != 0.0) li_0++;
      gd_2000 = -1.0 * CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_M15);
      if (gd_2000 != 0.0) li_0++;
      if (li_0 != 0) gd_2408 = NormalizeDouble((gd_1744 + gd_1424 + gd_2208 + gd_616 + gd_1048 + gd_2352 + gd_2000) / li_0, 0);
   }
   if (HeatMapM30) {
      li_0 = 0;
      gd_1776 = -1.0 * CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_M30);
      if (gd_1776 != 0.0) li_0++;
      gd_1464 = CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_M30);
      if (gd_1464 != 0.0) li_0++;
      gd_2224 = CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_M30);
      if (gd_2224 != 0.0) li_0++;
      gd_672 = -1.0 * CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_M30);
      if (gd_672 != 0.0) li_0++;
      gd_1096 = -1.0 * CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_M30);
      if (gd_1096 != 0.0) li_0++;
      gd_2360 = CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_M30);
      if (gd_2360 != 0.0) li_0++;
      gd_2024 = -1.0 * CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_M30);
      if (gd_2024 != 0.0) li_0++;
      if (li_0 != 0) gd_2416 = NormalizeDouble((gd_1776 + gd_1464 + gd_2224 + gd_672 + gd_1096 + gd_2360 + gd_2024) / li_0, 0);
   }
   if (HeatMapH1) {
      li_0 = 0;
      gd_1808 = -1.0 * CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_H1);
      if (gd_1808 != 0.0) li_0++;
      gd_1504 = CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_H1);
      if (gd_1504 != 0.0) li_0++;
      gd_2240 = CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_H1);
      if (gd_2240 != 0.0) li_0++;
      gd_728 = -1.0 * CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_H1);
      if (gd_728 != 0.0) li_0++;
      gd_1144 = -1.0 * CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_H1);
      if (gd_1144 != 0.0) li_0++;
      gd_2368 = CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_H1);
      if (gd_2368 != 0.0) li_0++;
      gd_2048 = -1.0 * CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_H1);
      if (gd_2048 != 0.0) li_0++;
      if (li_0 != 0) gd_2424 = NormalizeDouble((gd_1808 + gd_1504 + gd_2240 + gd_728 + gd_1144 + gd_2368 + gd_2048) / li_0, 0);
   }
   if (HeatMapH4) {
      li_0 = 0;
      gd_1840 = -1.0 * CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_H4);
      if (gd_1840 != 0.0) li_0++;
      gd_1544 = CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_H4);
      if (gd_1544 != 0.0) li_0++;
      gd_2256 = CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_H4);
      if (gd_2256 != 0.0) li_0++;
      gd_784 = -1.0 * CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_H4);
      if (gd_784 != 0.0) li_0++;
      gd_1192 = -1.0 * CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_H4);
      if (gd_1192 != 0.0) li_0++;
      gd_2376 = CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_H4);
      if (gd_2376 != 0.0) li_0++;
      gd_2072 = -1.0 * CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_H4);
      if (gd_2072 != 0.0) li_0++;
      if (li_0 != 0) gd_2432 = NormalizeDouble((gd_1840 + gd_1544 + gd_2256 + gd_784 + gd_1192 + gd_2376 + gd_2072) / li_0, 0);
   }
   if (HeatMapD1) {
      li_0 = 0;
      gd_1872 = -1.0 * CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_D1);
      if (gd_1872 != 0.0) li_0++;
      gd_1584 = CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_D1);
      if (gd_1584 != 0.0) li_0++;
      gd_2272 = CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_D1);
      if (gd_2272 != 0.0) li_0++;
      gd_840 = -1.0 * CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_D1);
      if (gd_840 != 0.0) li_0++;
      gd_1240 = -1.0 * CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_D1);
      if (gd_1240 != 0.0) li_0++;
      gd_2384 = CalculateStrengthPairsTF("USDJPY"+SS, PERIOD_D1);
      if (gd_2384 != 0.0) li_0++;
      gd_2096 = -1.0 * CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_D1);
      if (gd_2096 != 0.0) li_0++;
      if (li_0 != 0) gd_2440 = NormalizeDouble((gd_1872 + gd_1584 + gd_2272 + gd_840 + gd_1240 + gd_2384 + gd_2096) / li_0, 0);
   }
   int li_4 = 0;
   gd_3216 = 0;
   if (gd_2392 != 0.0) li_4++;
   if (gd_2400 != 0.0) li_4++;
   if (gd_2408 != 0.0) li_4++;
   if (gd_2416 != 0.0) li_4++;
   if (gd_2424 != 0.0) li_4++;
   if (gd_2432 != 0.0) li_4++;
   if (gd_2440 != 0.0) li_4++;
   if (li_4 != 0) gd_3216 = (gd_2392 + gd_2400 + gd_2408 + gd_2416 + gd_2424 + gd_2432 + gd_2440) / li_4;
}

void CalculateMTFCAD() {
   int li_0 = 0;
   gd_2280 = 0;
   gd_2288 = 0;
   gd_2296 = 0;
   gd_2304 = 0;
   gd_2312 = 0;
   gd_2320 = 0;
   gd_2328 = 0;
   if (HeatMapM1) {
      gd_2168 = CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_M1);
      if (gd_2168 != 0.0) li_0++;
      gd_1960 = -1.0 * CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_M1);
      if (gd_1960 != 0.0) li_0++;
      gd_2176 = -1.0 * CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_M1);
      if (gd_2176 != 0.0) li_0++;
      gd_512 = -1.0 * CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_M1);
      if (gd_512 != 0.0) li_0++;
      gd_960 = -1.0 * CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_M1);
      if (gd_960 != 0.0) li_0++;
      gd_1688 = -1.0 * CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_M1);
      if (gd_1688 != 0.0) li_0++;
      gd_1360 = CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_M1);
      if (gd_1360 != 0.0) li_0++;
      if (li_0 != 0) gd_2280 = NormalizeDouble((gd_2168 + gd_1960 + gd_2176 + gd_512 + gd_960 + gd_1688 + gd_1360) / li_0, 0);
   }
   if (HeatMapM5) {
      li_0 = 0;
      gd_2184 = CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_M5);
      if (gd_2184 != 0.0) li_0++;
      gd_1984 = -1.0 * CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_M5);
      if (gd_1984 != 0.0) li_0++;
      gd_2192 = -1.0 * CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_M5);
      if (gd_2192 != 0.0) li_0++;
      gd_568 = -1.0 * CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_M5);
      if (gd_568 != 0.0) li_0++;
      gd_1008 = -1.0 * CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_M5);
      if (gd_1008 != 0.0) li_0++;
      gd_1720 = -1.0 * CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_M5);
      if (gd_1720 != 0.0) li_0++;
      gd_1400 = CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_M5);
      if (gd_1400 != 0.0) li_0++;
      if (li_0 != 0) gd_2288 = NormalizeDouble((gd_2184 + gd_1984 + gd_2192 + gd_568 + gd_1008 + gd_1720 + gd_1400) / li_0, 0);
   }
   if (HeatMapM15) {
      li_0 = 0;
      gd_2200 = CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_M15);
      if (gd_2200 != 0.0) li_0++;
      gd_2008 = -1.0 * CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_M15);
      if (gd_2008 != 0.0) li_0++;
      gd_2208 = -1.0 * CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_M15);
      if (gd_2208 != 0.0) li_0++;
      gd_624 = -1.0 * CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_M15);
      if (gd_624 != 0.0) li_0++;
      gd_1056 = -1.0 * CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_M15);
      if (gd_1056 != 0.0) li_0++;
      gd_1752 = -1.0 * CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_M15);
      if (gd_1752 != 0.0) li_0++;
      gd_1440 = CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_M15);
      if (gd_1440 != 0.0) li_0++;
      if (li_0 != 0) gd_2296 = NormalizeDouble((gd_2200 + gd_2008 + gd_2208 + gd_624 + gd_1056 + gd_1752 + gd_1440) / li_0, 0);
   }
   if (HeatMapM30) {
      li_0 = 0;
      gd_2216 = CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_M30);
      if (gd_2216 != 0.0) li_0++;
      gd_2032 = -1.0 * CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_M30);
      if (gd_2032 != 0.0) li_0++;
      gd_2224 = -1.0 * CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_M30);
      if (gd_2224 != 0.0) li_0++;
      gd_680 = -1.0 * CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_M30);
      if (gd_680 != 0.0) li_0++;
      gd_1104 = -1.0 * CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_M30);
      if (gd_1104 != 0.0) li_0++;
      gd_1784 = -1.0 * CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_M30);
      if (gd_1784 != 0.0) li_0++;
      gd_1480 = CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_M30);
      if (gd_1480 != 0.0) li_0++;
      if (li_0 != 0) gd_2304 = NormalizeDouble((gd_2216 + gd_2032 + gd_2224 + gd_680 + gd_1104 + gd_1784 + gd_1480) / li_0, 0);
   }
   if (HeatMapH1) {
      li_0 = 0;
      gd_2232 = CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_H1);
      if (gd_2232 != 0.0) li_0++;
      gd_2056 = -1.0 * CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_H1);
      if (gd_2056 != 0.0) li_0++;
      gd_2240 = -1.0 * CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_H1);
      if (gd_2240 != 0.0) li_0++;
      gd_736 = -1.0 * CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_H1);
      if (gd_736 != 0.0) li_0++;
      gd_1152 = -1.0 * CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_H1);
      if (gd_1152 != 0.0) li_0++;
      gd_1816 = -1.0 * CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_H1);
      if (gd_1816 != 0.0) li_0++;
      gd_1520 = CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_H1);
      if (gd_1520 != 0.0) li_0++;
      if (li_0 != 0) gd_2312 = NormalizeDouble((gd_2232 + gd_2056 + gd_2240 + gd_736 + gd_1152 + gd_1816 + gd_1520) / li_0, 0);
   }
   if (HeatMapH4) {
      li_0 = 0;
      gd_2248 = CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_H4);
      if (gd_2248 != 0.0) li_0++;
      gd_2080 = -1.0 * CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_H4);
      if (gd_2080 != 0.0) li_0++;
      gd_2256 = -1.0 * CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_H4);
      if (gd_2256 != 0.0) li_0++;
      gd_792 = -1.0 * CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_H4);
      if (gd_792 != 0.0) li_0++;
      gd_1200 = -1.0 * CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_H4);
      if (gd_1200 != 0.0) li_0++;
      gd_1848 = -1.0 * CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_H4);
      if (gd_1848 != 0.0) li_0++;
      gd_1560 = CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_H4);
      if (gd_1560 != 0.0) li_0++;
      if (li_0 != 0) gd_2320 = NormalizeDouble((gd_2248 + gd_2080 + gd_2256 + gd_792 + gd_1200 + gd_1848 + gd_1560) / li_0, 0);
   }
   if (HeatMapD1) {
      li_0 = 0;
      gd_2264 = CalculateStrengthPairsTF("CADJPY"+SS, PERIOD_D1);
      if (gd_2264 != 0.0) li_0++;
      gd_2104 = -1.0 * CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_D1);
      if (gd_2104 != 0.0) li_0++;
      gd_2272 = -1.0 * CalculateStrengthPairsTF("USDCAD"+SS, PERIOD_D1);
      if (gd_2272 != 0.0) li_0++;
      gd_848 = -1.0 * CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_D1);
      if (gd_848 != 0.0) li_0++;
      gd_1248 = -1.0 * CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_D1);
      if (gd_1248 != 0.0) li_0++;
      gd_1880 = -1.0 * CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_D1);
      if (gd_1880 != 0.0) li_0++;
      gd_1600 = CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_D1);
      if (gd_1600 != 0.0) li_0++;
      if (li_0 != 0) gd_2328 = NormalizeDouble((gd_2264 + gd_2104 + gd_2272 + gd_848 + gd_1248 + gd_1880 + gd_1600) / li_0, 0);
   }
   int li_4 = 0;
   gd_3224 = 0;
   if (gd_2280 != 0.0) li_4++;
   if (gd_2288 != 0.0) li_4++;
   if (gd_2296 != 0.0) li_4++;
   if (gd_2304 != 0.0) li_4++;
   if (gd_2312 != 0.0) li_4++;
   if (gd_2320 != 0.0) li_4++;
   if (gd_2328 != 0.0) li_4++;
   if (li_4 != 0) gd_3224 = (gd_2280 + gd_2288 + gd_2296 + gd_2304 + gd_2312 + gd_2320 + gd_2328) / li_4;
}

void CalculateMTFNZD() {
   int li_0 = 0;
   gd_2112 = 0;
   gd_2120 = 0;
   gd_2128 = 0;
   gd_2136 = 0;
   gd_2144 = 0;
   gd_2152 = 0;
   gd_2160 = 0;
   if (HeatMapM1) {
      gd_1944 = CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_M1);
      if (gd_1944 != 0.0) li_0++;
      gd_944 = -1.0 * CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_M1);
      if (gd_944 != 0.0) li_0++;
      gd_1952 = CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_M1);
      if (gd_1952 != 0.0) li_0++;
      gd_1960 = CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_M1);
      if (gd_1960 != 0.0) li_0++;
      gd_496 = -1.0 * CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_M1);
      if (gd_496 != 0.0) li_0++;
      gd_1672 = -1.0 * CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_M1);
      if (gd_1672 != 0.0) li_0++;
      gd_1336 = CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_M1);
      if (gd_1336 != 0.0) li_0++;
      if (li_0 != 0) gd_2112 = NormalizeDouble((gd_1944 + gd_944 + gd_1952 + gd_1960 + gd_496 + gd_1672 + gd_1336) / li_0, 0);
   }
   if (HeatMapM5) {
      li_0 = 0;
      gd_1968 = CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_M5);
      if (gd_1968 != 0.0) li_0++;
      gd_992 = -1.0 * CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_M5);
      if (gd_992 != 0.0) li_0++;
      gd_1976 = CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_M5);
      if (gd_1976 != 0.0) li_0++;
      gd_1984 = CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_M5);
      if (gd_1984 != 0.0) li_0++;
      gd_552 = -1.0 * CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_M5);
      if (gd_552 != 0.0) li_0++;
      gd_1704 = -1.0 * CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_M5);
      if (gd_1704 != 0.0) li_0++;
      gd_1376 = CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_M5);
      if (gd_1376 != 0.0) li_0++;
      if (li_0 != 0) gd_2120 = NormalizeDouble((gd_1968 + gd_992 + gd_1976 + gd_1984 + gd_552 + gd_1704 + gd_1376) / li_0, 0);
   }
   if (HeatMapM15) {
      li_0 = 0;
      gd_1992 = CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_M15);
      if (gd_1992 != 0.0) li_0++;
      gd_1040 = -1.0 * CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_M15);
      if (gd_1040 != 0.0) li_0++;
      gd_2000 = CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_M15);
      if (gd_2000 != 0.0) li_0++;
      gd_2008 = CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_M15);
      if (gd_2008 != 0.0) li_0++;
      gd_608 = -1.0 * CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_M15);
      if (gd_608 != 0.0) li_0++;
      gd_1736 = -1.0 * CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_M15);
      if (gd_1736 != 0.0) li_0++;
      gd_1416 = CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_M15);
      if (gd_1416 != 0.0) li_0++;
      if (li_0 != 0) gd_2128 = NormalizeDouble((gd_1992 + gd_1040 + gd_2000 + gd_2008 + gd_608 + gd_1736 + gd_1416) / li_0, 0);
   }
   if (HeatMapM30) {
      li_0 = 0;
      gd_2016 = CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_M30);
      if (gd_2016 != 0.0) li_0++;
      gd_1088 = -1.0 * CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_M30);
      if (gd_1088 != 0.0) li_0++;
      gd_2024 = CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_M30);
      if (gd_2024 != 0.0) li_0++;
      gd_2032 = CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_M30);
      if (gd_2032 != 0.0) li_0++;
      gd_664 = -1.0 * CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_M30);
      if (gd_664 != 0.0) li_0++;
      gd_1768 = -1.0 * CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_M30);
      if (gd_1768 != 0.0) li_0++;
      gd_1456 = CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_M30);
      if (gd_1456 != 0.0) li_0++;
      if (li_0 != 0) gd_2136 = NormalizeDouble((gd_2016 + gd_1088 + gd_2024 + gd_2032 + gd_664 + gd_1768 + gd_1456) / li_0, 0);
   }
   if (HeatMapH1) {
      li_0 = 0;
      gd_2040 = CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_H1);
      if (gd_2040 != 0.0) li_0++;
      gd_1136 = -1.0 * CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_H1);
      if (gd_1136 != 0.0) li_0++;
      gd_2048 = CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_H1);
      if (gd_2048 != 0.0) li_0++;
      gd_2056 = CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_H1);
      if (gd_2056 != 0.0) li_0++;
      gd_720 = -1.0 * CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_H1);
      if (gd_720 != 0.0) li_0++;
      gd_1800 = -1.0 * CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_H1);
      if (gd_1800 != 0.0) li_0++;
      gd_1496 = CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_H1);
      if (gd_1496 != 0.0) li_0++;
      if (li_0 != 0) gd_2144 = NormalizeDouble((gd_2040 + gd_1136 + gd_2048 + gd_2056 + gd_720 + gd_1800 + gd_1496) / li_0, 0);
   }
   if (HeatMapH4) {
      li_0 = 0;
      gd_2064 = CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_H4);
      if (gd_2064 != 0.0) li_0++;
      gd_1184 = -1.0 * CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_H4);
      if (gd_1184 != 0.0) li_0++;
      gd_2072 = CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_H4);
      if (gd_2072 != 0.0) li_0++;
      gd_2080 = CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_H4);
      if (gd_2080 != 0.0) li_0++;
      gd_776 = -1.0 * CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_H4);
      if (gd_776 != 0.0) li_0++;
      gd_1832 = -1.0 * CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_H4);
      if (gd_1832 != 0.0) li_0++;
      gd_1536 = CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_H4);
      if (gd_1536 != 0.0) li_0++;
      if (li_0 != 0) gd_2152 = NormalizeDouble((gd_2064 + gd_1184 + gd_2072 + gd_2080 + gd_776 + gd_1832 + gd_1536) / li_0, 0);
   }
   if (HeatMapD1) {
      li_0 = 0;
      gd_2088 = CalculateStrengthPairsTF("NZDJPY"+SS, PERIOD_D1);
      if (gd_2088 != 0.0) li_0++;
      gd_1232 = -1.0 * CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_D1);
      if (gd_1232 != 0.0) li_0++;
      gd_2096 = CalculateStrengthPairsTF("NZDUSD"+SS, PERIOD_D1);
      if (gd_2096 != 0.0) li_0++;
      gd_2104 = CalculateStrengthPairsTF("NZDCAD"+SS, PERIOD_D1);
      if (gd_2104 != 0.0) li_0++;
      gd_832 = -1.0 * CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_D1);
      if (gd_832 != 0.0) li_0++;
      gd_1864 = -1.0 * CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_D1);
      if (gd_1864 != 0.0) li_0++;
      gd_1576 = CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_D1);
      if (gd_1576 != 0.0) li_0++;
      if (li_0 != 0) gd_2160 = NormalizeDouble((gd_2088 + gd_1232 + gd_2096 + gd_2104 + gd_832 + gd_1864 + gd_1576) / li_0, 0);
   }
   int li_4 = 0;
   gd_3232 = 0;
   if (gd_2112 != 0.0) li_4++;
   if (gd_2120 != 0.0) li_4++;
   if (gd_2128 != 0.0) li_4++;
   if (gd_2136 != 0.0) li_4++;
   if (gd_2144 != 0.0) li_4++;
   if (gd_2152 != 0.0) li_4++;
   if (gd_2160 != 0.0) li_4++;
   if (li_4 != 0) gd_3232 = (gd_2112 + gd_2120 + gd_2128 + gd_2136 + gd_2144 + gd_2152 + gd_2160) / li_4;
}

void CalculateMTFAUD() {
   int li_0 = 0;
   gd_1888 = 0;
   gd_1896 = 0;
   gd_1904 = 0;
   gd_1912 = 0;
   gd_1920 = 0;
   gd_1928 = 0;
   gd_1936 = 0;
   if (HeatMapM1) {
      gd_1664 = CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_M1);
      if (gd_1664 != 0.0) li_0++;
      gd_1672 = CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_M1);
      if (gd_1672 != 0.0) li_0++;
      gd_1680 = CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_M1);
      if (gd_1680 != 0.0) li_0++;
      gd_528 = -1.0 * CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_M1);
      if (gd_528 != 0.0) li_0++;
      gd_968 = -1.0 * CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_M1);
      if (gd_968 != 0.0) li_0++;
      gd_1352 = CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_M1);
      if (gd_1352 != 0.0) li_0++;
      gd_1688 = CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_M1);
      if (gd_1688 != 0.0) li_0++;
      if (li_0 != 0) gd_1888 = NormalizeDouble((gd_1664 + gd_1672 + gd_1680 + gd_528 + gd_968 + gd_1352 + gd_1688) / li_0, 0);
   }
   if (HeatMapM5) {
      li_0 = 0;
      gd_1696 = CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_M5);
      if (gd_1696 != 0.0) li_0++;
      gd_1704 = CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_M5);
      if (gd_1704 != 0.0) li_0++;
      gd_1712 = CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_M5);
      if (gd_1712 != 0.0) li_0++;
      gd_584 = -1.0 * CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_M5);
      if (gd_584 != 0.0) li_0++;
      gd_1016 = -1.0 * CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_M5);
      if (gd_1016 != 0.0) li_0++;
      gd_1392 = CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_M5);
      if (gd_1392 != 0.0) li_0++;
      gd_1720 = CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_M5);
      if (gd_1720 != 0.0) li_0++;
      if (li_0 != 0) gd_1896 = NormalizeDouble((gd_1696 + gd_1704 + gd_1712 + gd_584 + gd_1016 + gd_1392 + gd_1720) / li_0, 0);
   }
   if (HeatMapM15) {
      li_0 = 0;
      gd_1728 = CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_M15);
      if (gd_1728 != 0.0) li_0++;
      gd_1736 = CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_M15);
      if (gd_1736 != 0.0) li_0++;
      gd_1744 = CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_M15);
      if (gd_1744 != 0.0) li_0++;
      gd_640 = -1.0 * CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_M15);
      if (gd_640 != 0.0) li_0++;
      gd_1064 = -1.0 * CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_M15);
      if (gd_1064 != 0.0) li_0++;
      gd_1432 = CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_M15);
      if (gd_1432 != 0.0) li_0++;
      gd_1752 = CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_M15);
      if (gd_1752 != 0.0) li_0++;
      if (li_0 != 0) gd_1904 = NormalizeDouble((gd_1728 + gd_1736 + gd_1744 + gd_640 + gd_1064 + gd_1432 + gd_1752) / li_0, 0);
   }
   if (HeatMapM30) {
      li_0 = 0;
      gd_1760 = CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_M30);
      if (gd_1760 != 0.0) li_0++;
      gd_1768 = CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_M30);
      if (gd_1768 != 0.0) li_0++;
      gd_1776 = CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_M30);
      if (gd_1776 != 0.0) li_0++;
      gd_696 = -1.0 * CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_M30);
      if (gd_696 != 0.0) li_0++;
      gd_1112 = -1.0 * CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_M30);
      if (gd_1112 != 0.0) li_0++;
      gd_1472 = CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_M30);
      if (gd_1472 != 0.0) li_0++;
      gd_1784 = CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_M30);
      if (gd_1784 != 0.0) li_0++;
      if (li_0 != 0) gd_1912 = NormalizeDouble((gd_1760 + gd_1768 + gd_1776 + gd_696 + gd_1112 + gd_1472 + gd_1784) / li_0, 0);
   }
   if (HeatMapH1) {
      li_0 = 0;
      gd_1792 = CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_H1);
      if (gd_1792 != 0.0) li_0++;
      gd_1800 = CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_H1);
      if (gd_1800 != 0.0) li_0++;
      gd_1808 = CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_H1);
      if (gd_1808 != 0.0) li_0++;
      gd_752 = -1.0 * CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_H1);
      if (gd_752 != 0.0) li_0++;
      gd_1160 = -1.0 * CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_H1);
      if (gd_1160 != 0.0) li_0++;
      gd_1512 = CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_H1);
      if (gd_1512 != 0.0) li_0++;
      gd_1816 = CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_H1);
      if (gd_1816 != 0.0) li_0++;
      if (li_0 != 0) gd_1920 = NormalizeDouble((gd_1792 + gd_1800 + gd_1808 + gd_752 + gd_1160 + gd_1512 + gd_1816) / li_0, 0);
   }
   if (HeatMapH4) {
      li_0 = 0;
      gd_1824 = CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_H4);
      if (gd_1824 != 0.0) li_0++;
      gd_1832 = CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_H4);
      if (gd_1832 != 0.0) li_0++;
      gd_1840 = CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_H4);
      if (gd_1840 != 0.0) li_0++;
      gd_808 = -1.0 * CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_H4);
      if (gd_808 != 0.0) li_0++;
      gd_1208 = -1.0 * CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_H4);
      if (gd_1208 != 0.0) li_0++;
      gd_1552 = CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_H4);
      if (gd_1552 != 0.0) li_0++;
      gd_1848 = CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_H4);
      if (gd_1848 != 0.0) li_0++;
      if (li_0 != 0) gd_1928 = NormalizeDouble((gd_1824 + gd_1832 + gd_1840 + gd_808 + gd_1208 + gd_1552 + gd_1848) / li_0, 0);
   }
   if (HeatMapD1) {
      li_0 = 0;
      gd_1856 = CalculateStrengthPairsTF("AUDJPY"+SS, PERIOD_D1);
      if (gd_1856 != 0.0) li_0++;
      gd_1864 = CalculateStrengthPairsTF("AUDNZD"+SS, PERIOD_D1);
      if (gd_1864 != 0.0) li_0++;
      gd_1872 = CalculateStrengthPairsTF("AUDUSD"+SS, PERIOD_D1);
      if (gd_1872 != 0.0) li_0++;
      gd_864 = -1.0 * CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_D1);
      if (gd_864 != 0.0) li_0++;
      gd_1256 = -1.0 * CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_D1);
      if (gd_1256 != 0.0) li_0++;
      gd_1592 = CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_D1);
      if (gd_1592 != 0.0) li_0++;
      gd_1880 = CalculateStrengthPairsTF("AUDCAD"+SS, PERIOD_D1);
      if (gd_1880 != 0.0) li_0++;
      if (li_0 != 0) gd_1936 = NormalizeDouble((gd_1856 + gd_1864 + gd_1872 + gd_864 + gd_1256 + gd_1592 + gd_1880) / li_0, 0);
   }
   int li_4 = 0;
   gd_3240 = 0;
   if (gd_1888 != 0.0) li_4++;
   if (gd_1896 != 0.0) li_4++;
   if (gd_1904 != 0.0) li_4++;
   if (gd_1912 != 0.0) li_4++;
   if (gd_1920 != 0.0) li_4++;
   if (gd_1928 != 0.0) li_4++;
   if (gd_1936 != 0.0) li_4++;
   if (li_4 != 0) gd_3240 = (gd_1888 + gd_1896 + gd_1904 + gd_1912 + gd_1920 + gd_1928 + gd_1936) / li_4;
}

void CalculateMTFCHF() {
   int li_0 = 0;
   gd_1608 = 0;
   gd_1616 = 0;
   gd_1624 = 0;
   gd_1632 = 0;
   gd_1640 = 0;
   gd_1648 = 0;
   gd_1656 = 0;
   if (HeatMapM1) {
      gd_1328 = CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_M1);
      if (gd_1328 != 0.0) li_0++;
      gd_1336 = -1.0 * CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_M1);
      if (gd_1336 != 0.0) li_0++;
      gd_1344 = -1.0 * CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_M1);
      if (gd_1344 != 0.0) li_0++;
      gd_536 = -1.0 * CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_M1);
      if (gd_536 != 0.0) li_0++;
      gd_976 = -1.0 * CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_M1);
      if (gd_976 != 0.0) li_0++;
      gd_1352 = -1.0 * CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_M1);
      if (gd_1352 != 0.0) li_0++;
      gd_1360 = -1.0 * CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_M1);
      if (gd_1360 != 0.0) li_0++;
      if (li_0 != 0) gd_1608 = NormalizeDouble((gd_1328 + gd_1336 + gd_1344 + gd_536 + gd_976 + gd_1352 + gd_1360) / li_0, 0);
   }
   if (HeatMapM5) {
      li_0 = 0;
      gd_1368 = CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_M5);
      if (gd_1368 != 0.0) li_0++;
      gd_1376 = -1.0 * CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_M5);
      if (gd_1376 != 0.0) li_0++;
      gd_1384 = -1.0 * CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_M5);
      if (gd_1384 != 0.0) li_0++;
      gd_592 = -1.0 * CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_M5);
      if (gd_592 != 0.0) li_0++;
      gd_1024 = -1.0 * CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_M5);
      if (gd_1024 != 0.0) li_0++;
      gd_1392 = -1.0 * CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_M5);
      if (gd_1392 != 0.0) li_0++;
      gd_1400 = -1.0 * CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_M5);
      if (gd_1400 != 0.0) li_0++;
      if (li_0 != 0) gd_1616 = NormalizeDouble((gd_1368 + gd_1376 + gd_1384 + gd_592 + gd_1024 + gd_1392 + gd_1400) / li_0, 0);
   }
   if (HeatMapM15) {
      li_0 = 0;
      gd_1408 = CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_M15);
      if (gd_1408 != 0.0) li_0++;
      gd_1416 = -1.0 * CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_M15);
      if (gd_1416 != 0.0) li_0++;
      gd_1424 = -1.0 * CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_M15);
      if (gd_1424 != 0.0) li_0++;
      gd_648 = -1.0 * CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_M15);
      if (gd_648 != 0.0) li_0++;
      gd_1072 = -1.0 * CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_M15);
      if (gd_1072 != 0.0) li_0++;
      gd_1432 = -1.0 * CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_M15);
      if (gd_1432 != 0.0) li_0++;
      gd_1440 = -1.0 * CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_M15);
      if (gd_1440 != 0.0) li_0++;
      if (li_0 != 0) gd_1624 = NormalizeDouble((gd_1408 + gd_1416 + gd_1424 + gd_648 + gd_1072 + gd_1432 + gd_1440) / li_0, 0);
   }
   if (HeatMapM30) {
      li_0 = 0;
      gd_1448 = CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_M30);
      if (gd_1448 != 0.0) li_0++;
      gd_1456 = -1.0 * CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_M30);
      if (gd_1456 != 0.0) li_0++;
      gd_1464 = -1.0 * CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_M30);
      if (gd_1464 != 0.0) li_0++;
      gd_704 = -1.0 * CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_M30);
      if (gd_704 != 0.0) li_0++;
      gd_1120 = -1.0 * CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_M30);
      if (gd_1120 != 0.0) li_0++;
      gd_1472 = -1.0 * CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_M30);
      if (gd_1472 != 0.0) li_0++;
      gd_1480 = -1.0 * CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_M30);
      if (gd_1480 != 0.0) li_0++;
      if (li_0 != 0) gd_1632 = NormalizeDouble((gd_1448 + gd_1456 + gd_1464 + gd_704 + gd_1120 + gd_1472 + gd_1480) / li_0, 0);
   }
   if (HeatMapH1) {
      li_0 = 0;
      gd_1488 = CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_H1);
      if (gd_1488 != 0.0) li_0++;
      gd_1496 = -1.0 * CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_H1);
      if (gd_1496 != 0.0) li_0++;
      gd_1504 = -1.0 * CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_H1);
      if (gd_1504 != 0.0) li_0++;
      gd_760 = -1.0 * CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_H1);
      if (gd_760 != 0.0) li_0++;
      gd_1168 = -1.0 * CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_H1);
      if (gd_1168 != 0.0) li_0++;
      gd_1512 = -1.0 * CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_H1);
      if (gd_1512 != 0.0) li_0++;
      gd_1520 = -1.0 * CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_H1);
      if (gd_1520 != 0.0) li_0++;
      if (li_0 != 0) gd_1640 = NormalizeDouble((gd_1488 + gd_1496 + gd_1504 + gd_760 + gd_1168 + gd_1512 + gd_1520) / li_0, 0);
   }
   if (HeatMapH4) {
      li_0 = 0;
      gd_1528 = CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_H4);
      if (gd_1528 != 0.0) li_0++;
      gd_1536 = -1.0 * CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_H4);
      if (gd_1536 != 0.0) li_0++;
      gd_1544 = -1.0 * CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_H4);
      if (gd_1544 != 0.0) li_0++;
      gd_816 = -1.0 * CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_H4);
      if (gd_816 != 0.0) li_0++;
      gd_1216 = -1.0 * CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_H4);
      if (gd_1216 != 0.0) li_0++;
      gd_1552 = -1.0 * CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_H4);
      if (gd_1552 != 0.0) li_0++;
      gd_1560 = -1.0 * CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_H4);
      if (gd_1560 != 0.0) li_0++;
      if (li_0 != 0) gd_1648 = NormalizeDouble((gd_1528 + gd_1536 + gd_1544 + gd_816 + gd_1216 + gd_1552 + gd_1560) / li_0, 0);
   }
   if (HeatMapD1) {
      li_0 = 0;
      gd_1568 = CalculateStrengthPairsTF("CHFJPY"+SS, PERIOD_D1);
      if (gd_1568 != 0.0) li_0++;
      gd_1576 = -1.0 * CalculateStrengthPairsTF("NZDCHF"+SS, PERIOD_D1);
      if (gd_1576 != 0.0) li_0++;
      gd_1584 = -1.0 * CalculateStrengthPairsTF("USDCHF"+SS, PERIOD_D1);
      if (gd_1584 != 0.0) li_0++;
      gd_872 = -1.0 * CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_D1);
      if (gd_872 != 0.0) li_0++;
      gd_1264 = -1.0 * CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_D1);
      if (gd_1264 != 0.0) li_0++;
      gd_1592 = -1.0 * CalculateStrengthPairsTF("AUDCHF"+SS, PERIOD_D1);
      if (gd_1592 != 0.0) li_0++;
      gd_1600 = -1.0 * CalculateStrengthPairsTF("CADCHF"+SS, PERIOD_D1);
      if (gd_1600 != 0.0) li_0++;
      if (li_0 != 0) gd_1656 = NormalizeDouble((gd_1568 + gd_1576 + gd_1584 + gd_872 + gd_1264 + gd_1592 + gd_1600) / li_0, 0);
   }
   int li_4 = 0;
   gd_3248 = 0;
   if (gd_1608 != 0.0) li_4++;
   if (gd_1616 != 0.0) li_4++;
   if (gd_1624 != 0.0) li_4++;
   if (gd_1632 != 0.0) li_4++;
   if (gd_1640 != 0.0) li_4++;
   if (gd_1648 != 0.0) li_4++;
   if (gd_1656 != 0.0) li_4++;
   if (li_4 != 0) gd_3248 = (gd_1608 + gd_1616 + gd_1624 + gd_1632 + gd_1640 + gd_1648 + gd_1656) / li_4;
}

void CalculateMTFGBP() {
   int li_0 = 0;
   gd_1272 = 0;
   gd_1280 = 0;
   gd_1288 = 0;
   gd_1296 = 0;
   gd_1304 = 0;
   gd_1312 = 0;
   gd_1320 = 0;
   if (HeatMapM1) {
      gd_936 = CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_M1);
      if (gd_936 != 0.0) li_0++;
      gd_944 = CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_M1);
      if (gd_944 != 0.0) li_0++;
      gd_952 = CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_M1);
      if (gd_952 != 0.0) li_0++;
      gd_960 = CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_M1);
      if (gd_960 != 0.0) li_0++;
      gd_520 = -1.0 * CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_M1);
      if (gd_520 != 0.0) li_0++;
      gd_968 = CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_M1);
      if (gd_968 != 0.0) li_0++;
      gd_976 = CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_M1);
      if (gd_976 != 0.0) li_0++;
      if (li_0 != 0) gd_1272 = NormalizeDouble((gd_936 + gd_944 + gd_952 + gd_960 + gd_520 + gd_968 + gd_976) / li_0, 0);
   }
   if (HeatMapM5) {
      li_0 = 0;
      gd_984 = CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_M5);
      if (gd_984 != 0.0) li_0++;
      gd_992 = CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_M5);
      if (gd_992 != 0.0) li_0++;
      gd_1000 = CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_M5);
      if (gd_1000 != 0.0) li_0++;
      gd_1008 = CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_M5);
      if (gd_1008 != 0.0) li_0++;
      gd_576 = -1.0 * CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_M5);
      if (gd_576 != 0.0) li_0++;
      gd_1016 = CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_M5);
      if (gd_1016 != 0.0) li_0++;
      gd_1024 = CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_M5);
      if (gd_1024 != 0.0) li_0++;
      if (li_0 != 0) gd_1280 = NormalizeDouble((gd_984 + gd_992 + gd_1000 + gd_1008 + gd_576 + gd_1016 + gd_1024) / li_0, 0);
   }
   if (HeatMapM15) {
      li_0 = 0;
      gd_1032 = CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_M15);
      if (gd_1032 != 0.0) li_0++;
      gd_1040 = CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_M15);
      if (gd_1040 != 0.0) li_0++;
      gd_1048 = CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_M15);
      if (gd_1048 != 0.0) li_0++;
      gd_1056 = CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_M15);
      if (gd_1056 != 0.0) li_0++;
      gd_632 = -1.0 * CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_M15);
      if (gd_632 != 0.0) li_0++;
      gd_1064 = CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_M15);
      if (gd_1064 != 0.0) li_0++;
      gd_1072 = CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_M15);
      if (gd_1072 != 0.0) li_0++;
      if (li_0 != 0) gd_1288 = NormalizeDouble((gd_1032 + gd_1040 + gd_1048 + gd_1056 + gd_632 + gd_1064 + gd_1072) / li_0, 0);
   }
   if (HeatMapM30) {
      li_0 = 0;
      gd_1080 = CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_M30);
      if (gd_1080 != 0.0) li_0++;
      gd_1088 = CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_M30);
      if (gd_1088 != 0.0) li_0++;
      gd_1096 = CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_M30);
      if (gd_1096 != 0.0) li_0++;
      gd_1104 = CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_M30);
      if (gd_1104 != 0.0) li_0++;
      gd_688 = -1.0 * CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_M30);
      if (gd_688 != 0.0) li_0++;
      gd_1112 = CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_M30);
      if (gd_1112 != 0.0) li_0++;
      gd_1120 = CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_M30);
      if (gd_1120 != 0.0) li_0++;
      if (li_0 != 0) gd_1296 = NormalizeDouble((gd_1080 + gd_1088 + gd_1096 + gd_1104 + gd_688 + gd_1112 + gd_1120) / li_0, 0);
   }
   if (HeatMapH1) {
      li_0 = 0;
      gd_1128 = CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_H1);
      if (gd_1128 != 0.0) li_0++;
      gd_1136 = CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_H1);
      if (gd_1136 != 0.0) li_0++;
      gd_1144 = CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_H1);
      if (gd_1144 != 0.0) li_0++;
      gd_1152 = CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_H1);
      if (gd_1152 != 0.0) li_0++;
      gd_744 = -1.0 * CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_H1);
      if (gd_744 != 0.0) li_0++;
      gd_1160 = CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_H1);
      if (gd_1160 != 0.0) li_0++;
      gd_1168 = CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_H1);
      if (gd_1168 != 0.0) li_0++;
      if (li_0 != 0) gd_1304 = NormalizeDouble((gd_1128 + gd_1136 + gd_1144 + gd_1152 + gd_744 + gd_1160 + gd_1168) / li_0, 0);
   }
   if (HeatMapH4) {
      li_0 = 0;
      gd_1176 = CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_H4);
      if (gd_1176 != 0.0) li_0++;
      gd_1184 = CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_H4);
      if (gd_1184 != 0.0) li_0++;
      gd_1192 = CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_H4);
      if (gd_1192 != 0.0) li_0++;
      gd_1200 = CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_H4);
      if (gd_1200 != 0.0) li_0++;
      gd_800 = -1.0 * CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_H4);
      if (gd_800 != 0.0) li_0++;
      gd_1208 = CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_H4);
      if (gd_1208 != 0.0) li_0++;
      gd_1216 = CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_H4);
      if (gd_1216 != 0.0) li_0++;
      if (li_0 != 0) gd_1312 = NormalizeDouble((gd_1176 + gd_1184 + gd_1192 + gd_1200 + gd_800 + gd_1208 + gd_1216) / li_0, 0);
   }
   if (HeatMapD1) {
      li_0 = 0;
      gd_1224 = CalculateStrengthPairsTF("GBPJPY"+SS, PERIOD_D1);
      if (gd_1224 != 0.0) li_0++;
      gd_1232 = CalculateStrengthPairsTF("GBPNZD"+SS, PERIOD_D1);
      if (gd_1232 != 0.0) li_0++;
      gd_1240 = CalculateStrengthPairsTF("GBPUSD"+SS, PERIOD_D1);
      if (gd_1240 != 0.0) li_0++;
      gd_1248 = CalculateStrengthPairsTF("GBPCAD"+SS, PERIOD_D1);
      if (gd_1248 != 0.0) li_0++;
      gd_856 = -1.0 * CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_D1);
      if (gd_856 != 0.0) li_0++;
      gd_1256 = CalculateStrengthPairsTF("GBPAUD"+SS, PERIOD_D1);
      if (gd_1256 != 0.0) li_0++;
      gd_1264 = CalculateStrengthPairsTF("GBPCHF"+SS, PERIOD_D1);
      if (gd_1264 != 0.0) li_0++;
      if (li_0 != 0) gd_1320 = NormalizeDouble((gd_1224 + gd_1232 + gd_1240 + gd_1248 + gd_856 + gd_1256 + gd_1264) / li_0, 0);
   }
   int li_4 = 0;
   gd_3256 = 0;
   if (gd_1272 != 0.0) li_4++;
   if (gd_1280 != 0.0) li_4++;
   if (gd_1288 != 0.0) li_4++;
   if (gd_1296 != 0.0) li_4++;
   if (gd_1304 != 0.0) li_4++;
   if (gd_1312 != 0.0) li_4++;
   if (gd_1320 != 0.0) li_4++;
   if (li_4 != 0) gd_3256 = (gd_1272 + gd_1280 + gd_1288 + gd_1296 + gd_1304 + gd_1312 + gd_1320) / li_4;
}

void CalculateMTFEUR() {
   int li_0 = 0;
   gd_880 = 0;
   gd_888 = 0;
   gd_896 = 0;
   gd_904 = 0;
   gd_912 = 0;
   gd_920 = 0;
   gd_928 = 0;
   if (HeatMapM1) {
      gd_488 = CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_M1);
      if (gd_488 != 0.0) li_0++;
      gd_496 = CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_M1);
      if (gd_496 != 0.0) li_0++;
      gd_504 = CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_M1);
      if (gd_504 != 0.0) li_0++;
      gd_512 = CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_M1);
      if (gd_512 != 0.0) li_0++;
      gd_520 = CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_M1);
      if (gd_520 != 0.0) li_0++;
      gd_528 = CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_M1);
      if (gd_528 != 0.0) li_0++;
      gd_536 = CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_M1);
      if (gd_536 != 0.0) li_0++;
      if (li_0 != 0) gd_880 = NormalizeDouble((gd_488 + gd_496 + gd_504 + gd_512 + gd_520 + gd_528 + gd_536) / li_0, 0);
   }
   if (HeatMapM5) {
      li_0 = 0;
      gd_544 = CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_M5);
      if (gd_544 != 0.0) li_0++;
      gd_552 = CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_M5);
      if (gd_552 != 0.0) li_0++;
      gd_560 = CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_M5);
      if (gd_560 != 0.0) li_0++;
      gd_568 = CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_M5);
      if (gd_568 != 0.0) li_0++;
      gd_576 = CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_M5);
      if (gd_576 != 0.0) li_0++;
      gd_584 = CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_M5);
      if (gd_584 != 0.0) li_0++;
      gd_592 = CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_M5);
      if (gd_592 != 0.0) li_0++;
      if (li_0 != 0) gd_888 = NormalizeDouble((gd_544 + gd_552 + gd_560 + gd_568 + gd_576 + gd_584 + gd_592) / li_0, 0);
   }
   if (HeatMapM15) {
      li_0 = 0;
      gd_600 = CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_M15);
      if (gd_600 != 0.0) li_0++;
      gd_608 = CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_M15);
      if (gd_608 != 0.0) li_0++;
      gd_616 = CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_M15);
      if (gd_616 != 0.0) li_0++;
      gd_624 = CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_M15);
      if (gd_624 != 0.0) li_0++;
      gd_632 = CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_M15);
      if (gd_632 != 0.0) li_0++;
      gd_640 = CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_M15);
      if (gd_640 != 0.0) li_0++;
      gd_648 = CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_M15);
      if (gd_648 != 0.0) li_0++;
      if (li_0 != 0) gd_896 = NormalizeDouble((gd_600 + gd_608 + gd_616 + gd_624 + gd_632 + gd_640 + gd_648) / li_0, 0);
   }
   if (HeatMapM30) {
      li_0 = 0;
      gd_656 = CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_M30);
      if (gd_656 != 0.0) li_0++;
      gd_664 = CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_M30);
      if (gd_664 != 0.0) li_0++;
      gd_672 = CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_M30);
      if (gd_672 != 0.0) li_0++;
      gd_680 = CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_M30);
      if (gd_680 != 0.0) li_0++;
      gd_688 = CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_M30);
      if (gd_688 != 0.0) li_0++;
      gd_696 = CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_M30);
      if (gd_696 != 0.0) li_0++;
      gd_704 = CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_M30);
      if (gd_704 != 0.0) li_0++;
      if (li_0 != 0) gd_904 = NormalizeDouble((gd_656 + gd_664 + gd_672 + gd_680 + gd_688 + gd_696 + gd_704) / li_0, 0);
   }
   if (HeatMapH1) {
      li_0 = 0;
      gd_712 = CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_H1);
      if (gd_712 != 0.0) li_0++;
      gd_720 = CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_H1);
      if (gd_720 != 0.0) li_0++;
      gd_728 = CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_H1);
      if (gd_728 != 0.0) li_0++;
      gd_736 = CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_H1);
      if (gd_736 != 0.0) li_0++;
      gd_744 = CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_H1);
      if (gd_744 != 0.0) li_0++;
      gd_752 = CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_H1);
      if (gd_752 != 0.0) li_0++;
      gd_760 = CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_H1);
      if (gd_760 != 0.0) li_0++;
      if (li_0 != 0) gd_912 = NormalizeDouble((gd_712 + gd_720 + gd_728 + gd_736 + gd_744 + gd_752 + gd_760) / li_0, 0);
   }
   if (HeatMapH4) {
      li_0 = 0;
      gd_768 = CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_H4);
      if (gd_768 != 0.0) li_0++;
      gd_776 = CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_H4);
      if (gd_776 != 0.0) li_0++;
      gd_784 = CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_H4);
      if (gd_784 != 0.0) li_0++;
      gd_792 = CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_H4);
      if (gd_792 != 0.0) li_0++;
      gd_800 = CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_H4);
      if (gd_800 != 0.0) li_0++;
      gd_808 = CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_H4);
      if (gd_808 != 0.0) li_0++;
      gd_816 = CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_H4);
      if (gd_816 != 0.0) li_0++;
      if (li_0 != 0) gd_920 = NormalizeDouble((gd_768 + gd_776 + gd_784 + gd_792 + gd_800 + gd_808 + gd_816) / li_0, 0);
   }
   if (HeatMapD1) {
      li_0 = 0;
      gd_824 = CalculateStrengthPairsTF("EURJPY"+SS, PERIOD_D1);
      if (gd_824 != 0.0) li_0++;
      gd_832 = CalculateStrengthPairsTF("EURNZD"+SS, PERIOD_D1);
      if (gd_832 != 0.0) li_0++;
      gd_840 = CalculateStrengthPairsTF("EURUSD"+SS, PERIOD_D1);
      if (gd_840 != 0.0) li_0++;
      gd_848 = CalculateStrengthPairsTF("EURCAD"+SS, PERIOD_D1);
      if (gd_848 != 0.0) li_0++;
      gd_856 = CalculateStrengthPairsTF("EURGBP"+SS, PERIOD_D1);
      if (gd_856 != 0.0) li_0++;
      gd_864 = CalculateStrengthPairsTF("EURAUD"+SS, PERIOD_D1);
      if (gd_864 != 0.0) li_0++;
      gd_872 = CalculateStrengthPairsTF("EURCHF"+SS, PERIOD_D1);
      if (gd_872 != 0.0) li_0++;
      if (li_0 != 0) gd_928 = NormalizeDouble((gd_824 + gd_832 + gd_840 + gd_848 + gd_856 + gd_864 + gd_872) / li_0, 0);
   }
   int li_4 = 0;
   gd_3264 = 0;
   if (gd_880 != 0.0) li_4++;
   if (gd_888 != 0.0) li_4++;
   if (gd_896 != 0.0) li_4++;
   if (gd_904 != 0.0) li_4++;
   if (gd_912 != 0.0) li_4++;
   if (gd_920 != 0.0) li_4++;
   if (gd_928 != 0.0) li_4++;
   if (li_4 != 0) gd_3264 = (gd_880 + gd_888 + gd_896 + gd_904 + gd_912 + gd_920 + gd_928) / li_4;
}

void CalculateNASDQ() {if(!show_stocks)return;
   gd_408 = 0;
   CalculateStrengthPairs(stock2);
   if (gd_480 != 0.0) gd_408 = gd_480;
}

void CalculateAIG() {if(!show_stocks)return;
   gd_416 = 0;
   CalculateStrengthPairs(stock1);
   if (gd_480 != 0.0) gd_416 = gd_480;
}

void CalculateQQQ() {if(!show_stocks)return;
   gd_424 = 0;
   CalculateStrengthPairs(stock3);
   if (gd_480 != 0.0) gd_424 = gd_480;
}

void CalculateDIS() {if(!show_stocks)return;
   gd_472 = 0;
   CalculateStrengthPairs(stock9);
   if (gd_480 != 0.0) gd_472 = gd_480;
}

void CalculateGM() {if(!show_stocks)return;
   gd_464 = 0;
   CalculateStrengthPairs(stock8);
   if (gd_480 != 0.0) gd_464 = gd_480;
}

void CalculateINTC() {if(!show_stocks)return;
   gd_456 = 0;
   CalculateStrengthPairs(stock7);
   if (gd_480 != 0.0) gd_456 = gd_480;
}

void CalculateKO() {if(!show_stocks)return;
   gd_448 = 0;
   CalculateStrengthPairs(stock6);
   if (gd_480 != 0.0) gd_448 = gd_480;
}

void CalculateMSFT() {if(!show_stocks)return;
   gd_432 = 0;
   CalculateStrengthPairs(stock4);
   if (gd_480 != 0.0) gd_432 = gd_480;
}

void CalculateMCD() {if(!show_stocks)return;
   gd_440 = 0;
   CalculateStrengthPairs(stock5);
   if (gd_480 != 0.0) gd_440 = gd_480;
}

void CalculateSILVER() {if(!show_commodities)return;
   gd_400 = 0;
   CalculateStrengthPairs(_silver);
   if (gd_480 != 0.0) gd_400 = gd_480;
}

void CalculateGOLD() {if(!show_commodities)return;
   int li_0 = 0;
   gd_392 = 0;
   CalculateStrengthPairs(_gold);
   if (gd_480 != 0.0) {
      gd_392 = gd_480;
      li_0++;
   }
}

void CalculateUSD() {
   int li_0 = 0;
   double ld_4 = 0;
   double ld_12 = 0;
   double ld_20 = 0;
   double ld_28 = 0;
   double ld_36 = 0;
   double ld_44 = 0;
   double ld_52 = 0;
   CalculateStrengthPairs("AUDUSD"+SS);
   if (gd_480 != 0.0) {
      ld_4 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("USDCHF"+SS);
   if (gd_480 != 0.0) {
      ld_12 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("USDCAD"+SS);
   if (gd_480 != 0.0) {
      ld_20 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURUSD"+SS);
   if (gd_480 != 0.0) {
      ld_28 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPUSD"+SS);
   if (gd_480 != 0.0) {
      ld_36 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("USDJPY"+SS);
   if (gd_480 != 0.0) {
      ld_44 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("NZDUSD"+SS);
   if (gd_480 != 0.0) {
      ld_52 = -1.0 * gd_480;
      li_0++;
   }
   if (li_0 > 0) {
      gd_384 = (ld_4 + ld_12 + ld_20 + ld_28 + ld_36 + ld_44 + ld_52) / li_0;
      return;
   }
   gd_384 = 0;
}

void CalculateNZD() {
   int li_0 = 0;
   double ld_4 = 0;
   double ld_12 = 0;
   double ld_20 = 0;
   double ld_28 = 0;
   double ld_36 = 0;
   double ld_44 = 0;
   double ld_52 = 0;
   CalculateStrengthPairs("NZDJPY"+SS);
   if (gd_480 != 0.0) {
      ld_4 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPNZD"+SS);
   if (gd_480 != 0.0) {
      ld_12 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("NZDUSD"+SS);
   if (gd_480 != 0.0) {
      ld_20 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("NZDCAD"+SS);
   if (gd_480 != 0.0) {
      ld_28 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURNZD"+SS);
   if (gd_480 != 0.0) {
      ld_36 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("AUDNZD"+SS);
   if (gd_480 != 0.0) {
      ld_44 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("NZDCHF"+SS);
   if (gd_480 != 0.0) {
      ld_52 = gd_480;
      li_0++;
   }
   if (li_0 > 0) {
      gd_376 = (ld_4 + ld_12 + ld_20 + ld_28 + ld_36 + ld_44 + ld_52) / li_0;
      return;
   }
   gd_376 = 0;
}

void CalculateJPY() {
   int li_0 = 0;
   double ld_4 = 0;
   double ld_12 = 0;
   double ld_20 = 0;
   double ld_28 = 0;
   double ld_36 = 0;
   double ld_44 = 0;
   double ld_52 = 0;
   CalculateStrengthPairs("AUDJPY"+SS);
   if (gd_480 != 0.0) {
      ld_4 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("CHFJPY"+SS);
   if (gd_480 != 0.0) {
      ld_12 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("CADJPY"+SS);
   if (gd_480 != 0.0) {
      ld_20 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURJPY"+SS);
   if (gd_480 != 0.0) {
      ld_28 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPJPY"+SS);
   if (gd_480 != 0.0) {
      ld_36 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("NZDJPY"+SS);
   if (gd_480 != 0.0) {
      ld_44 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("USDJPY"+SS);
   if (gd_480 != 0.0) {
      ld_52 = -1.0 * gd_480;
      li_0++;
   }
   if (li_0 > 0) {
      gd_368 = (ld_4 + ld_12 + ld_20 + ld_28 + ld_36 + ld_44 + ld_52) / li_0;
      return;
   }
   gd_368 = 0;
}

void CalculateGBP() {
   int li_0 = 0;
   double ld_4 = 0;
   double ld_12 = 0;
   double ld_20 = 0;
   double ld_28 = 0;
   double ld_36 = 0;
   double ld_44 = 0;
   double ld_52 = 0;
   CalculateStrengthPairs("GBPJPY"+SS);
   if (gd_480 != 0.0) {
      ld_4 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPNZD"+SS);
   if (gd_480 != 0.0) {
      ld_12 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPUSD"+SS);
   if (gd_480 != 0.0) {
      ld_20 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPCAD"+SS);
   if (gd_480 != 0.0) {
      ld_28 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURGBP"+SS);
   if (gd_480 != 0.0) {
      ld_36 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPAUD"+SS);
   if (gd_480 != 0.0) {
      ld_44 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPCHF"+SS);
   if (gd_480 != 0.0) {
      ld_52 = gd_480;
      li_0++;
   }
   if (li_0 > 0) {
      gd_360 = (ld_4 + ld_12 + ld_20 + ld_28 + ld_36 + ld_44 + ld_52) / li_0;
      return;
   }
   gd_360 = 0;
}

void CalculateCAD() {
   int li_0 = 0;
   double ld_4 = 0;
   double ld_12 = 0;
   double ld_20 = 0;
   double ld_28 = 0;
   double ld_36 = 0;
   double ld_44 = 0;
   double ld_52 = 0;
   CalculateStrengthPairs("CADJPY"+SS);
   if (gd_480 != 0.0) {
      ld_4 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("NZDCAD"+SS);
   if (gd_480 != 0.0) {
      ld_12 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("USDCAD"+SS);
   if (gd_480 != 0.0) {
      ld_20 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURCAD"+SS);
   if (gd_480 != 0.0) {
      ld_28 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPCAD"+SS);
   if (gd_480 != 0.0) {
      ld_36 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("AUDCAD"+SS);
   if (gd_480 != 0.0) {
      ld_44 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("CADCHF"+SS);
   if (gd_480 != 0.0) {
      ld_52 = gd_480;
      li_0++;
   }
   if (li_0 > 0) {
      gd_344 = (ld_4 + ld_12 + ld_20 + ld_28 + ld_36 + ld_44 + ld_52) / li_0;
      return;
   }
   gd_344 = 0;
}

void CalculateCHF() {
   int li_0 = 0;
   double ld_4 = 0;
   double ld_12 = 0;
   double ld_20 = 0;
   double ld_28 = 0;
   double ld_36 = 0;
   double ld_44 = 0;
   double ld_52 = 0;
   CalculateStrengthPairs("CHFJPY"+SS);
   if (gd_480 != 0.0) {
      ld_4 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("NZDCHF"+SS);
   if (gd_480 != 0.0) {
      ld_12 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("USDCHF"+SS);
   if (gd_480 != 0.0) {
      ld_20 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURCHF"+SS);
   if (gd_480 != 0.0) {
      ld_28 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPCHF"+SS);
   if (gd_480 != 0.0) {
      ld_36 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("AUDCHF"+SS);
   if (gd_480 != 0.0) {
      ld_44 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("CADCHF"+SS);
   if (gd_480 != 0.0) {
      ld_52 = -1.0 * gd_480;
      li_0++;
   }
   if (li_0 > 0) {
      gd_336 = (ld_4 + ld_12 + ld_20 + ld_28 + ld_36 + ld_44 + ld_52) / li_0;
      return;
   }
   gd_336 = 0;
}

void CalculateAUD() {
   int li_0 = 0;
   double ld_4 = 0;
   double ld_12 = 0;
   double ld_20 = 0;
   double ld_28 = 0;
   double ld_36 = 0;
   double ld_44 = 0;
   double ld_52 = 0;
   CalculateStrengthPairs("AUDJPY"+SS);
   if (gd_480 != 0.0) {
      ld_4 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("AUDNZD"+SS);
   if (gd_480 != 0.0) {
      ld_12 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("AUDUSD"+SS);
   if (gd_480 != 0.0) {
      ld_20 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("AUDEUR");
   if (gd_480 != 0.0) {
      ld_28 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("GBPAUD"+SS);
   if (gd_480 != 0.0) {
      ld_36 = -1.0 * gd_480;
      li_0++;
   }
   CalculateStrengthPairs("AUDCHF"+SS);
   if (gd_480 != 0.0) {
      ld_44 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("AUDCAD"+SS);
   if (gd_480 != 0.0) {
      ld_52 = gd_480;
      li_0++;
   }
   if (li_0 > 0) {
      gd_328 = (ld_4 + ld_12 + ld_20 + ld_28 + ld_36 + ld_44 + ld_52) / li_0;
      return;
   }
   gd_328 = 0;
}

void CalculateEUR() {
   int li_0 = 0;
   double ld_4 = 0;
   double ld_12 = 0;
   double ld_20 = 0;
   double ld_28 = 0;
   double ld_36 = 0;
   double ld_44 = 0;
   double ld_52 = 0;
   CalculateStrengthPairs("EURJPY"+SS);
   if (gd_480 != 0.0) {
      ld_4 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURNZD"+SS);
   if (gd_480 != 0.0) {
      ld_12 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURUSD"+SS);
   if (gd_480 != 0.0) {
      ld_20 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURCAD"+SS);
   if (gd_480 != 0.0) {
      ld_28 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURGBP"+SS);
   if (gd_480 != 0.0) {
      ld_36 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURAUD"+SS);
   if (gd_480 != 0.0) {
      ld_44 = gd_480;
      li_0++;
   }
   CalculateStrengthPairs("EURCHF"+SS);
   if (gd_480 != 0.0) {
      ld_52 = gd_480;
      li_0++;
   }
   if (li_0 > 0) {
      gd_352 = (ld_4 + ld_12 + ld_20 + ld_28 + ld_36 + ld_44 + ld_52) / li_0;
      return;
   }
   gd_352 = 0;
}

void CalculateStrengthPairs(string as_0) {
   double ld_8;
   double ld_16;
   double ld_24;
   RefreshRates();
   int li_32 = MarketInfo(as_0, MODE_DIGITS);
   double ld_36 = NormalizeDouble(MarketInfo(as_0, MODE_BID), li_32);
   double ld_44 = NormalizeDouble(iMA(as_0, TF1, LookBack, gi_316, gi_320, gi_324, 0), li_32);
   double ld_52 = NormalizeDouble(iMA(as_0, TF2, LookBack, gi_316, gi_320, gi_324, 0), li_32);
   double ld_60 = NormalizeDouble(iMA(as_0, TF3, LookBack, gi_316, gi_320, gi_324, 0), li_32);
   double ld_68 = NormalizeDouble(iATR(as_0, TF1, LookBack, 0), 4);
   double ld_76 = NormalizeDouble(iATR(as_0, TF2, LookBack, 0), 4);
   double ld_84 = NormalizeDouble(iATR(as_0, TF3, LookBack, 0), 4);
   if (TF1 == 0) ld_68 = 0;
   if (TF2 == 0) ld_76 = 0;
   if (TF3 == 0) ld_84 = 0;
   int li_92 = 0;
   if (ld_68 > 0.0) {
      li_92++;
      ld_8 = 100.0 * NormalizeDouble(MathAbs(ld_36 - ld_44) / ld_68, 2);
      if (ld_36 < ld_44) ld_8 = -1.0 * ld_8;
   }
   if (ld_76 > 0.0) {
      li_92++;
      ld_16 = 100.0 * (MathAbs(ld_36 - ld_52) / ld_76);
      if (ld_36 < ld_52) ld_16 = -1.0 * ld_16;
   }
   if (ld_84 > 0.0) {
      li_92++;
      ld_24 = 100.0 * (MathAbs(ld_36 - ld_60) / ld_84);
      if (ld_36 < ld_60) ld_24 = -1.0 * ld_24;
   }
   if (li_92 > 0) {
      gd_480 = NormalizeDouble((ld_8 + ld_16 + ld_24) / li_92, 0);
      return;
   }
   gd_480 = 0;
}

double CalculateStrengthPairsTF(string as_0, int ai_8) {
   RefreshRates();
   int li_12 = MarketInfo(as_0, MODE_DIGITS);
   double ld_16 = NormalizeDouble(MarketInfo(as_0, MODE_BID), li_12);
   double ld_24 = NormalizeDouble(iMA(as_0, ai_8, LookBack, gi_316, gi_320, gi_324, 0), li_12);
   double ld_32 = NormalizeDouble(iATR(as_0, ai_8, LookBack, 0), 4);
   double ld_40 = 0;
   if (ld_32 > 0.0) {
      ld_40 = 100.0 * (MathAbs(ld_16 - ld_24) / ld_32);
      if (ld_16 < ld_24) ld_40 = -1.0 * ld_40;
   }
   return (ld_40);
}

void objectCreate(string as_0, int ai_8, int ai_12, string as_16 = "_", int ai_24 = 60, string as_28 = "Arial", color ai_36 = -1) {
   if (ai_24 == 60) ai_24 = 3 * FontSize;
   ObjectCreate(as_0, OBJ_LABEL, 0, 0, 0);
   ObjectSet(as_0, OBJPROP_CORNER, 0);
   ObjectSet(as_0, OBJPROP_COLOR, ai_36);
   ObjectSet(as_0, OBJPROP_XDISTANCE, ai_8);
   ObjectSet(as_0, OBJPROP_YDISTANCE, ai_12);
   ObjectSetText(as_0, as_16, ai_24, as_28, ai_36);
}

void objectCreateAvg(string as_0, int ai_8, int ai_12, string as_16 = "-", int ai_24 = 60, string as_28 = "Arial", color ai_36 = -1) {
   if (ai_24 == 60) ai_24 = 3 * FontSize;
   ObjectCreate(as_0, OBJ_LABEL, 0, 0, 0);
   ObjectSet(as_0, OBJPROP_CORNER, 0);
   ObjectSet(as_0, OBJPROP_COLOR, ai_36);
   ObjectSet(as_0, OBJPROP_XDISTANCE, ai_8);
   ObjectSet(as_0, OBJPROP_YDISTANCE, ai_12);
   ObjectSetText(as_0, as_16, ai_24, as_28, ai_36);
}

void initGraph() {
   ObjectsDeleteAll(0, OBJ_LABEL);
   int li_0 = gi_3280 + 4.25 * FontSize + 67.0 * (FontSize / 4.0);
   int li_4 = gi_3280 + 4.25 * FontSize;
   int li_8 = 50 * FontSize / 10;
   int li_12 = li_4;
   for (int li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("nzd_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("nzdtxt", li_8, li_12 + 9.5 * FontSize, "NZD", FontSize + 2, "Arial Narrow", White);
   objectCreate("nzdp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("nzd_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 115 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("aud_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("audtxt", li_8, li_12 + 9.5 * FontSize, "AUD", FontSize + 2, "Arial Narrow", White);
   objectCreate("audp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("aud_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 180 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("cad_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("cadtxt", li_8, li_12 + 9.5 * FontSize, "CAD", FontSize + 2, "Arial Narrow", White);
   objectCreate("cadp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("cad_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 245 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("chf_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("chftxt", li_8, li_12 + 9.5 * FontSize, "CHF", FontSize + 2, "Arial Narrow", White);
   objectCreate("chfp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("chf_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 310 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("gbp_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("gbptxt", li_8, li_12 + 9.5 * FontSize, "GBP", FontSize + 2, "Arial Narrow", White);
   objectCreate("gbpp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("gbp_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 375 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("eur_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("eurtxt", li_8, li_12 + 9.5 * FontSize, "EUR", FontSize + 2, "Arial Narrow", White);
   objectCreate("eurp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("eur_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 440 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("jpy_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("jpytxt", li_8, li_12 + 9.5 * FontSize, "JPY", FontSize + 2, "Arial Narrow", White);
   objectCreate("jpyp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("jpy_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 505 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("usd_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("usdtxt", li_8, li_12 + 9.5 * FontSize, "USD", FontSize + 2, "Arial Narrow", White);
   objectCreate("usdp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("usd_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   gd_3284 = (li_8 + 40 + FontSize) / 2;
   
   
    if(show_commodities)
   {
   li_8 = 590 * FontSize / 10;
   double ld_20 = li_8;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("gold_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("goldtxt", li_8, li_12 + 9.5 * FontSize, "GOLD", FontSize + 2, "Arial Narrow", White);
   objectCreate("goldp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("gold_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 660 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("silver_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("silvertxt", li_8, li_12 + 9.5 * FontSize, "SILVER", FontSize + 2, "Arial Narrow", White);
   objectCreate("silverp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("silver_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
    gd_3292 = (ld_20 + li_8) / 2.0;
   }
   
   
   if(show_stocks)
   {   
  
   li_8 = 735 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("#aig_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("#aigtxt", li_8, li_12 + 9.5 * FontSize, stock1, FontSize + 2, "Arial Narrow", White);
   objectCreate("#aigp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("#aig_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   double ld_28 = li_8;
   li_8 = 795 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("nasdq_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("nasdqtxt", li_8, li_12 + 9.5 * FontSize, stock2, FontSize + 2, "Arial Narrow", White);
   objectCreate("nasdqp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("nasdq_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 855 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("#qqq_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("#qqqtxt", li_8, li_12 + 9.5 * FontSize, stock3, FontSize + 2, "Arial Narrow", White);
   objectCreate("#qqqp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("#qqq_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 915 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("#msftsel_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("#msftseltxt", li_8, li_12 + 9.5 * FontSize, stock4, FontSize + 2, "Arial Narrow", White);
   objectCreate("#msftselp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("#msftsel_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   gd_3300 = (ld_28 + li_8) / 2.0;
   li_8 = 975 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("#mcd_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("#mcdtxt", li_8, li_12 + 9.5 * FontSize, stock5, FontSize + 2, "Arial Narrow", White);
   objectCreate("#mcdp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("#mcd_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   double ld_36 = li_8;
   li_8 = 1035 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("#ko_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("#kotxt", li_8, li_12 + 9.5 * FontSize, stock6, FontSize + 2, "Arial Narrow", White);
   objectCreate("#kop", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("#ko_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 1095 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("#intc_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("#intctxt", li_8, li_12 + 9.5 * FontSize, stock7, FontSize + 2, "Arial Narrow", White);
   objectCreate("#intcp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("#intc_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 1155 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("#gm_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("#gmtxt", li_8, li_12 + 9.5 * FontSize, stock8, FontSize + 2, "Arial Narrow", White);
   objectCreate("#gmp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("#gm_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   li_8 = 1210 * FontSize / 10;
   li_12 = li_4;
   for (li_16 = 67; li_16 >= 1; li_16--) {
      objectCreate("#dis_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   objectCreate("#distxt", li_8, li_12 + 9.5 * FontSize, stock9, FontSize + 2, "Arial Narrow", White);
   objectCreate("#disp", li_8, li_12 + 6.75 * FontSize, DoubleToStr(9, 1), FontSize + 2, "Arial Narrow", White);
   li_12 += 10 * FontSize;
   for (li_16 = 200; li_16 <= 266; li_16++) {
      objectCreate("#dis_" + li_16, li_8, li_12);
      li_12 = li_12 + FontSize / 4.0;
   }
   
   }
   
   gd_3308 = (ld_36 + li_8) / 2.0;
   gd_3316 = (ld_28 + li_8) / 2.0;
   li_0 = 46.25 * FontSize;
   li_8 = 50 * FontSize / 10;
   int li_44 = li_0 + 15.125 * FontSize;
   int li_48 = li_0 + 18.25 * FontSize;
   int li_52 = li_0 + 21.375 * FontSize;
   int li_56 = li_0 + 24.5 * FontSize;
   int li_60 = li_0 + 27.625 * FontSize;
   int li_64 = li_0 + 30.75 * FontSize;
   int li_68 = li_0 + 33.875 * FontSize;
   int li_72 = li_0 + 37 * FontSize;
   objectCreate("M1Avgtxt", li_8, li_44, "M1", FontSize + 2, "Arial Narrow", White);
   objectCreate("M5Avgtxt", li_8, li_48, "M5", FontSize + 2, "Arial Narrow", White);
   objectCreate("M15Avgtxt", li_8, li_52, "M15", FontSize + 2, "Arial Narrow", White);
   objectCreate("M30Avgtxt", li_8, li_56, "M30", FontSize + 2, "Arial Narrow", White);
   objectCreate("H1Avgtxt", li_8, li_60, "H1", FontSize + 2, "Arial Narrow", White);
   objectCreate("H4Avgtxt", li_8, li_64, "H4", FontSize + 2, "Arial Narrow", White);
   objectCreate("D1Avgtxt", li_8, li_68, "D1", FontSize + 2, "Arial Narrow", White);
   objectCreate("TotAvgtxt", li_8, li_72, "AVG", FontSize + 2, "Arial Narrow", White);
   li_8 = 100 * FontSize / 10;
   li_0 += 12.5 * FontSize;
   objectCreate("nzdAvgtxt", li_8, li_0, "NZD", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_nzd_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_nzd_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_nzd_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_nzd_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_nzd_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_nzd_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_nzd_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_nzd_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_nzdVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_nzdVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_nzdVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_nzdVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_nzdVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_nzdVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_nzdVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_nzdVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 6.25 * FontSize;
   objectCreate("audAvgtxt", li_8, li_0, "AUD", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_aud_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_aud_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_aud_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_aud_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_aud_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_aud_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_aud_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_aud_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_audVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_audVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_audVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_audVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_audVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_audVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_audVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_audVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 12.5 * FontSize;
   objectCreate("cadAvgtxt", li_8, li_0, "CAD", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_cad_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_cad_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_cad_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_cad_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_cad_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_cad_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_cad_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_cad_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_cadVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_cadVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_cadVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_cadVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_cadVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_cadVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_cadVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_cadVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 18.75 * FontSize;
   objectCreate("chfAvgtxt", li_8, li_0, "CHF", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_chf_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_chf_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_chf_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_chf_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_chf_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_chf_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_chf_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_chf_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_chfVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_chfVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_chfVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_chfVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_chfVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_chfVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_chfVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_chfVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 31.25 * FontSize;
   objectCreate("eurAvgtxt", li_8, li_0, "EUR", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_eur_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_eur_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_eur_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_eur_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_eur_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_eur_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_eur_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_eur_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_eurVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_eurVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_eurVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_eurVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_eurVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_eurVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_eurVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_eurVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 37.5 * FontSize;
   objectCreate("jpyAvgtxt", li_8, li_0, "JPY", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_jpy_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_jpy_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_jpy_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_jpy_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_jpy_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_jpy_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_jpy_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_jpy_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_jpyVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_jpyVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_jpyVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_jpyVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_jpyVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_jpyVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_jpyVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_jpyVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 25 * FontSize;
   objectCreate("gbpAvgtxt", li_8, li_0, "GBP", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_gbp_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_gbp_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_gbp_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_gbp_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_gbp_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_gbp_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_gbp_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_gbp_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_gbpVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_gbpVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_gbpVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_gbpVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_gbpVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_gbpVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_gbpVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_gbpVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 43.75 * FontSize;
   objectCreate("usdAvgtxt", li_8, li_0, "USD", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_usd_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_usd_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_usd_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_usd_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_usd_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_usd_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_usd_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_usd_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_usdVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_usdVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_usdVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_usdVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_usdVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_usdVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_usdVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_usdVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 50 * FontSize;
   
    if(show_commodities)
   {
   objectCreate("goldAvgtxt", li_8, li_0, "GOLD", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_gold_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_gold_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_gold_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_gold_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_gold_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_gold_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_gold_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_gold_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_goldVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_goldVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_goldVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_goldVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_goldVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_goldVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_goldVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_goldVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 56.25 * FontSize;
   objectCreate("silverAvgtxt", li_8, li_0, "SILVER", FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_silver_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_silver_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_silver_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_silver_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_silver_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_silver_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_silver_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_silver_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_silverVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_silverVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_silverVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_silverVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_silverVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_silverVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_silverVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_silverVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   
   }
   
   
   if(show_stocks)
   {
   li_8 = 100 * FontSize / 10 + 62.5 * FontSize;
   objectCreate("#aigAvgtxt", li_8, li_0, stock1, FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_#aig_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_#aig_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_#aig_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_#aig_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_#aig_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_#aig_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_#aig_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_#aig_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_#aigVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_#aigVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_#aigVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_#aigVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_#aigVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_#aigVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_#aigVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_#aigVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 68.75 * FontSize;
   objectCreate("#axpAvgtxt", li_8, li_0, stock2, FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_#axp_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_#axp_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_#axp_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_#axp_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_#axp_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_#axp_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_#axp_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_#axp_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_#axpVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_#axpVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_#axpVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_#axpVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_#axpVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_#axpVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_#axpVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_#axpVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 75 * FontSize;
   objectCreate("#qqqAvgtxt", li_8, li_0, stock3, FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_#qqq_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_#qqq_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_#qqq_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_#qqq_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_#qqq_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_#qqq_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_#qqq_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_#qqq_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_#qqqVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_#qqqVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_#qqqVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_#qqqVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_#qqqVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_#qqqVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_#qqqVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_#qqqVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 81.25 * FontSize;
   objectCreate("#msftAvgtxt", li_8, li_0, stock4, FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_#msft_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_#msft_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_#msft_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_#msft_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_#msft_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_#msft_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_#msft_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_#msft_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_#msftVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_#msftVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_#msftVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_#msftVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_#msftVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_#msftVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_#msftVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_#msftVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 87.5 * FontSize;
   objectCreate("#mcdAvgtxt", li_8, li_0, stock5, FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_#mcd_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_#mcd_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_#mcd_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_#mcd_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_#mcd_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_#mcd_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_#mcd_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_#mcd_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_#mcdVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_#mcdVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_#mcdVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_#mcdVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_#mcdVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_#mcdVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_#mcdVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_#mcdVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 93.75 * FontSize;
   objectCreate("#koAvgtxt", li_8, li_0, stock6, FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_#ko_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_#ko_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_#ko_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_#ko_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_#ko_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_#ko_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_#ko_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_#ko_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_#koVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_#koVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_#koVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_#koVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_#koVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_#koVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_#koVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_#koVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 100 * FontSize;
   objectCreate("#intcAvgtxt", li_8, li_0, stock7, FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_#intc_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_#intc_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_#intc_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_#intc_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_#intc_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_#intc_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_#intc_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_#intc_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_#intcVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_#intcVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_#intcVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_#intcVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_#intcVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_#intcVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_#intcVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_#intcVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 106.25 * FontSize;
   objectCreate("#gmAvgtxt", li_8, li_0, stock8, FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_#gm_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_#gm_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_#gm_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_#gm_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_#gm_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_#gm_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_#gm_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_#gm_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_#gmVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_#gmVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_#gmVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_#gmVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_#gmVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_#gmVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_#gmVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_#gmVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   li_8 = 100 * FontSize / 10 + 112.5 * FontSize;
   objectCreate("#disAvgtxt", li_8, li_0, stock9, FontSize + 2, "Arial Narrow", White);
   li_12 = li_0;
   for (li_16 = 1; li_16 <= 7; li_16++) {
      objectCreateAvg("M1_#dis_" + li_16, li_8, li_12, "__", 60, "Arial", White);
      objectCreateAvg("M5_#dis_" + li_16, li_8, li_12 + FontSize / 0.32, "__", 60, "Arial", White);
      objectCreateAvg("M15_#dis_" + li_16, li_8, li_12 + 6.25 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("M30_#dis_" + li_16, li_8, li_12 + 9.375 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H1_#dis_" + li_16, li_8, li_12 + 12.5 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("H4_#dis_" + li_16, li_8, li_12 + FontSize / 0.064, "__", 60, "Arial", White);
      objectCreateAvg("D1_#dis_" + li_16, li_8, li_12 + 18.75 * FontSize, "__", 60, "Arial", White);
      objectCreateAvg("totavg_#dis_" + li_16, li_8, li_12 + 21.875 * FontSize, "__", 60, "Arial", White);
      li_12 = li_12 - FontSize / 4.0;
   }
   objectCreate("M1_#disVal_", li_8 + 3, li_44, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M5_#disVal_", li_8 + 3, li_48, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M15_#disVal_", li_8 + 3, li_52, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("M30_#disVal_", li_8 + 3, li_56, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H1_#disVal_", li_8 + 3, li_60, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("H4_#disVal_", li_8 + 3, li_64, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("D1_#disVal_", li_8 + 3, li_68, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   objectCreate("totavg_#disVal_", li_8 + 3, li_72, DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
}
}

void objectBlank() {
   for (int li_0 = 1; li_0 <= 67; li_0++) {
      ObjectSetBlank("usd_" + li_0);
      ObjectSetBlank("aud_" + li_0);
      ObjectSetBlank("chf_" + li_0);
      ObjectSetBlank("cad_" + li_0);
      ObjectSetBlank("eur_" + li_0);
      ObjectSetBlank("gbp_" + li_0);
      ObjectSetBlank("jpy_" + li_0);
      ObjectSetBlank("nzd_" + li_0);
      ObjectSetBlank("gold_" + li_0);
      ObjectSetBlank("silver_" + li_0);
      ObjectSetBlank("#aig_" + li_0);
      ObjectSetBlank("nasdq_" + li_0);
      ObjectSetBlank("#qqq_" + li_0);
      ObjectSetBlank("#msftsel_" + li_0);
      ObjectSetBlank("#mcd_" + li_0);
      ObjectSetBlank("#ko_" + li_0);
      ObjectSetBlank("#intc_" + li_0);
      ObjectSetBlank("#gm_" + li_0);
      ObjectSetBlank("#dis_" + li_0);
   }
   for (li_0 = 200; li_0 <= 266; li_0++) {
      ObjectSetBlank("usd_" + li_0);
      ObjectSetBlank("aud_" + li_0);
      ObjectSetBlank("chf_" + li_0);
      ObjectSetBlank("cad_" + li_0);
      ObjectSetBlank("eur_" + li_0);
      ObjectSetBlank("gbp_" + li_0);
      ObjectSetBlank("jpy_" + li_0);
      ObjectSetBlank("nzd_" + li_0);
      ObjectSetBlank("gold_" + li_0);
      ObjectSetBlank("silver_" + li_0);
      ObjectSetBlank("#aig_" + li_0);
      ObjectSetBlank("nasdq_" + li_0);
      ObjectSetBlank("#qqq_" + li_0);
      ObjectSetBlank("#msftsel_" + li_0);
      ObjectSetBlank("#mcd_" + li_0);
      ObjectSetBlank("#ko_" + li_0);
      ObjectSetBlank("#intc_" + li_0);
      ObjectSetBlank("#gm_" + li_0);
      ObjectSetBlank("#dis_" + li_0);
   }
   for (li_0 = 1; li_0 <= 7; li_0++) {
      ObjectSetWhite("M1_eur_" + li_0);
      ObjectSetWhite("M5_eur_" + li_0);
      ObjectSetWhite("M15_eur_" + li_0);
      ObjectSetWhite("M30_eur_" + li_0);
      ObjectSetWhite("H1_eur_" + li_0);
      ObjectSetWhite("H4_eur_" + li_0);
      ObjectSetWhite("D1_eur_" + li_0);
      ObjectSetWhite("M1_gbp_" + li_0);
      ObjectSetWhite("M5_gbp_" + li_0);
      ObjectSetWhite("M15_gbp_" + li_0);
      ObjectSetWhite("M30_gbp_" + li_0);
      ObjectSetWhite("H1_gbp_" + li_0);
      ObjectSetWhite("H4_gbp_" + li_0);
      ObjectSetWhite("D1_gbp_" + li_0);
      ObjectSetWhite("M1_chf_" + li_0);
      ObjectSetWhite("M5_chf_" + li_0);
      ObjectSetWhite("M15_chf_" + li_0);
      ObjectSetWhite("M30_chf_" + li_0);
      ObjectSetWhite("H1_chf_" + li_0);
      ObjectSetWhite("H4_chf_" + li_0);
      ObjectSetWhite("D1_chf_" + li_0);
      ObjectSetWhite("M1_aud_" + li_0);
      ObjectSetWhite("M5_aud_" + li_0);
      ObjectSetWhite("M15_aud_" + li_0);
      ObjectSetWhite("M30_aud_" + li_0);
      ObjectSetWhite("H1_aud_" + li_0);
      ObjectSetWhite("H4_aud_" + li_0);
      ObjectSetWhite("D1_aud_" + li_0);
      ObjectSetWhite("M1_nzd_" + li_0);
      ObjectSetWhite("M5_nzd_" + li_0);
      ObjectSetWhite("M15_nzd_" + li_0);
      ObjectSetWhite("M30_nzd_" + li_0);
      ObjectSetWhite("H1_nzd_" + li_0);
      ObjectSetWhite("H4_nzd_" + li_0);
      ObjectSetWhite("D1_nzd_" + li_0);
      ObjectSetWhite("M1_cad_" + li_0);
      ObjectSetWhite("M5_cad_" + li_0);
      ObjectSetWhite("M15_cad_" + li_0);
      ObjectSetWhite("M30_cad_" + li_0);
      ObjectSetWhite("H1_cad_" + li_0);
      ObjectSetWhite("H4_cad_" + li_0);
      ObjectSetWhite("D1_cad_" + li_0);
      ObjectSetWhite("M1_usd_" + li_0);
      ObjectSetWhite("M5_usd_" + li_0);
      ObjectSetWhite("M15_usd_" + li_0);
      ObjectSetWhite("M30_usd_" + li_0);
      ObjectSetWhite("H1_usd_" + li_0);
      ObjectSetWhite("H4_usd_" + li_0);
      ObjectSetWhite("D1_usd_" + li_0);
      ObjectSetWhite("M1_jpy_" + li_0);
      ObjectSetWhite("M5_jpy_" + li_0);
      ObjectSetWhite("M15_jpy_" + li_0);
      ObjectSetWhite("M30_jpy_" + li_0);
      ObjectSetWhite("H1_jpy_" + li_0);
      ObjectSetWhite("H4_jpy_" + li_0);
      ObjectSetWhite("D1_jpy_" + li_0);
      ObjectSetWhite("M1_gold_" + li_0);
      ObjectSetWhite("M5_gold_" + li_0);
      ObjectSetWhite("M15_gold_" + li_0);
      ObjectSetWhite("M30_gold_" + li_0);
      ObjectSetWhite("H1_gold_" + li_0);
      ObjectSetWhite("H4_gold_" + li_0);
      ObjectSetWhite("D1_gold_" + li_0);
      ObjectSetWhite("M1_silver_" + li_0);
      ObjectSetWhite("M5_silver_" + li_0);
      ObjectSetWhite("M15_silver_" + li_0);
      ObjectSetWhite("M30_silver_" + li_0);
      ObjectSetWhite("H1_silver_" + li_0);
      ObjectSetWhite("H4_silver_" + li_0);
      ObjectSetWhite("D1_silver_" + li_0);
      ObjectSetWhite("M1_#aig_" + li_0);
      ObjectSetWhite("M5_#aig_" + li_0);
      ObjectSetWhite("M15_#aig_" + li_0);
      ObjectSetWhite("M30_#aig_" + li_0);
      ObjectSetWhite("H1_#aig_" + li_0);
      ObjectSetWhite("H4_#aig_" + li_0);
      ObjectSetWhite("D1_#aig_" + li_0);
      ObjectSetWhite("M1_nasdq_" + li_0);
      ObjectSetWhite("M5_nasdq_" + li_0);
      ObjectSetWhite("M15_nasdq_" + li_0);
      ObjectSetWhite("M30_nasdq_" + li_0);
      ObjectSetWhite("H1_nasdq_" + li_0);
      ObjectSetWhite("H4_nasdq_" + li_0);
      ObjectSetWhite("D1_nasdq_" + li_0);
      ObjectSetWhite("M1_#qqq_" + li_0);
      ObjectSetWhite("M5_#qqq_" + li_0);
      ObjectSetWhite("M15_#qqq_" + li_0);
      ObjectSetWhite("M30_#qqq_" + li_0);
      ObjectSetWhite("H1_#qqq_" + li_0);
      ObjectSetWhite("H4_#qqq_" + li_0);
      ObjectSetWhite("D1_#qqq_" + li_0);
      ObjectSetWhite("M1_#msft_" + li_0);
      ObjectSetWhite("M5_#msft_" + li_0);
      ObjectSetWhite("M15_#msft_" + li_0);
      ObjectSetWhite("M30_#msft_" + li_0);
      ObjectSetWhite("H1_#msft_" + li_0);
      ObjectSetWhite("H4_#msft_" + li_0);
      ObjectSetWhite("D1_#msft_" + li_0);
      ObjectSetWhite("M1_#mcd_" + li_0);
      ObjectSetWhite("M5_#mcd_" + li_0);
      ObjectSetWhite("M15_#mcd_" + li_0);
      ObjectSetWhite("M30_#mcd_" + li_0);
      ObjectSetWhite("H1_#mcd_" + li_0);
      ObjectSetWhite("H4_#mcd_" + li_0);
      ObjectSetWhite("D1_#mcd_" + li_0);
      ObjectSetWhite("M1_#ko_" + li_0);
      ObjectSetWhite("M5_#ko_" + li_0);
      ObjectSetWhite("M15_#ko_" + li_0);
      ObjectSetWhite("M30_#ko_" + li_0);
      ObjectSetWhite("H1_#ko_" + li_0);
      ObjectSetWhite("H4_#ko_" + li_0);
      ObjectSetWhite("D1_#ko_" + li_0);
      ObjectSetWhite("M1_#intc_" + li_0);
      ObjectSetWhite("M5_#intc_" + li_0);
      ObjectSetWhite("M15_#intc_" + li_0);
      ObjectSetWhite("M30_#intc_" + li_0);
      ObjectSetWhite("H1_#intc_" + li_0);
      ObjectSetWhite("H4_#intc_" + li_0);
      ObjectSetWhite("D1_#intc_" + li_0);
      ObjectSetWhite("M1_#gm_" + li_0);
      ObjectSetWhite("M5_#gm_" + li_0);
      ObjectSetWhite("M15_#gm_" + li_0);
      ObjectSetWhite("M30_#gm_" + li_0);
      ObjectSetWhite("H1_#gm_" + li_0);
      ObjectSetWhite("H4_#gm_" + li_0);
      ObjectSetWhite("D1_#gm_" + li_0);
      ObjectSetWhite("M1_#dis_" + li_0);
      ObjectSetWhite("M5_#dis_" + li_0);
      ObjectSetWhite("M15_#dis_" + li_0);
      ObjectSetWhite("M30_#dis_" + li_0);
      ObjectSetWhite("H1_#dis_" + li_0);
      ObjectSetWhite("H4_#dis_" + li_0);
      ObjectSetWhite("D1_#dis_" + li_0);
   }
   ObjectSetText("M1_eurVal_", DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   ObjectSetText("M5_eurVal_", DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   ObjectSetText("M15_eurVal_", DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   ObjectSetText("M30_eurVal_", DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   ObjectSetText("H1_eurVal_", DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   ObjectSetText("H4_eurVal_", DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   ObjectSetText("D1_eurVal_", DoubleToStr(0, 0), FontSize + 3, "Arial", Black);
   ObjectSet("usdtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("usdp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("audtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("audp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("chftxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("chfp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("cadtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("cadp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("eurtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("eurp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("gbptxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("gbpp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("jpytxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("jpyp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("nzdtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("nzdp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("goldtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("goldp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("silvertxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("silverp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#aigtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#aigp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("nasdqtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("nasdqp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#qqqtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#qqqp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#msftseltxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#msftselp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#mcdtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#mcdp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#kotxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#kop", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#intctxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#intcp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#gmtxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#gmp", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#distxt", OBJPROP_COLOR, CLR_NONE);
   ObjectSet("#disp", OBJPROP_COLOR, CLR_NONE);
}

void ObjectSetBlank(string as_0) {
   ObjectSet(as_0, OBJPROP_COLOR, CLR_NONE);
}

void ObjectSetWhite(string as_0) {
   ObjectSet(as_0, OBJPROP_COLOR, White);
}

void paint(string as_0, double ad_8) {
   color li_16;
   string ls_20 = "";
   if (as_0 == "AUD") ls_20 = "aud";
   if (as_0 == "CHF") ls_20 = "chf";
   if (as_0 == "CAD") ls_20 = "cad";
   if (as_0 == "EUR") ls_20 = "eur";
   if (as_0 == "GBP") ls_20 = "gbp";
   if (as_0 == "JPY") ls_20 = "jpy";
   if (as_0 == "NZD") ls_20 = "nzd";
   if (as_0 == "USD") ls_20 = "usd";
   if (as_0 == "GOLD") ls_20 = "gold";
   if (as_0 == "SILVER") ls_20 = "silver";
   if (as_0 == stock1) ls_20 = "#aig";
   if (as_0 == stock2) ls_20 = "nasdq";
   if (as_0 == stock3) ls_20 = "#qqq";
   if (as_0 == stock4) ls_20 = "#msftsel";
   if (as_0 == stock5) ls_20 = "#mcd";
   if (as_0 == stock6) ls_20 = "#ko";
   if (as_0 == stock7) ls_20 = "#intc";
   if (as_0 == stock8) ls_20 = "#gm";
   if (as_0 == stock9) ls_20 = "#dis";
   bool li_28 = FALSE;
   int li_32 = 0;
   if (ad_8 > 0.0) {
      if (ad_8 <= 25.0) li_16 = White;
      else {
         if (ad_8 <= 50.0) li_16 = Gray;
         else {
            if (ad_8 <= 75.0) li_16 = LightSkyBlue;
            else {
               if (ad_8 <= 100.0) li_16 = RoyalBlue;
               else li_16 = Lime;
            }
         }
      }
      li_28 = MathMod(ad_8, 3);
      li_32 = (ad_8 - li_28) / 3.0 + 1.0;
      if (li_32 > 67) li_32 = 67;
      for (int li_36 = 1; li_36 <= li_32; li_36++) ObjectSet(ls_20 + "_" + li_36, OBJPROP_COLOR, li_16);
   } else {
      if (ad_8 < 0.0) {
         if (ad_8 >= -25.0) li_16 = Yellow;
         else {
            if (ad_8 >= -50.0) li_16 = Orange;
            else {
               if (ad_8 >= -75.0) li_16 = Sienna;
               else {
                  if (ad_8 >= -100.0) li_16 = MediumVioletRed;
                  else li_16 = Red;
               }
            }
         }
         li_28 = MathMod(MathAbs(ad_8), 3);
         li_32 = (MathAbs(ad_8) - li_28) / 3.0 + 1.0;
         if (li_32 > 66) li_32 = 66;
         for (li_36 = 200; li_36 <= li_32 + 199; li_36++) ObjectSet(ls_20 + "_" + li_36, OBJPROP_COLOR, li_16);
      }
   }
   if ((as_0 == "AUD" && ad_8 <= AUDLowerLevel) || (as_0 == "CHF" && ad_8 <= CHFLowerLevel) || (as_0 == "CAD" && ad_8 <= CADLowerLevel) || (as_0 == "EUR" && ad_8 <= EURLowerLevel) ||
      (as_0 == "GBP" && ad_8 <= GBPLowerLevel) || (as_0 == "JPY" && ad_8 <= JPYLowerLevel) || (as_0 == "NZD" && ad_8 <= NZDLowerLevel) || (as_0 == "USD" && ad_8 <= USDLowerLevel)) {
      ObjectSet(ls_20 + "txt", OBJPROP_COLOR, Red);
      ObjectSetText(ls_20 + "p", DoubleToStr(ad_8, 0) + "%", FontSize + 2, "Arial Narrow", Red);
      if (IsValidTT(AlertsStartTime, AlertsEndTime)) {
         if (TimeCurrent() > gi_3324 + AlarmsDelay) {
            if (EnableAlarms || EnableEmail) {
               if (EnableAlarms) {
                  Alert("Alert " + as_0 + " < Lower Level! (" + DoubleToStr(ad_8, 0) + ")");
                  
               }
               if (EnableEmail) SendMail("Dashboard Alert", "Alert " + as_0 + " < (" + DoubleToStr(ad_8, 0) + ")");
               gi_3328 = TRUE;
            }
         }
      }
   } else {
      if ((as_0 == "AUD" && ad_8 >= AUDUpperLevel) || (as_0 == "CHF" && ad_8 >= CHFUpperLevel) || (as_0 == "CAD" && ad_8 >= CADUpperLevel) || (as_0 == "EUR" && ad_8 >= EURUpperLevel) ||
         (as_0 == "GBP" && ad_8 >= GBPUpperLevel) || (as_0 == "JPY" && ad_8 >= JPYUpperLevel) || (as_0 == "NZD" && ad_8 >= NZDUpperLevel) || (as_0 == "USD" && ad_8 >= USDUpperLevel)) {
         ObjectSet(ls_20 + "txt", OBJPROP_COLOR, Lime);
         ObjectSetText(ls_20 + "p", DoubleToStr(ad_8, 0) + "%", FontSize + 2, "Arial Narrow", Lime);
         if (IsValidTT(AlertsStartTime, AlertsEndTime)) {
            if (TimeCurrent() > gi_3324 + AlarmsDelay) {
               if (EnableAlarms || EnableEmail) {
                  if (EnableAlarms) {
                     Alert("Alert " + as_0 + " > Upper Level! (" + DoubleToStr(ad_8, 0) + ")");
                     
                  }
                  if (EnableEmail) SendMail("Dashboard Alert", "Alert " + as_0 + " > Upper Level! (" + DoubleToStr(ad_8, 0) + ")");
                  gi_3328 = TRUE;
               }
            }
         }
      } else {
         ObjectSet(ls_20 + "txt", OBJPROP_COLOR, White);
         ObjectSetText(ls_20 + "p", DoubleToStr(ad_8, 0) + "%", FontSize + 2, "Arial Narrow", White);
      }
   }
}

void paintAvg(string as_0, double ad_8) {
   color li_16;
   string ls_20 = "";
   if (as_0 == "M1_eur") ls_20 = "M1_eur";
   if (as_0 == "M5_eur") ls_20 = "M5_eur";
   if (as_0 == "M15_eur") ls_20 = "M15_eur";
   if (as_0 == "M30_eur") ls_20 = "M30_eur";
   if (as_0 == "H1_eur") ls_20 = "H1_eur";
   if (as_0 == "H4_eur") ls_20 = "H4_eur";
   if (as_0 == "D1_eur") ls_20 = "D1_eur";
   if (as_0 == "M1_gbp") ls_20 = "M1_gbp";
   if (as_0 == "M5_gbp") ls_20 = "M5_gbp";
   if (as_0 == "M15_gbp") ls_20 = "M15_gbp";
   if (as_0 == "M30_gbp") ls_20 = "M30_gbp";
   if (as_0 == "H1_gbp") ls_20 = "H1_gbp";
   if (as_0 == "H4_gbp") ls_20 = "H4_gbp";
   if (as_0 == "D1_gbp") ls_20 = "D1_gbp";
   if (as_0 == "M1_chf") ls_20 = "M1_chf";
   if (as_0 == "M5_chf") ls_20 = "M5_chf";
   if (as_0 == "M15_chf") ls_20 = "M15_chf";
   if (as_0 == "M30_chf") ls_20 = "M30_chf";
   if (as_0 == "H1_chf") ls_20 = "H1_chf";
   if (as_0 == "H4_chf") ls_20 = "H4_chf";
   if (as_0 == "D1_chf") ls_20 = "D1_chf";
   if (as_0 == "M1_aud") ls_20 = "M1_aud";
   if (as_0 == "M5_aud") ls_20 = "M5_aud";
   if (as_0 == "M15_aud") ls_20 = "M15_aud";
   if (as_0 == "M30_aud") ls_20 = "M30_aud";
   if (as_0 == "H1_aud") ls_20 = "H1_aud";
   if (as_0 == "H4_aud") ls_20 = "H4_aud";
   if (as_0 == "D1_aud") ls_20 = "D1_aud";
   if (as_0 == "M1_nzd") ls_20 = "M1_nzd";
   if (as_0 == "M5_nzd") ls_20 = "M5_nzd";
   if (as_0 == "M15_nzd") ls_20 = "M15_nzd";
   if (as_0 == "M30_nzd") ls_20 = "M30_nzd";
   if (as_0 == "H1_nzd") ls_20 = "H1_nzd";
   if (as_0 == "H4_nzd") ls_20 = "H4_nzd";
   if (as_0 == "D1_nzd") ls_20 = "D1_nzd";
   if (as_0 == "M1_cad") ls_20 = "M1_cad";
   if (as_0 == "M5_cad") ls_20 = "M5_cad";
   if (as_0 == "M15_cad") ls_20 = "M15_cad";
   if (as_0 == "M30_cad") ls_20 = "M30_cad";
   if (as_0 == "H1_cad") ls_20 = "H1_cad";
   if (as_0 == "H4_cad") ls_20 = "H4_cad";
   if (as_0 == "D1_cad") ls_20 = "D1_cad";
   if (as_0 == "M1_usd") ls_20 = "M1_usd";
   if (as_0 == "M5_usd") ls_20 = "M5_usd";
   if (as_0 == "M15_usd") ls_20 = "M15_usd";
   if (as_0 == "M30_usd") ls_20 = "M30_usd";
   if (as_0 == "H1_usd") ls_20 = "H1_usd";
   if (as_0 == "H4_usd") ls_20 = "H4_usd";
   if (as_0 == "D1_usd") ls_20 = "D1_usd";
   if (as_0 == "M1_jpy") ls_20 = "M1_jpy";
   if (as_0 == "M5_jpy") ls_20 = "M5_jpy";
   if (as_0 == "M15_jpy") ls_20 = "M15_jpy";
   if (as_0 == "M30_jpy") ls_20 = "M30_jpy";
   if (as_0 == "H1_jpy") ls_20 = "H1_jpy";
   if (as_0 == "H4_jpy") ls_20 = "H4_jpy";
   if (as_0 == "D1_jpy") ls_20 = "D1_jpy";
   if (as_0 == "M1_gold") ls_20 = "M1_gold";
   if (as_0 == "M5_gold") ls_20 = "M5_gold";
   if (as_0 == "M15_gold") ls_20 = "M15_gold";
   if (as_0 == "M30_gold") ls_20 = "M30_gold";
   if (as_0 == "H1_gold") ls_20 = "H1_gold";
   if (as_0 == "H4_gold") ls_20 = "H4_gold";
   if (as_0 == "D1_gold") ls_20 = "D1_gold";
   if (as_0 == "M1_silver") ls_20 = "M1_silver";
   if (as_0 == "M5_silver") ls_20 = "M5_silver";
   if (as_0 == "M15_silver") ls_20 = "M15_silver";
   if (as_0 == "M30_silver") ls_20 = "M30_silver";
   if (as_0 == "H1_silver") ls_20 = "H1_silver";
   if (as_0 == "H4_silver") ls_20 = "H4_silver";
   if (as_0 == "D1_silver") ls_20 = "D1_silver";
   if (as_0 == "M1_#aig") ls_20 = "M1_#aig";
   if (as_0 == "M5_#aig") ls_20 = "M5_#aig";
   if (as_0 == "M15_#aig") ls_20 = "M15_#aig";
   if (as_0 == "M30_#aig") ls_20 = "M30_#aig";
   if (as_0 == "H1_#aig") ls_20 = "H1_#aig";
   if (as_0 == "H4_#aig") ls_20 = "H4_#aig";
   if (as_0 == "D1_#aig") ls_20 = "D1_#aig";
   if (as_0 == "M1_#axp") ls_20 = "M1_#axp";
   if (as_0 == "M5_#axp") ls_20 = "M5_#axp";
   if (as_0 == "M15_#axp") ls_20 = "M15_#axp";
   if (as_0 == "M30_#axp") ls_20 = "M30_#axp";
   if (as_0 == "H1_#axp") ls_20 = "H1_#axp";
   if (as_0 == "H4_#axp") ls_20 = "H4_#axp";
   if (as_0 == "D1_#axp") ls_20 = "D1_#axp";
   if (as_0 == "M1_#qqq") ls_20 = "M1_#qqq";
   if (as_0 == "M5_#qqq") ls_20 = "M5_#qqq";
   if (as_0 == "M15_#qqq") ls_20 = "M15_#qqq";
   if (as_0 == "M30_#qqq") ls_20 = "M30_#qqq";
   if (as_0 == "H1_#qqq") ls_20 = "H1_#qqq";
   if (as_0 == "H4_#qqq") ls_20 = "H4_#qqq";
   if (as_0 == "D1_#qqq") ls_20 = "D1_#qqq";
   if (as_0 == "M1_#msft") ls_20 = "M1_#msft";
   if (as_0 == "M5_#msft") ls_20 = "M5_#msft";
   if (as_0 == "M15_#msft") ls_20 = "M15_#msft";
   if (as_0 == "M30_#msft") ls_20 = "M30_#msft";
   if (as_0 == "H1_#msft") ls_20 = "H1_#msft";
   if (as_0 == "H4_#msft") ls_20 = "H4_#msft";
   if (as_0 == "D1_#msft") ls_20 = "D1_#msft";
   if (as_0 == "M1_#mcd") ls_20 = "M1_#mcd";
   if (as_0 == "M5_#mcd") ls_20 = "M5_#mcd";
   if (as_0 == "M15_#mcd") ls_20 = "M15_#mcd";
   if (as_0 == "M30_#mcd") ls_20 = "M30_#mcd";
   if (as_0 == "H1_#mcd") ls_20 = "H1_#mcd";
   if (as_0 == "H4_#mcd") ls_20 = "H4_#mcd";
   if (as_0 == "D1_#mcd") ls_20 = "D1_#mcd";
   if (as_0 == "M1_#ko") ls_20 = "M1_#ko";
   if (as_0 == "M5_#ko") ls_20 = "M5_#ko";
   if (as_0 == "M15_#ko") ls_20 = "M15_#ko";
   if (as_0 == "M30_#ko") ls_20 = "M30_#ko";
   if (as_0 == "H1_#ko") ls_20 = "H1_#ko";
   if (as_0 == "H4_#ko") ls_20 = "H4_#ko";
   if (as_0 == "D1_#ko") ls_20 = "D1_#ko";
   if (as_0 == "M1_#intc") ls_20 = "M1_#intc";
   if (as_0 == "M5_#intc") ls_20 = "M5_#intc";
   if (as_0 == "M15_#intc") ls_20 = "M15_#intc";
   if (as_0 == "M30_#intc") ls_20 = "M30_#intc";
   if (as_0 == "H1_#intc") ls_20 = "H1_#intc";
   if (as_0 == "H4_#intc") ls_20 = "H4_#intc";
   if (as_0 == "D1_#intc") ls_20 = "D1_#intc";
   if (as_0 == "M1_#gm") ls_20 = "M1_#gm";
   if (as_0 == "M5_#gm") ls_20 = "M5_#gm";
   if (as_0 == "M15_#gm") ls_20 = "M15_#gm";
   if (as_0 == "M30_#gm") ls_20 = "M30_#gm";
   if (as_0 == "H1_#gm") ls_20 = "H1_#gm";
   if (as_0 == "H4_#gm") ls_20 = "H4_#gm";
   if (as_0 == "D1_#gm") ls_20 = "D1_#gm";
   if (as_0 == "M1_#dis") ls_20 = "M1_#dis";
   if (as_0 == "M5_#dis") ls_20 = "M5_#dis";
   if (as_0 == "M15_#dis") ls_20 = "M15_#dis";
   if (as_0 == "M30_#dis") ls_20 = "M30_#dis";
   if (as_0 == "H1_#dis") ls_20 = "H1_#dis";
   if (as_0 == "H4_#dis") ls_20 = "H4_#dis";
   if (as_0 == "D1_#dis") ls_20 = "D1_#dis";
   int li_28 = 0;
   if (ad_8 > 0.0) {
      if (ad_8 <= 25.0) li_16 = White;
      else {
         if (ad_8 <= 50.0) li_16 = Gray;
         else {
            if (ad_8 <= 75.0) li_16 = LightSkyBlue;
            else {
               if (ad_8 <= 100.0) li_16 = RoyalBlue;
               else li_16 = Lime;
            }
         }
      }
      for (int li_32 = 1; li_32 <= 7; li_32++) ObjectSet(ls_20 + "_" + li_32, OBJPROP_COLOR, li_16);
   } else {
      if (ad_8 < 0.0) {
         if (ad_8 >= -25.0) li_16 = Yellow;
         else {
            if (ad_8 >= -50.0) li_16 = Orange;
            else {
               if (ad_8 >= -75.0) li_16 = Sienna;
               else {
                  if (ad_8 >= -100.0) li_16 = MediumVioletRed;
                  else li_16 = Red;
               }
            }
         }
         for (li_32 = 1; li_32 <= 7; li_32++) ObjectSet(ls_20 + "_" + li_32, OBJPROP_COLOR, li_16);
      }
   }
   ObjectSetText(ls_20 + "Val_", DoubleToStr(ad_8, 0), FontSize + 2, "Arial Narrow", Black);
}

void paintTotAvg(string as_0, double ad_8) {
   color li_16;
   string ls_20 = "";
   if (as_0 == "eur") ls_20 = "totavg_eur";
   if (as_0 == "gbp") ls_20 = "totavg_gbp";
   if (as_0 == "chf") ls_20 = "totavg_chf";
   if (as_0 == "aud") ls_20 = "totavg_aud";
   if (as_0 == "nzd") ls_20 = "totavg_nzd";
   if (as_0 == "cad") ls_20 = "totavg_cad";
   if (as_0 == "usd") ls_20 = "totavg_usd";
   if (as_0 == "jpy") ls_20 = "totavg_jpy";
   if (as_0 == "gold") ls_20 = "totavg_gold";
   if (as_0 == "silver") ls_20 = "totavg_silver";
   if (as_0 == "#aig") ls_20 = "totavg_#aig";
   if (as_0 == "#axp") ls_20 = "totavg_#axp";
   if (as_0 == "#qqq") ls_20 = "totavg_#qqq";
   if (as_0 == "#msft") ls_20 = "totavg_#msft";
   if (as_0 == "#mcd") ls_20 = "totavg_#mcd";
   if (as_0 == "#ko") ls_20 = "totavg_#ko";
   if (as_0 == "#intc") ls_20 = "totavg_#intc";
   if (as_0 == "#gm") ls_20 = "totavg_#gm";
   if (as_0 == "#dis") ls_20 = "totavg_#dis";
   int li_28 = 0;
   if (ad_8 > 0.0) {
      if (ad_8 <= 25.0) li_16 = White;
      else {
         if (ad_8 <= 50.0) li_16 = Gray;
         else {
            if (ad_8 <= 75.0) li_16 = LightSkyBlue;
            else {
               if (ad_8 <= 100.0) li_16 = RoyalBlue;
               else li_16 = Lime;
            }
         }
      }
      for (int li_32 = 1; li_32 <= 7; li_32++) ObjectSet(ls_20 + "_" + li_32, OBJPROP_COLOR, li_16);
   } else {
      if (ad_8 < 0.0) {
         if (ad_8 >= -25.0) li_16 = Yellow;
         else {
            if (ad_8 >= -50.0) li_16 = Orange;
            else {
               if (ad_8 >= -75.0) li_16 = Sienna;
               else {
                  if (ad_8 >= -100.0) li_16 = MediumVioletRed;
                  else li_16 = Red;
               }
            }
         }
         for (li_32 = 1; li_32 <= 7; li_32++) ObjectSet(ls_20 + "_" + li_32, OBJPROP_COLOR, li_16);
      }
   }
   ObjectSetText(ls_20 + "Val_", DoubleToStr(ad_8, 0), FontSize + 2, "Arial Narrow", Black);
}

string PeriodToStr(int ai_0) {
   if (ai_0 == 1) return ("M1");
   if (ai_0 == 5) return ("M5");
   if (ai_0 == 15) return ("M15");
   if (ai_0 == 30) return ("M30");
   if (ai_0 == 60) return ("H1");
   if (ai_0 == 240) return ("H4");
   if (ai_0 == 1440) return ("D1");
   if (ai_0 == 10080) return ("W1");
   if (ai_0 == 43200) return ("MN1");
   return ("");
}

bool IsValidTT(string as_0, string as_8) {
   int li_16 = StrToTime(Year() + "." + Month() + "." + Day() + " " + as_0);
   int li_20 = StrToTime(Year() + "." + Month() + "." + Day() + " " + as_8);
   if (li_20 <= li_16) {
      if (TimeCurrent() < li_16) {
         if (TimeCurrent() > li_20) li_20 += 86400;
         else li_16 -= 86400;
      } else li_20 += 86400;
   }
   if (TimeCurrent() >= li_16 && TimeCurrent() < li_20) return (TRUE);
   return (FALSE);
}