
#property copyright "Multiple10Points@Gmail.com"
#property link      "http://www.metaquotes.net/"

#include <WinUser32.mqh>

bool gi_76 = FALSE;
int gi_80 = 10;
double gd_84 = 1.0;
extern string _1 = " TRADE MANAGEMENT ";
extern double Lots = 0.01;
extern double TakeProfit = 50.0;
extern double StopLoss = 1000.0;
extern double Pips = 35.0;
extern bool UseFiboMultipler = FALSE;
extern double LotsMultiplier = 2.0;
extern int MaxTrades = 10;
extern int Slippage = 3;
extern double SecureProfit_Percent = 10.0;
extern double SecureLoss___Percent = 50.0;
extern bool UpdateAllTP = TRUE;
extern string _2 = " TRADE CONDITIONS ";
extern bool UseIndicatorsConditions = TRUE;
extern bool UseTrend_Filter = FALSE;
extern bool UseWeeklyFibo_Filter = FALSE;
extern int WeeklyFiboLevel = 1;
extern bool UseDailyFibo_Filter = TRUE;
extern int DailyFiboLevel = 1;
extern bool UseExtraSafety_Filter = FALSE;
extern string _3 = " ON CHART ";
extern bool DrawDailyLevels = TRUE;
extern bool DrawWeeklyLevels = TRUE;
extern bool ShowDashboard = TRUE;
extern string _4 = " TRADERS ";
extern bool RSI_Trader = TRUE;
extern int RSI_OB = 75;
extern int RSI_OS = 25;
extern bool Stochastic_Trader = TRUE;
extern int STOCH_OB = 80;
extern int STOCH_OS = 20;
extern bool TurboJRSX_Trader = TRUE;
extern int TURBO_OB = 80;
extern int TURBO_OS = 20;
extern bool WASV_Trader = TRUE;
extern int TradeEntryMargin = 1;
extern bool DeMarker_Trader = TRUE;
extern double DeMarker_OB = 0.8;
extern double DeMarker_OS = 0.2;
extern string _5 = " TRADES TERMINATION CONTROL ";
extern bool StopTrading = FALSE;
extern bool CloseAll_OnFriday = FALSE;
extern int FridayClosingHour = 19;
extern bool StopTrading_OnFriday = FALSE;
extern string _6 = " NEWS HOURS RISK CONTROL ";
extern bool SpreadSensor = TRUE;
extern int PriceFluctuation = 50;
extern int ReduceRiskBy = 25;
extern string __ = "Update Weekly News Hours File";
double gda_352[12];
string gsa_356[7];
int gi_360 = 0;
double gd_364 = 0.0;
double gd_372 = 0.0;
double gd_380 = 0.0;
double gd_388 = 0.0;
double gd_396 = 0.0;
double gd_404 = 0.0;
double gd_412 = 0.0;
double gd_420 = 0.0;
double gd_428 = 0.0;
double gd_436 = 0.0;
double gd_444 = 0.0;
double gd_452 = 0.0;
double gd_460 = 0.0;
double gd_468 = 0.0;
double gd_476 = 0.0;
int gi_484 = 50;
int gi_488 = 14;
int gi_492 = 14;
int gi_496 = 2;
int gi_500 = 0;
double gd_504 = 0.0;
double gd_512 = 0.0;
int gi_520 = 14;
int gi_524 = 14;
int gi_528 = 200;
double gd_532 = 0.0;
double gd_540;
double gd_548 = 0.0;
double gd_556 = 0.0;
double gd_564 = 0.0;
double gd_572 = 0.0;
double gd_580 = 0.0;
double gd_588 = 0.0;
double gd_596 = 0.0;
string gs_604 = "";
string gs_612 = "";
int gi_620 = 71;
int gi_624 = 72;
int gi_628 = 81;
int gi_632 = 82;
int gi_636 = 91;
int gi_640 = 92;
int gi_644 = 801;
int gi_648 = 802;
int gi_652 = 101;
int gi_656 = 102;
int gi_660 = 123;
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;
int gi_760;
int gi_764;
int gi_768;
int gi_772;
int gi_776;
int gi_780;
int gi_784;
int gi_788;
int gi_792;
int gi_796;
int gi_800;
int gi_804;
int gi_808 = 0;
double gd_812 = 0.0;
double gd_820 = 0.0;
double gd_828 = 0.0;
double gd_836 = 0.0;
int gi_844 = OP_BUY;
int gi_848 = 0;
int gi_852 = 0;
int gi_856 = 0;
int gi_860 = 0;
int gi_864 = 0;
int gi_868 = 0;
int gi_872 = 0;
int gi_876 = 0;
int gi_880 = 0;
int gi_884 = 0;
int gi_888 = 0;
int gi_892 = 0;
int gi_896 = 0;
int gi_900 = 0;
int gi_904 = 0;
int gi_908 = 0;
int gi_912 = 0;
int gi_916 = 0;
int gi_920 = 0;
int gi_924 = 0;
int gi_928 = 0;
int gi_932 = 0;
int gi_936 = 0;
int gi_940 = 0;
int gi_944 = 0;
int gi_948 = 0;
int gi_952 = 0;
int gi_956 = 0;
int gi_960 = 0;
int gi_964 = 0;
int gi_972 = 0;
int gi_976 = 0;
int gi_980 = 0;
int gi_984 = 0;
int gi_988 = 0;
int gi_992 = 0;
bool gi_996 = TRUE;
bool gi_1000 = TRUE;
bool gi_1004 = TRUE;
bool gi_1008 = TRUE;
bool gi_1012 = TRUE;
bool gi_1016 = TRUE;
bool gi_1020 = TRUE;
bool gi_1024 = TRUE;
bool gi_1028 = TRUE;
bool gi_1032 = TRUE;
bool gi_1036 = TRUE;
bool gi_1040 = TRUE;
bool gi_1044 = TRUE;
double gd_1048 = 0.0;
double gd_1056 = 0.0;
double gd_1064 = 0.0;
double gd_1072 = 0.0;
double gd_1080 = 0.0;
double gd_1088 = 0.0;
double gd_1096 = 0.0;
double gd_1104 = 0.0;
double gd_1112 = 0.0;
double gd_1120 = 0.0;
double gd_1128 = 0.0;
double gd_1136 = 0.0;
double gd_1144 = 0.0;
double gd_1152 = 0.0;
double gd_1160 = 0.0;
double gd_1168 = 0.0;
double gd_1176 = 0.0;
double gd_1184 = 0.0;
double gd_1192 = 0.0;
double gd_1200 = 0.0;
double gd_1208 = 0.0;
double gd_1216 = 0.0;
double gd_1224 = 0.0;
double gd_1232 = 0.0;
double gd_1240 = 0.0;
double gd_1248 = 0.0;
double gd_1256 = 0.0;
double gd_1264 = 0.0;
double gd_1272 = 0.0;
double gd_1280 = 0.0;
double gd_1288 = 0.0;
double gd_1296 = 0.0;
double gd_1304 = 0.0;
double gd_1312 = 0.0;
double gd_1320 = 0.0;
double gd_1328 = 0.0;
double gd_1336 = 0.0;
int gi_1344 = 0;
int gi_1348 = 0;
int gi_1352 = 0;
int gi_1356 = 0;
int gi_1360 = 0;
int gi_1364 = 0;
int gi_1368 = 0;
int gi_1372 = 0;
int gi_1376 = 0;
int gi_1380 = 0;
int gi_1396 = 3;
int gi_1400 = 5;
int gi_1404 = 5;
int gi_1408 = 5;
int gi_1412 = 12;
int gi_1416 = 12;
int gi_1420 = 5;
int gi_1424 = 10;
int gi_1428 = 10;
int gi_1432 = 5;
int gi_1436 = 3;
int gi_1440 = 5;
int gi_1444 = 7;
int gi_1448 = 10;
int gi_1452 = 7;
int gi_1456 = 10;
int gi_1460 = 8;
int gi_1464 = 8;
int gi_1468 = 6;
bool gi_1472 = FALSE;
double gd_1476 = 0.0;
double gd_1484 = 0.0;
double gd_1492 = 0.0;
int gi_1500 = 0;
double gd_1504 = 0.0;
double gd_1512 = 0.0;
double gd_1520 = 0.0;
int gi_1528;
double gd_1532 = 0.0;
double gd_1540 = 0.0;
double gda_1548[11];
double gd_1552 = 0.0;
double gd_1560 = 0.0;
double gd_1568 = 0.0;
double gda_1576[][6];
double gd_1580;
double gd_1588;
double gd_1596;
double gd_1604 = 0.0;
double gd_1612 = 0.0;
double gda_1620[11];
double gd_1624 = 0.0;
double gd_1632 = 0.0;
double gd_1640 = 0.0;
double gda_1648[][6];
double gd_1652 = 0.0;
double gd_1660 = 0.0;
double gd_1668 = 0.0;
double gd_1676 = 0.0;
double gd_1684 = 0.0;
double gd_1692 = 0.0;
double gd_1700 = 0.0;
double gd_1708 = 0.0;
double gd_1716 = 0.0;
double gd_1724 = 0.0;
double gd_1732 = 0.0;
double gd_1740 = 0.0;
double gd_1748 = 0.0;
double gd_1756 = 0.0;
double gd_1764 = 0.0;
double gd_1772 = 0.0;
double gd_1780 = 0.0;
double gd_1788 = 0.0;
bool gi_1800 = FALSE;
int gi_1804 = 0;
double gd_1808 = 0.0;
int gi_1816 = 0;
int gi_1820 = 0;
int gia_1824[12];
int gia_1828[12];
int gia_1832[12];
int gia_1836[12];
int gia_1840[12];
int gia_1844[12];
double gd_1848 = 0.0;
double gd_1856 = 0.0;
double gd_1864 = 999999.0;
double gd_1872 = 0.0;
double gd_1880 = 0.0;
bool gi_1888 = TRUE;
string gs_1892;
string gs_1900;
int gi_1908 = 0;
int gi_1912 = 0;
int gi_1916 = 0;
int gi_1920 = 0;
int gi_1924 = 0;
int gi_1928 = 0;
int gi_1932 = 0;
int gi_1936 = 0;
int gi_1940 = 0;
int gi_1944 = 0;
int gi_1948 = 0;
int gi_1952 = 0;
int gi_1956 = 0;
int gi_1960 = 0;
int gi_1964 = 0;
int gi_1968 = 0;
int gi_1972 = 0;
int gi_1976 = 0;
int gi_1980 = 0;
int gi_1984 = 0;
string gs_1988 = "";
string gs_1996 = "";

int init() {
   gsa_356[1] = "Monday";
   gsa_356[2] = "Tuesday";
   gsa_356[3] = "Wednesday";
   gsa_356[4] = "Thursday";
   gsa_356[5] = "Friday";
   InitStatusFile();
   ObjectsDeleteAll();
   int li_0 = FileOpen("nowarning.txt", FILE_CSV|FILE_READ);
   if (!IsTesting()) {
      if (!(li_0 > 0)) {
         if (AccountBalance() < 1000.0) {
            gi_1908 = MessageBox(Symbol() 
            + "\n\nUsing this EA on small accounts may not be suiteable. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1908 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (Lots > 0.01) {
            gi_1908 = MessageBox(Symbol() 
            + "\n\nUsing Lots more than 0.01 is extremely high risk. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1908 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (Pips / TakeProfit > 0.75) {
            gi_1912 = MessageBox(Symbol() 
            + "\n\nPips / TakeProfit ratio is extremely high, this may not make profit \non long retracements\n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1912 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (Pips < 22.0) {
            gi_1916 = MessageBox(Symbol() 
            + "\n\nUsing Pips less than 22 may result to total loss of your account. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1916 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (LotsMultiplier > 2.0) {
            gi_1920 = MessageBox(Symbol() 
            + "\n\nUsing LotsMultiplier more than 2.0 may result to total loss of your account. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1920 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (StringSubstr(Symbol(), 3, 3) == "JPY" || StringSubstr(Symbol(), 3, 3) == "JPY" && Pips < 30.0 || TakeProfit < 40.0) {
            gi_1924 = MessageBox(Symbol() 
            + "\n\nThe setting you selected is not suitable for JPY pairs, it may result to total loss of your account. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1924 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (StringSubstr(Symbol(), 0, 3) == "GBP" || StringSubstr(Symbol(), 3, 3) == "GBP" && Pips < 25.0 || TakeProfit < 30.0) {
            gi_1928 = MessageBox(Symbol() 
            + "\n\nThe setting you selected is not suitable for GBP pairs, it may result to total loss of your account. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1928 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (RSI_Trader && RSI_OS > 30 || RSI_OB < 70) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nRSI Over Bought/Sold limits set high-risk, this may result to aggressive trading. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (Stochastic_Trader && STOCH_OS > 20 || STOCH_OB < 80) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nStochastic Over Bought/Sold limits set high-risk, this may result to aggressive trading. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (TurboJRSX_Trader && TURBO_OS > 20 || TURBO_OB < 80) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nTurbo_JRSX Over Bought/Sold limits set high-risk, this may result to aggressive trading. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (WASV_Trader && TradeEntryMargin < 1) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nWASV Entry margin limit set very low, this may result to aggressive trading. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (WASV_Trader && TradeEntryMargin > 3) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nWASV Entry margin limit set very low, this may result to aggressive trading. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (DeMarker_Trader && DeMarker_OS > 0.2 || DeMarker_OB < 0.8) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nDeMarker Over Bought/Sold limits set high-risk, this may result to aggressive trading. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (SecureLoss___Percent > 50.0) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nSecureLoss Percent is set too high. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (SecureLoss___Percent < 10.0) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nSecureLoss Percent is set too low. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (!UseIndicatorsConditions) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nUnUse Indicators Conditions is extreme aggressive trading. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (PriceFluctuation < 50) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nPrive Fluctuation Candel is very low. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (ReduceRiskBy < 15) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nReducing Risk by " + ReduceRiskBy + "% is very Low. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (ReduceRiskBy > 50) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nReducing Risk by " + ReduceRiskBy + "% is very High. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (!SpreadSensor) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nSpreadSensor is very important to reduce the risk. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return;
            }
         }
         if (LotsMultiplier < 1.5) {
            gi_1968 = MessageBox(Symbol() 
            + "\n\nLotsMultiplier is low value. \n\nAre you sure you want to continue?", "Warning", MB_YESNO|MB_ICONEXCLAMATION);
            if (gi_1968 == IDNO) {
               gd_84 = 0;
               return (0);
            }
         }
      }
   }
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   if (!gd_84) {
      DisplayText("ex", "Expert Advisor is Halted", "Arial Bold", 32, Red, 5, 5);
      return;
   }
   if (!gd_84) {
      DisplayText("ex", "Expert Advisor is Halted", "Arial Bold", 32, Red, 5, 5);
      return;
   }
   if (!gd_84) {
      DisplayText("ex", "Expert Advisor is Halted", "Arial Bold", 32, Red, 5, 5);
      return;
   }
   if (!gd_84) {
      DisplayText("ex", "Expert Advisor is Halted", "Arial Bold", 32, Red, 5, 5);
      return;
   }
   RefreshRates();
   ObjectDelete("hour1");
   ObjectDelete("hour2");
   ObjectDelete("hour3");
   ObjectDelete("hour4");
   ObjectDelete("hour5");
   ObjectDelete("hour6");
   ObjectDelete("hour7");
   ObjectDelete("hour8");
   ObjectDelete("hour9");
   ObjectDelete("hour10");
   ObjectDelete("hour11");
   ObjectDelete("hour12");
   ObjectDelete("errhourxx");
   ObjectDelete("errhourx1");
   ObjectDelete("errhourx2");
   ObjectDelete("errhour1x");
   ObjectDelete("errhour2x");
   ObjectDelete("errhour1Y");
   ObjectDelete("errhour2Y");
   if (!InitCurrency1NewsFile()) {
      MessageBox("   Invalid News Hours.. Check the file (" + gs_1892 + ") structure" 
      + "\n\n   Example of valid format:\n\n        MON: 01 02 03 04\n        TUE: 11 12 13 14 16 22\n        WED: 05 22 24", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
      return (0);
   }
   if (!InitCurrency2NewsFile()) {
      MessageBox("   Invalid News Hours.. Check the file (" + gs_1900 + ") structure" 
      + "\n\n   Example of valid format:\n\n        MON: 01 02 03 04\n        TUE: 11 12 13 14 16 22\n        WED: 05 22 24", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
      return (0);
   }
   gda_352[1] = 1.0 * Lots;
   gda_352[2] = 2.0 * Lots;
   gda_352[3] = 3.0 * Lots;
   gda_352[4] = 5.0 * Lots;
   gda_352[5] = 8.0 * Lots;
   gda_352[6] = 13.0 * Lots;
   gda_352[7] = 21.0 * Lots;
   gda_352[8] = 34.0 * Lots;
   gda_352[9] = 55.0 * Lots;
   gda_352[10] = 89.0 * Lots;
   gda_352[11] = 144.0 * Lots;
   gda_352[12] = 233.0 * Lots;
   gda_352[13] = 377.0 * Lots;
   gda_352[14] = 610.0 * Lots;
   gda_352[15] = 987.0 * Lots;
   if (Year() > 2008) {
      DisplayText("ex", "Expired Version", "Arial Bold", 44, Red, 300, 150);
      DisplayText("contact", "   contact: Multiple10Points@gmail.com for FREE update", "Arial Bold", 20, DodgerBlue, 170, 250);
      return;
   }
   gi_1804 = Pips;
   gd_1808 = LotsMultiplier;
   gi_1816 = TakeProfit;
   DisplayText("hours", "News Release Hours", "Arial Bold", 14, DarkGray, 670, 40);
   DisplayNewsHours();
   ObjectCreate("RestrictedZone", OBJ_RECTANGLE, 0, 0, 0, 0, 0);
   ObjectCreate("DailyBuyOnlyZone1", OBJ_RECTANGLE, 0, 0, 0, 0, 0);
   ObjectCreate("DailyBuyOnlyZone2", OBJ_RECTANGLE, 0, 0, 0, 0, 0);
   ObjectCreate("DailyBuyOnlyZone3", OBJ_RECTANGLE, 0, 0, 0, 0, 0);
   ObjectCreate("DailyBuyOnlyZone4", OBJ_RECTANGLE, 0, 0, 0, 0, 0);
   ObjectCreate("DailySellOnlyZone1", OBJ_RECTANGLE, 0, 0, 0, 0, 0);
   ObjectCreate("DailySellOnlyZone2", OBJ_RECTANGLE, 0, 0, 0, 0, 0);
   ObjectCreate("DailySellOnlyZone3", OBJ_RECTANGLE, 0, 0, 0, 0, 0);
   ObjectCreate("DailySellOnlyZone4", OBJ_RECTANGLE, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklyBuyOnlyZone1", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklyBuyOnlyZone2", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklyBuyOnlyZone3", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklyBuyOnlyZone4", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklyBuyOnlyZone5", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklySellOnlyZone1", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklySellOnlyZone2", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklySellOnlyZone3", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklySellOnlyZone4", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectCreate("WeeklySellOnlyZone5", OBJ_TREND, 0, 0, 0, 0, 0);
   ObjectSet("RestrictedZone", OBJPROP_COLOR, DarkSlateGray);
   ObjectSet("DailyBuyOnlyZone1", OBJPROP_COLOR, LightCyan);
   ObjectSet("DailyBuyOnlyZone2", OBJPROP_COLOR, LightBlue);
   ObjectSet("DailyBuyOnlyZone3", OBJPROP_COLOR, CornflowerBlue);
   ObjectSet("DailyBuyOnlyZone4", OBJPROP_COLOR, Blue);
   ObjectSet("DailySellOnlyZone1", OBJPROP_COLOR, Bisque);
   ObjectSet("DailySellOnlyZone2", OBJPROP_COLOR, LightSalmon);
   ObjectSet("DailySellOnlyZone3", OBJPROP_COLOR, Red);
   ObjectSet("DailySellOnlyZone4", OBJPROP_COLOR, Maroon);
   ObjectDelete("impact1");
   ObjectDelete("impact2");
   ObjectDelete("impact3");
   ObjectDelete("impact4");
   if ((SpreadSensor && SpreadImpact()) || Fluctuation() || NewsHour()) {
      gi_1804 = NormalizeDouble(Pips + Pips * ReduceRiskBy / 100.0, 0);
      gd_1808 = NormalizeDouble(LotsMultiplier - LotsMultiplier * ReduceRiskBy / 100.0, 2);
      gi_1816 = NormalizeDouble(TakeProfit + TakeProfit * ReduceRiskBy / 100.0, 0);
      gda_352[1] = 1.0 * Lots;
      gda_352[2] = 2.0 * Lots;
      gda_352[3] = 3.0 * Lots;
      gda_352[4] = 5.0 * Lots;
      gda_352[5] = 8.0 * Lots;
      gda_352[6] = 13.0 * Lots;
      gda_352[7] = 21.0 * Lots;
      gda_352[8] = 34.0 * Lots;
      gda_352[9] = 55.0 * Lots;
      gda_352[10] = 89.0 * Lots;
      gda_352[11] = 144.0 * Lots;
      gda_352[12] = 233.0 * Lots;
      gda_352[13] = 377.0 * Lots;
      gda_352[14] = 610.0 * Lots;
      if (gi_1888) PlaySound("Alert.wav");
      gi_1888 = FALSE;
      DisplayText("impact1", "Impact Hour Alert", "Arial Bold", 18, Red, 675, 130);
      if (NewsHour()) DisplayText("impact2", "- News Release Time", "Arial Bold", 14, Salmon, 685, 165);
      if (SpreadImpact()) DisplayText("impact3", "- Spread Increased", "Arial Bold", 14, Salmon, 685, 185);
      if (Fluctuation()) DisplayText("impact4", "- Price Fluctuation", "Arial Bold", 14, Salmon, 685, 205);
      else gi_1888 = FALSE;
   }
   DisplayText("day", gsa_356[DayOfWeek()] + " (" + CurrentTime() + ")", "Arial Bold", 18, Yellow, 670, 10);
   if (StopTrading_OnFriday && DayOfWeek() == 5) {
      DisplayText("day", gsa_356[5] + " (" + CurrentTime() + ")", "Arial Bold", 18, Orange, 670, 10);
      gi_1800 = TRUE;
   } else gi_1800 = StopTrading;
   if ((SecureProfit_Percent > 0.0 && SymbolNetProfit() > AccountBalance() * SecureProfit_Percent / 100.0) || (SecureLoss___Percent > 0.0 && MathAbs(SymbolNetProfit()) > AccountBalance() * SecureLoss___Percent / 100.0) ||
      (DayOfWeek() == 5 && CloseAll_OnFriday && Hour() == FridayClosingHour)) CloseAllOrders();
   if (CloseAll_OnFriday && DayOfWeek() == 5 && Hour() >= FridayClosingHour) return;
   if (gi_500 == 1) {
      if (gi_76) gd_828 = MathCeil(AccountBalance() * gi_80 / 10000.0);
      else gd_828 = Lots;
   } else {
      if (gi_76) gd_828 = MathCeil(AccountBalance() * gi_80 / 10000.0) / 100.0;
      else gd_828 = Lots;
   }
   ReInit();
   CalcLots();
   ShowStatus();
   CalculateWeeklyFibo();
   CalculateDailyFibo();
   gd_540 = iMA(Symbol(), 0, 500, 0, MODE_EMA, PRICE_CLOSE, 100);
   gd_532 = 0;
   if (DrawWeeklyLevels) DrawWeekly();
   if (DrawDailyLevels) DrawDaily();
   if (AccountMargin() > 0.0) gd_532 = AccountEquity() / AccountMargin() * AccountLeverage();
   else gd_532 = AccountEquity() / 1.0 * AccountLeverage() / 100.0;
   if (gd_532 < gd_1864) {
      gd_1864 = gd_532;
      WriteStatusFile();
   }
   if (gd_828 > gi_484) gd_828 = gi_484;
   if (RSI_Trader) {
      gd_364 = iRSI(Symbol(), 0, gi_520, PRICE_CLOSE, 0);
      gd_372 = iRSI(Symbol(), 0, gi_520, PRICE_CLOSE, 1);
      Proceed_RSISELL();
      Proceed_RSIBUY();
   }
   if (!UseIndicatorsConditions) return (0);
   if (WASV_Trader) {
      gd_556 = iCustom(Symbol(), PERIOD_M30, "WASV", 1, 0);
      gd_564 = iCustom(Symbol(), PERIOD_M30, "WASV", 1, 1);
      gd_572 = iCustom(Symbol(), PERIOD_M30, "WASV", 1, 2);
      gd_580 = iCustom(Symbol(), PERIOD_M30, "WASV", 2, 0);
      gd_588 = iCustom(Symbol(), PERIOD_M30, "WASV", 2, 1);
      gd_596 = iCustom(Symbol(), PERIOD_M30, "WASV", 2, 2);
      gd_476 = iCustom(Symbol(), PERIOD_M30, "WASV", 0, 0);
      gd_460 = iCustom(Symbol(), PERIOD_M30, "WASV", 0, 1);
      gd_468 = iCustom(Symbol(), PERIOD_M30, "WASV", 0, 2);
      Proceed_VOLSELL();
      Proceed_VOLBUY();
   }
   if (Stochastic_Trader) {
      gd_380 = iStochastic(Symbol(), 0, 5, 3, 3, MODE_SMA, 0, MODE_MAIN, 0);
      gd_404 = iStochastic(Symbol(), 0, 5, 3, 3, MODE_SMA, 0, MODE_MAIN, 1);
      gd_412 = iStochastic(Symbol(), 0, 5, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 0);
      gd_420 = iStochastic(Symbol(), 0, 5, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 1);
      Proceed_STOCHSELL();
      Proceed_STOCHBUY();
   }
   if (TurboJRSX_Trader) {
      gd_428 = iCustom(Symbol(), PERIOD_H4, "Turbo_JRSX", gi_488, 0, 0);
      gd_436 = iCustom(Symbol(), PERIOD_H4, "Turbo_JRSX", gi_488, 0, 1);
      Proceed_TURBOSELL();
      Proceed_TURBOBUY();
   }
   if (DeMarker_Trader) {
      gd_444 = iDeMarker(Symbol(), 0, 14, 1);
      gd_452 = iDeMarker(Symbol(), 0, 14, 0);
      Proceed_DeMarkerSELL();
      Proceed_DeMarkerBUY();
   }
   if (DrawWeeklyLevels) DrawWeekly();
   if (DrawDailyLevels) DrawDaily();
   return (0);
}

int Proceed_RSISELL() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_624 == OrderMagicNumber()) li_0++;
   }
   if (gi_1344 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_624 == OrderMagicNumber()) {
            if (gi_844 == OP_SELL) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1344 = li_0;
   if (li_0 >= MaxTrades) gi_1004 = FALSE;
   else gi_1004 = TRUE;
   if (gd_1056 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_624 == OrderMagicNumber()) {
            gd_1056 = OrderOpenPrice();
            if (gi_844 == OP_SELL) gi_852 = 1;
         }
      }
   }
   if (li_0 < 1) {
      gi_852 = 3;
      if ((gd_364 < gd_372 && gd_372 > RSI_OB) || gd_372 > RSI_OB + 15) {
         gi_852 = 1;
         if (UseTrend_Filter && Close[1] > gd_540 && Open[1] > gd_540 && High[1] > gd_540 && Low[1] > gd_540) gi_852 = 3;
         if (UseWeeklyFibo_Filter && Ask < gda_1548[WeeklyFiboLevel] - 15.0 * Point) gi_852 = 3;
         if (UseDailyFibo_Filter && Ask < gda_1620[DailyFiboLevel] - 5.0 * Point) gi_852 = 3;
         if (StopTrading) gi_852 = 3;
      }
   }
   if (!UseIndicatorsConditions) gi_852 = 1;
   if (gi_852 == 1 && gi_1004) {
      if (Bid - gd_1056 >= gi_1804 * Point || li_0 < 1) {
         gd_1208 = Bid;
         gd_1056 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1208 - gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1208 + StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_372 > RSI_OB) OrderSend(Symbol(), OP_SELL, gd_836, gd_1208, Slippage, gd_504, gd_512, "RSI SELL", gi_624, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_SELL, gd_836, gd_1208, Slippage, gd_504, gd_512, "RSI SELL", gi_624, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_624, gd_512);
         return (0);
      }
   }
   return (0);
}

int Proceed_RSIBUY() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_620 == OrderMagicNumber()) li_0++;
   }
   if (gi_1360 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_620 == OrderMagicNumber()) {
            if (gi_844 == OP_BUY) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1360 = li_0;
   if (li_0 >= MaxTrades) gi_1008 = FALSE;
   else gi_1008 = TRUE;
   if (gd_1048 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_620 == OrderMagicNumber()) {
            gd_1048 = OrderOpenPrice();
            if (gi_844 == OP_BUY) gi_848 = 2;
         }
      }
   }
   if (li_0 < 1) {
      gi_848 = 3;
      if ((gd_364 > gd_372 && gd_372 < RSI_OS) || gd_372 < RSI_OS - 15) {
         gi_848 = 2;
         if (UseTrend_Filter && Close[1] < gd_540 && Open[1] < gd_540 && High[1] < gd_540 && Low[1] < gd_540) gi_848 = 3;
         if (UseWeeklyFibo_Filter && Ask > gda_1548[WeeklyFiboLevel + 5] + 15.0 * Point) gi_848 = 3;
         if (UseDailyFibo_Filter && Ask > gda_1620[DailyFiboLevel + 5] + 5.0 * Point) gi_848 = 3;
         if (StopTrading) gi_848 = 3;
      }
   }
   if (!UseIndicatorsConditions) gi_848 = 2;
   if (gi_848 == 2 && gi_1008) {
      if (gd_1048 - Ask >= gi_1804 * Point || li_0 < 1) {
         gd_1184 = Ask;
         gd_1048 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1184 + gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1184 - StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_372 < RSI_OS) OrderSend(Symbol(), OP_BUY, gd_836, gd_1184, Slippage, gd_504, gd_512, "RSI Buy", gi_620, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_BUY, gd_836, gd_1184, Slippage, gd_504, gd_512, "RSI Buy", gi_620, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_620, gd_512);
         return (0);
      }
   }
   return (0);
}

int Proceed_STOCHSELL() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_628 == OrderMagicNumber()) li_0++;
   }
   if (gi_1348 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_628 == OrderMagicNumber()) {
            if (gi_844 == OP_SELL) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1348 = li_0;
   if (li_0 >= MaxTrades) gi_1000 = FALSE;
   else gi_1000 = TRUE;
   if (gd_1072 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_628 == OrderMagicNumber()) {
            gd_1072 = OrderOpenPrice();
            if (gi_844 == OP_SELL) gi_876 = 1;
         }
      }
   }
   if (li_0 < 1) {
      gi_876 = 3;
      if ((gd_380 < gd_404 && gd_412 < gd_420 && gd_420 > STOCH_OB && gd_404 > STOCH_OB) || (gd_420 > STOCH_OB + 18 && gd_404 > STOCH_OB + 18)) {
         gi_876 = 1;
         if (UseTrend_Filter && Close[1] > gd_540 && Open[1] > gd_540 && High[1] > gd_540 && Low[1] > gd_540) gi_876 = 3;
         if (UseWeeklyFibo_Filter && Ask < gda_1548[WeeklyFiboLevel] - 15.0 * Point) gi_876 = 3;
         if (UseDailyFibo_Filter && Ask < gda_1620[DailyFiboLevel] - 5.0 * Point) gi_876 = 3;
         if (StopTrading) gi_876 = 3;
      }
   }
   if (gi_876 == 1 && gi_1000) {
      if (Bid - gd_1072 >= gi_1804 * Point || li_0 < 1) {
         gd_1168 = Bid;
         gd_1072 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1168 - gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1168 + StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_420 > STOCH_OB && gd_404 > STOCH_OB) OrderSend(Symbol(), OP_SELL, gd_836, gd_1168, Slippage, gd_504, gd_512, "STOCH SELL", gi_628, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_SELL, gd_836, gd_1168, Slippage, gd_504, gd_512, "STOCH SELL", gi_628, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_628, gd_512);
         return (0);
      }
   }
   return (0);
}

int Proceed_STOCHBUY() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_632 == OrderMagicNumber()) li_0++;
   }
   if (gi_1364 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_632 == OrderMagicNumber()) {
            if (gi_844 == OP_BUY) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1364 = li_0;
   if (li_0 >= MaxTrades) gi_996 = FALSE;
   else gi_996 = TRUE;
   if (gd_1064 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_632 == OrderMagicNumber()) {
            gd_1064 = OrderOpenPrice();
            if (gi_844 == OP_BUY) gi_872 = 2;
         }
      }
   }
   if (li_0 < 1) {
      gi_872 = 3;
      if ((gd_380 > gd_404 && gd_412 > gd_420 && gd_420 < STOCH_OS && gd_404 < STOCH_OS) || (gd_420 < STOCH_OS - 18 && gd_404 < STOCH_OS - 18)) {
         gi_872 = 2;
         if (UseTrend_Filter && Close[1] < gd_540 && Open[1] < gd_540 && High[1] < gd_540 && Low[1] < gd_540) gi_872 = 3;
         if (UseWeeklyFibo_Filter && Ask > gda_1548[WeeklyFiboLevel + 5] + 15.0 * Point) gi_872 = 3;
         if (UseDailyFibo_Filter && Ask > gda_1620[DailyFiboLevel + 5] + 5.0 * Point) gi_872 = 3;
         if (StopTrading) gi_872 = 3;
      }
   }
   if (gi_872 == 2 && gi_996) {
      if (gd_1064 - Ask >= gi_1804 * Point || li_0 < 1) {
         gd_1152 = Ask;
         gd_1064 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1152 + gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1152 - StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_420 < STOCH_OS && gd_404 < STOCH_OS) OrderSend(Symbol(), OP_BUY, gd_836, gd_1152, Slippage, gd_504, gd_512, "STOCH Buy", gi_632, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_BUY, gd_836, gd_1152, Slippage, gd_504, gd_512, "STOCH Buy", gi_632, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_632, gd_512);
         return (0);
      }
   }
   return (0);
}

int Proceed_VOLSELL() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_636 == OrderMagicNumber()) li_0++;
   }
   if (gi_1352 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_636 == OrderMagicNumber()) {
            if (gi_844 == OP_SELL) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1352 = li_0;
   if (li_0 >= MaxTrades) gi_1012 = FALSE;
   else gi_1012 = TRUE;
   if (gd_1080 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_636 == OrderMagicNumber()) {
            gd_1080 = OrderOpenPrice();
            if (gi_844 == OP_SELL) gi_900 = 1;
         }
      }
   }
   if (li_0 < 1) {
      gi_900 = 3;
      if (gd_476 < (-TradeEntryMargin) && gd_460 < (-TradeEntryMargin) && gd_580 > gd_596 && gd_580 > gd_556 && gd_588 > gd_564 && Ask > gd_1604 + 15.0 * Point || Ask > gd_1532 +
         30.0 * Point) {
         gi_900 = 1;
         if (UseTrend_Filter && Close[1] > gd_540 && Open[1] > gd_540 && High[1] > gd_540 && Low[1] > gd_540) gi_900 = 3;
         if (UseWeeklyFibo_Filter && Ask < gda_1548[WeeklyFiboLevel] - 15.0 * Point) gi_900 = 3;
         if (UseDailyFibo_Filter && Ask < gda_1620[DailyFiboLevel] - 5.0 * Point) gi_900 = 3;
         if (StopTrading) gi_900 = 3;
      }
   }
   if (gi_900 == 1 && gi_1012) {
      if (Bid - gd_1080 >= gi_1804 * Point || li_0 < 1) {
         gd_1240 = Bid;
         gd_1080 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1240 - gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1240 + StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_580 > gd_588 && gd_588 > gd_596) OrderSend(Symbol(), OP_SELL, gd_836, gd_1240, Slippage, gd_504, gd_512, "VOL SELL", gi_636, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_SELL, gd_836, gd_1240, Slippage, gd_504, gd_512, "VOL SELL", gi_636, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_636, gd_512);
         return (0);
      }
   }
   return (0);
}

int Proceed_VOLBUY() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_640 == OrderMagicNumber()) li_0++;
   }
   if (gi_1368 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_640 == OrderMagicNumber()) {
            if (gi_844 == OP_BUY) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1368 = li_0;
   if (li_0 >= MaxTrades) gi_1016 = FALSE;
   else gi_1016 = TRUE;
   if (gd_1088 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_640 == OrderMagicNumber()) {
            gd_1088 = OrderOpenPrice();
            if (gi_844 == OP_BUY) gi_896 = 2;
         }
      }
   }
   if (li_0 < 1) {
      gi_896 = 3;
      if (gd_476 > TradeEntryMargin && gd_460 > TradeEntryMargin && gd_556 > gd_572 && gd_556 > gd_580 && gd_564 > gd_588 && Bid < gd_1604 - 15.0 * Point || Bid < gd_1532 - 30.0 * Point) {
         gi_896 = 2;
         if (UseTrend_Filter && Close[1] < gd_540 && Open[1] < gd_540 && High[1] < gd_540 && Low[1] < gd_540) gi_896 = 3;
         if (UseWeeklyFibo_Filter && Ask > gda_1548[WeeklyFiboLevel + 5] + 15.0 * Point) gi_896 = 3;
         if (UseDailyFibo_Filter && Ask > gda_1620[DailyFiboLevel + 5] + 5.0 * Point) gi_896 = 3;
         if (StopTrading) gi_896 = 3;
      }
   }
   if (gi_896 == 2 && gi_1016) {
      if (gd_1088 - Ask >= gi_1804 * Point || li_0 < 1) {
         gd_1216 = Ask;
         gd_1088 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1216 + gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1216 - StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_556 > gd_588 && gd_564 > gd_572) OrderSend(Symbol(), OP_BUY, gd_836, gd_1216, Slippage, gd_504, gd_512, "VOL Buy", gi_640, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_BUY, gd_836, gd_1216, Slippage, gd_504, gd_512, "VOL Buy", gi_640, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_640, gd_512);
         return (0);
      }
   }
   return (0);
}

int Proceed_TURBOSELL() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_644 == OrderMagicNumber()) li_0++;
   }
   if (gi_1356 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_644 == OrderMagicNumber()) {
            if (gi_844 == OP_SELL) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1356 = li_0;
   if (li_0 >= MaxTrades) gi_1020 = FALSE;
   else gi_1020 = TRUE;
   if (gd_1096 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_644 == OrderMagicNumber()) {
            gd_1096 = OrderOpenPrice();
            if (gi_844 == OP_SELL) gi_924 = 1;
         }
      }
   }
   if (li_0 < 1) {
      gi_924 = 3;
      if ((gd_428 < gd_436 && gd_436 > TURBO_OB) || gd_436 > TURBO_OB + 18) {
         gi_924 = 1;
         if (UseTrend_Filter && Close[1] > gd_540 && Open[1] > gd_540 && High[1] > gd_540 && Low[1] > gd_540) gi_924 = 3;
         if (UseWeeklyFibo_Filter && Ask < gda_1548[WeeklyFiboLevel] - 15.0 * Point) gi_924 = 3;
         if (UseDailyFibo_Filter && Ask < gda_1620[DailyFiboLevel] - 5.0 * Point) gi_924 = 3;
         if (StopTrading) gi_924 = 3;
      }
   }
   if (gi_924 == 1 && gi_1020) {
      if (Bid - gd_1096 >= gi_1804 * Point || li_0 < 1) {
         gd_1272 = Bid;
         gd_1096 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1272 - gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1272 + StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_436 > TURBO_OB) OrderSend(Symbol(), OP_SELL, gd_836, gd_1272, Slippage, gd_504, gd_512, "TURBO SELL", gi_644, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_SELL, gd_836, gd_1272, Slippage, gd_504, gd_512, "TURBO SELL", gi_644, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_644, gd_512);
         return (0);
      }
   }
   return (0);
}

int Proceed_TURBOBUY() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_648 == OrderMagicNumber()) li_0++;
   }
   if (gi_1372 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_648 == OrderMagicNumber()) {
            if (gi_844 == OP_BUY) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1372 = li_0;
   if (li_0 >= MaxTrades) gi_1024 = FALSE;
   else gi_1024 = TRUE;
   if (gd_1104 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_648 == OrderMagicNumber()) {
            gd_1104 = OrderOpenPrice();
            if (gi_844 == OP_BUY) gi_920 = 2;
         }
      }
   }
   if (li_0 < 1) {
      gi_920 = 3;
      if ((gd_428 > gd_436 && gd_436 < TURBO_OS) || gd_436 < TURBO_OS - 18) {
         gi_920 = 2;
         if (UseTrend_Filter && Close[1] < gd_540 && Open[1] < gd_540 && High[1] < gd_540 && Low[1] < gd_540) gi_920 = 3;
         if (UseWeeklyFibo_Filter && Ask > gda_1548[WeeklyFiboLevel + 5] + 15.0 * Point) gi_920 = 3;
         if (UseDailyFibo_Filter && Ask > gda_1620[DailyFiboLevel + 5] + 5.0 * Point) gi_920 = 3;
         if (StopTrading) gi_920 = 3;
      }
   }
   if (gi_920 == 2 && gi_1024) {
      if (gd_1104 - Ask >= gi_1804 * Point || li_0 < 1) {
         gd_1248 = Ask;
         gd_1104 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1248 + gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1248 - StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_436 < TURBO_OS) OrderSend(Symbol(), OP_BUY, gd_836, gd_1248, Slippage, gd_504, gd_512, "TURBO Buy", gi_648, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_BUY, gd_836, gd_1248, Slippage, gd_504, gd_512, "TURBO Buy", gi_648, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_648, gd_512);
         return (0);
      }
   }
   return (0);
}

int Proceed_DeMarkerSELL() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_652 == OrderMagicNumber()) li_0++;
   }
   if (gi_1380 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_652 == OrderMagicNumber()) {
            if (gi_844 == OP_SELL) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1380 = li_0;
   if (li_0 >= MaxTrades) gi_1028 = FALSE;
   else gi_1028 = TRUE;
   if (gd_1112 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_652 == OrderMagicNumber()) {
            gd_1112 = OrderOpenPrice();
            if (gi_844 == OP_SELL) gi_948 = 1;
         }
      }
   }
   if (li_0 < 1) {
      gi_948 = 3;
      if ((gd_452 < gd_444 && gd_444 > DeMarker_OB) || gd_444 > DeMarker_OB + 0.16) {
         gi_948 = 1;
         if (UseTrend_Filter && Close[1] > gd_540 && Open[1] > gd_540 && High[1] > gd_540 && Low[1] > gd_540) gi_948 = 3;
         if (UseWeeklyFibo_Filter && Ask < gda_1548[WeeklyFiboLevel] - 15.0 * Point) gi_948 = 3;
         if (UseDailyFibo_Filter && Ask < gda_1620[DailyFiboLevel] - 5.0 * Point) gi_948 = 3;
         if (StopTrading) gi_948 = 3;
      }
   }
   if (gi_948 == 1 && gi_1028) {
      if (Bid - gd_1112 >= gi_1804 * Point || li_0 < 1) {
         gd_1304 = Bid;
         gd_1112 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1304 - gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1304 + StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_444 > DeMarker_OB) OrderSend(Symbol(), OP_SELL, gd_836, gd_1304, Slippage, gd_504, gd_512, "DeMarker SELL", gi_652, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_SELL, gd_836, gd_1304, Slippage, gd_504, gd_512, "DeMarker SELL", gi_652, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_652, gd_512);
         return (0);
      }
   }
   return (0);
}

int Proceed_DeMarkerBUY() {
   int li_0 = 0;
   for (int li_4 = 0; li_4 < OrdersTotal(); li_4++) {
      OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && gi_656 == OrderMagicNumber()) li_0++;
   }
   if (gi_1376 > li_0) {
      for (li_4 = OrdersTotal(); li_4 >= 0; li_4--) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_656 == OrderMagicNumber()) {
            if (gi_844 == OP_BUY) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
            return (0);
         }
      }
   }
   gi_1376 = li_0;
   if (li_0 >= MaxTrades) gi_1032 = FALSE;
   else gi_1032 = TRUE;
   if (gd_1120 == 0.0) {
      for (li_4 = 0; li_4 < OrdersTotal(); li_4++) {
         OrderSelect(li_4, SELECT_BY_POS, MODE_TRADES);
         gi_844 = OrderType();
         if (OrderSymbol() == Symbol() && gi_656 == OrderMagicNumber()) {
            gd_1120 = OrderOpenPrice();
            if (gi_844 == OP_BUY) gi_944 = 2;
         }
      }
   }
   if (li_0 < 1) {
      gi_944 = 3;
      if ((gd_444 > gd_452 && gd_444 < DeMarker_OS) || gd_444 < DeMarker_OS - 0.16) {
         gi_944 = 2;
         if (UseTrend_Filter && Close[1] < gd_540 && Open[1] < gd_540 && High[1] < gd_540 && Low[1] < gd_540) gi_944 = 3;
         if (UseWeeklyFibo_Filter && Ask > gda_1548[WeeklyFiboLevel + 5] + 15.0 * Point) gi_944 = 3;
         if (UseDailyFibo_Filter && Ask > gda_1620[DailyFiboLevel + 5] + 5.0 * Point) gi_944 = 3;
         if (StopTrading) gi_944 = 3;
      }
   }
   if (gi_944 == 2 && gi_1032) {
      if (gd_1120 - Ask >= gi_1804 * Point || li_0 < 1) {
         gd_1280 = Ask;
         gd_1120 = 0;
         if (gi_1816 == 0) gd_512 = 0;
         else gd_512 = gd_1280 + gi_1816 * Point;
         if (StopLoss == 0.0) gd_504 = 0;
         else gd_504 = gd_1280 - StopLoss * Point;
         if (li_0 != 0) {
            gd_836 = gd_828;
            for (li_4 = 1; li_4 <= li_0; li_4++) gd_836 = NormalizeDouble(gd_836 * gd_1808, gi_496);
         } else gd_836 = gd_828;
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseFiboMultipler && li_0 > 0) gd_836 = gda_352[li_0 + 1];
         if (gd_836 > gi_484) gd_836 = gi_484;
         if (UseExtraSafety_Filter) {
            if (gd_444 < DeMarker_OS) OrderSend(Symbol(), OP_BUY, gd_836, gd_1280, Slippage, gd_504, gd_512, "DeMarker Buy", gi_656, 0, CLR_NONE);
         } else OrderSend(Symbol(), OP_BUY, gd_836, gd_1280, Slippage, gd_504, gd_512, "DeMarker Buy", gi_656, 0, CLR_NONE);
         if (UpdateAllTP) SetTakeProfitAllOrders(gi_656, gd_512);
         return (0);
      }
   }
   return (0);
}

void CloseAllOrders() {
   for (int li_0 = 0; li_0 < OrdersTotal(); li_0++) {
      OrderSelect(li_0, SELECT_BY_POS, MODE_TRADES);
      if (OrderMagicNumber() == gi_620 || OrderMagicNumber() == gi_624 || OrderMagicNumber() == gi_628 || OrderMagicNumber() == gi_632 || OrderMagicNumber() == gi_636 ||
         OrderMagicNumber() == gi_640 || OrderMagicNumber() == gi_644 || OrderMagicNumber() == gi_648 || OrderMagicNumber() == gi_652 || OrderMagicNumber() == gi_656) OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Black);
   }
}

void ShowStatus() {
   int li_4;
   int li_8;
   int li_0 = -12;
   HideTestIndicators(TRUE);
   if (ShowDashboard) {
      DrawInfoBox();
      if (AccountProfit() < gd_1848) {
         gd_1848 = AccountProfit();
         WriteStatusFile();
      }
      if (AccountMargin() > gd_1856) {
         gd_1856 = AccountMargin();
         WriteStatusFile();
      }
      DisplayText("BAL", "Account Balance  : $" + DoubleToStr(AccountBalance(), 2), "Fixedsys", 10, Lime, 415, 5);
      if (AccountProfit() >= 0.0) gi_1820 = 16436871;
      else gi_1820 = 7504122;
      DisplayText("e", "Account Profit   : $" + DoubleToStr(AccountProfit(), 2), "Fixedsys", 10, gi_1820, 415, 20);
      gi_1820 = 65280;
      DisplayText("g", "Account Equity   : $" + DoubleToStr(AccountEquity(), 2), "Fixedsys", 10, gi_1820, 415, 35);
      if (AccountMargin() < 10.0 * AccountBalance() / 200.0) gi_1820 = 65280;
      else gi_1820 = 7504122;
      DisplayText("f", "Margin Used      : $" + DoubleToStr(AccountMargin(), 2), "Fixedsys", 10, gi_1820, 415, 55);
      if (AccountFreeMargin() > 0.0) gi_1820 = 65280;
      else gi_1820 = 7504122;
      DisplayText("h", "Free Margin      : $" + DoubleToStr(AccountFreeMargin(), 2), "Fixedsys", 10, gi_1820, 415, 70);
      if (gd_532 > 1000.0) gi_1820 = 65280;
      else gi_1820 = 7504122;
      DisplayText("i", "Margin Level(%)  : " + DoubleToStr(gd_532, 2) + "%", "Fixedsys", 10, gi_1820, 415, 85);
      if (SymbolNetProfit() > gd_1872) {
         gd_1872 = SymbolNetProfit();
         WriteStatusFile();
      }
      if (SymbolNetProfit() < gd_1880) {
         gd_1880 = SymbolNetProfit();
         WriteStatusFile();
      }
      if (SymbolNetProfit() >= 0.0) gi_1820 = 16436871;
      else gi_1820 = 7504122;
      DisplayText("symbol1", Symbol() + " Profit    : $" + DoubleToStr(SymbolNetProfit(), 2), "Fixedsys", 10, gi_1820, 415, 177);
      DisplayText("symbol2", Symbol() + " MaxProfit : $" + DoubleToStr(gd_1872, 2), "Fixedsys", 10, LightSkyBlue, 415, 195);
      DisplayText("symbol3", Symbol() + " MaxLoss   : $" + DoubleToStr(gd_1880, 2), "Fixedsys", 10, Salmon, 415, 213);
      DisplayText("xxxx1", "-----------------------------------", "Arial", 17, DarkGray, 405, 95);
      DisplayText("xxxx2", "-----------------------------------", "Arial", 17, DarkGray, 405, 158);
      DisplayText("Title", "Multiple10Points-X2 v1.76", "Arial Bold", 21, Red, 0, li_0 + 22);
      DisplayText("Line", "______________________________________ ", "Arial", 13, Red, 0, li_0 + 35);
      if (RSI_Trader) {
         DisplayText("RSI", "RSI Status:   " + DoubleToStr((gd_364 + gd_372) / 2.0, 2), "Fixedsys", 12, LightSkyBlue, 1, li_0 + 58);
         DisplayText("l1", "___________________________________________", "Fixedsys", 12, LightSkyBlue, 1, li_0 + 96);
         if (!UseIndicatorsConditions) {
            DisplayText("RSI", " ", "Fixedsys", 12, LightSkyBlue, 1, li_0 + 58);
            DisplayText("l1", " ", "Fixedsys", 12, LightSkyBlue, 1, li_0 + 96);
         }
         if (gd_664 > 0.0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("RSI6", "Long Orders  : " + DoubleToStr(gd_664, 2) + " Lots / from " + DoubleToStr(gi_760, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 76);
         if (gi_764 > 0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("RSI7", "Short Orders : " + DoubleToStr(gd_672, 2) + " Lots / from " + DoubleToStr(gi_764, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 92);
      }
      if (Stochastic_Trader) {
         li_0 += 60;
         DisplayText("STOCH", "Stochastic Status:   " + DoubleToStr((gd_412 + gd_420 + gd_380 + gd_404) / 4.0, 2), "Fixedsys", 12, LightSkyBlue, 1, li_0 + 58);
         DisplayText("l2", "___________________________________________", "Fixedsys", 12, LightSkyBlue, 1, li_0 + 96);
         if (gd_680 > 0.0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("STOCH6", "Long Orders  : " + DoubleToStr(gd_680, 2) + " Lots / from " + DoubleToStr(gi_768, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 76);
         if (gd_688 > 0.0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("STOCH7", "Short Orders : " + DoubleToStr(gd_688, 2) + " Lots / from " + DoubleToStr(gi_772, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 92);
      }
      if (TurboJRSX_Trader) {
         li_0 += 60;
         DisplayText("TURBO", "Turbo-JRSX Status:   " + DoubleToStr((gd_428 + gd_436) / 2.0, 2), "Fixedsys", 12, LightSkyBlue, 1, li_0 + 58);
         DisplayText("l34", "___________________________________________", "Fixedsys", 12, LightSkyBlue, 1, li_0 + 96);
         if (gd_696 > 0.0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("TURBO6", "Long Orders  : " + DoubleToStr(gd_696, 2) + " Lots / from " + DoubleToStr(gi_776, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 76);
         if (gd_704 > 0.0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("TURBO7", "Short Orders : " + DoubleToStr(gd_704, 2) + " Lots / from " + DoubleToStr(gi_780, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 92);
      }
      if (WASV_Trader) {
         li_0 += 60;
         DisplayText("VOL1", "WASV Status: ", "Fixedsys", 12, LightSkyBlue, 1, li_0 + 58);
         if (gd_460 < 0.0) {
            DisplayText("VOL2", "              " + DoubleToStr(gd_476, 2) + " / " + DoubleToStr(gd_460, 2) + " / " + DoubleToStr(gd_468, 2), "Fixedsys", 12, Salmon, 1, li_0 +
               58);
         } else {
            DisplayText("VOL2", "              " + DoubleToStr(gd_476, 2) + " / " + DoubleToStr(gd_460, 2) + " / " + DoubleToStr(gd_468, 2), "Fixedsys", 12, LightSkyBlue, 1, li_0 +
               58);
         }
         DisplayText("l11", "___________________________________________", "Fixedsys", 12, LightSkyBlue, 1, li_0 + 96);
         if (gd_712 > 0.0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("VOL6", "Long Orders  : " + DoubleToStr(gd_712, 2) + " Lots / from " + DoubleToStr(gi_784, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 76);
         if (gd_720 > 0.0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("VOL7", "Short Orders : " + DoubleToStr(gd_720, 2) + " Lots / from " + DoubleToStr(gi_788, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 92);
      }
      if (DeMarker_Trader) {
         li_0 += 60;
         DisplayText("DeMarker", "DeMarker Status:   " + DoubleToStr((gd_452 + gd_444) / 2.0, 2), "Fixedsys", 12, LightSkyBlue, 1, li_0 + 58);
         DisplayText("l4", "___________________________________________", "Fixedsys", 12, LightSkyBlue, 1, li_0 + 96);
         if (gd_728 > 0.0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("DeMarker6", "Long Orders  : " + DoubleToStr(gd_728, 2) + " Lots / from " + DoubleToStr(gi_792, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 76);
         if (gd_736 > 0.0) gi_1820 = 65535;
         else gi_1820 = 5197615;
         DisplayText("DeMarker7", "Short Orders : " + DoubleToStr(gd_736, 2) + " Lots / from " + DoubleToStr(gi_796, 0) + " Orders", "Fixedsys", 9, gi_1820, 23, li_0 + 92);
      }
      DisplayText("creator", "Developed by Multiple10Points@gmail.com", "Arial", 10, Gold, 1, li_0 + 125);
      if (DrawWeeklyLevels) DrawWeekly();
      if (DrawDailyLevels) DrawDaily();
      li_4 = 400;
      li_8 = 200;
      if (UseWeeklyFibo_Filter) {
         DisplayText("wFIBO1", "Weekly Fibonacci:   ", "ARIAL", 10, Lime, li_4 + 1, li_8 + 58);
         DisplayText("wFIBO2", "Resistance: " + DoubleToStr(gda_1548[1], Digits) + "  |  " + DoubleToStr(gda_1548[2], Digits) + "  |  " + DoubleToStr(gda_1548[3], Digits) +
            "  |  " + DoubleToStr(gda_1548[4], Digits) + "  |  " + DoubleToStr(gda_1548[5], Digits), "ARIAL", 8, Salmon, li_4 + 3.2, li_8 + 78);
         DisplayText("wFIBO3", "   Support: " + DoubleToStr(gda_1548[6], Digits) + "  |  " + DoubleToStr(gda_1548[7], Digits) + "  |  " + DoubleToStr(gda_1548[8], Digits) +
            "  |  " + DoubleToStr(gda_1548[9], Digits) + "  |  " + DoubleToStr(gda_1548[10], Digits), "ARIAL", 8, LightSkyBlue, li_4 + 4 + 3.2, li_8 + 96 - 7);
         if (UseWeeklyFibo_Filter && Ask > gda_1548[WeeklyFiboLevel] - 10.0 * Point) DisplayText("wFSOBO", "Sell Only Zone", "ARIAL BOLD", 10, Salmon, li_4 + 140, li_8 + 58);
         else {
            if (UseWeeklyFibo_Filter && Bid < gda_1548[WeeklyFiboLevel + 5] + 10.0 * Point) DisplayText("wFSOBO", "Buy Only Zone", "ARIALBOLD", 10, LightSkyBlue, li_4 + 140, li_8 + 58);
            else DisplayText("wFSOBO", "R E S T R I C T E D   Z O N E", "ARIAL BOLD", 10, DarkGray, li_4 + 110, li_8 + 58);
         }
         if (!UseWeeklyFibo_Filter) DisplayText("wFSOBO", "                         ", "ARIALBOLD", 12, DarkGray, li_4 + 140, li_8 + 58);
         li_8 += 58;
      }
      if (UseDailyFibo_Filter) {
         if (UseWeeklyFibo_Filter) li_0 += 90;
         DisplayText("DFIBO1", "Daily Fibonacci:   ", "ARIAL", 10, Lime, li_4 + 1, li_8 + 58);
         DisplayText("DFIBO2", "Resistance: " + DoubleToStr(gda_1620[1], Digits) + "  |  " + DoubleToStr(gda_1620[2], Digits) + "  |  " + DoubleToStr(gda_1620[3], Digits) +
            "  |  " + DoubleToStr(gda_1620[4], Digits) + "  |  " + DoubleToStr(gda_1620[5], Digits), "ARIAL", 8, Salmon, li_4 + 4.2, li_8 + 78);
         DisplayText("DFIBO3", "   Support: " + DoubleToStr(gda_1620[6], Digits) + "  |  " + DoubleToStr(gda_1620[7], Digits) + "  |  " + DoubleToStr(gda_1620[8], Digits) +
            "  |  " + DoubleToStr(gda_1620[9], Digits) + "  |  " + DoubleToStr(gda_1620[10], Digits), "ARIAL", 8, LightSkyBlue, li_4 + 6 + 2.2, li_8 + 96 - 7);
         if (UseDailyFibo_Filter && Ask > gda_1620[DailyFiboLevel] - 5.0 * Point) DisplayText("DFSOBO", "Sell Only Zone", "ARIAL BOLD", 10, Salmon, li_4 + 140, li_8 + 58);
         else {
            if (UseDailyFibo_Filter && Bid < gda_1620[DailyFiboLevel + 5] + 5.0 * Point) DisplayText("DFSOBO", "Buy Only Zone", "ARIAL BOLD", 10, LightSkyBlue, li_4 + 140, li_8 + 58);
            else DisplayText("DFSOBO", "R E S T R I C T E D   Z O N E  ", "ARIAL BOLD", 10, DarkGray, li_4 + 110, li_8 + 58);
         }
         if (!UseDailyFibo_Filter) DisplayText("DFSOBO", "                         ", "", 12, DarkGray, li_4 + 140, li_8 + 58);
      }
      li_0 += 15;
      if (UseTrend_Filter) {
         DisplayText("trend", "Trend Direction:  ", "Fixedsys", 12, Lime, li_4 + 1, li_0 + 135);
         if (Close[0] > gd_540 && Open[0] > gd_540 && High[0] > gd_540 && Low[0] > gd_540) DisplayText("trend2", "Up Trend", "Fixedsys", 12, Lime, li_4 + 150, li_0 + 135);
         else {
            DisplayText("trend2", "Unstable", "Fixedsys", 12, Lime, li_4 + 1, li_0 + 135);
            if (Close[0] < gd_540 && Open[0] < gd_540 && High[0] < gd_540 && Low[0] < gd_540) DisplayText("trend2", "Down Trend", "Fixedsys", 12, Lime, li_4 + 150, li_0 + 135);
            else DisplayText("trend2", "Unstable", "Fixedsys", 12, Lime, li_4 + 150, li_0 + 135);
         }
      }
      DisplayText("stat1", "Max. D.D./Loss   : $" + DoubleToStr(gd_1848, 2), "Fixedsys", 10, Salmon, 415, 115);
      DisplayText("stat2", "Max UsedMargin   : $" + DoubleToStr(gd_1856, 2), "Fixedsys", 10, Lime, 415, 133);
      DisplayText("stat3", "Min MarginLevel  : " + DoubleToStr(gd_1864, 2) + "%", "Fixedsys", 10, Lime, 415, 151);
   }
}

void DisplayText(string as_0, string as_8, string as_16, int ai_24, color ai_28, int ai_32, int ai_36) {
   ObjectCreate(as_0, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(as_0, as_8, ai_24, as_16, ai_28);
   ObjectSet(as_0, OBJPROP_CORNER, 0);
   ObjectSet(as_0, OBJPROP_XDISTANCE, ai_32);
   ObjectSet(as_0, OBJPROP_YDISTANCE, ai_36);
}

double CalcLots() {
   for (int li_0 = 0; li_0 < OrdersTotal(); li_0++) {
      OrderSelect(li_0, SELECT_BY_POS, MODE_TRADES);
      if (Symbol() == OrderSymbol() && OrderType() == OP_SELL && OrderMagicNumber() == gi_624) {
         gd_672 += OrderLots();
         gi_764++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_BUY && OrderMagicNumber() == gi_620) {
         gd_664 += OrderLots();
         gi_760++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_SELL && OrderMagicNumber() == gi_628) {
         gd_688 += OrderLots();
         gi_772++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_BUY && OrderMagicNumber() == gi_632) {
         gd_680 += OrderLots();
         gi_768++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_SELL && OrderMagicNumber() == gi_644) {
         gd_704 += OrderLots();
         gi_780++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_BUY && OrderMagicNumber() == gi_648) {
         gd_696 += OrderLots();
         gi_776++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_SELL && OrderMagicNumber() == gi_636) {
         gd_720 += OrderLots();
         gi_788++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_BUY && OrderMagicNumber() == gi_640) {
         gd_712 += OrderLots();
         gi_784++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_SELL && OrderMagicNumber() == gi_652) {
         gd_736 += OrderLots();
         gi_796++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_BUY && OrderMagicNumber() == gi_656) {
         gd_728 += OrderLots();
         gi_792++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_SELL && OrderMagicNumber() == gi_660) {
         gd_752 += OrderLots();
         gi_804++;
      }
      if (Symbol() == OrderSymbol() && OrderType() == OP_BUY && OrderMagicNumber() == gi_660) {
         gd_744 += OrderLots();
         gi_800++;
      }
   }
   return (0.0);
}

void CalculateDailyFibo() {
   ArrayCopyRates(gda_1648, Symbol(), PERIOD_D1);
   if (gi_1472 == FALSE) {
      gd_1596 = gda_1648[1][4];
      gd_1580 = gda_1648[1][3];
      gd_1588 = gda_1648[1][2];
      gi_1528 = gda_1648[1][0] + 86400.0;
   }
   gd_1612 = gd_1580 - gd_1588;
   gd_1604 = (gd_1580 + gd_1588 + gd_1596) / 3.0;
   gda_1620[5] = NormalizeDouble(1.38 * gd_1612 + gd_1604, Digits);
   gda_1620[4] = NormalizeDouble(1.23 * gd_1612 + gd_1604, Digits);
   gda_1620[3] = NormalizeDouble(1.0 * gd_1612 + gd_1604, Digits);
   gda_1620[2] = NormalizeDouble(0.62 * gd_1612 + gd_1604, Digits);
   gda_1620[1] = NormalizeDouble(gd_1612 / 2.0 + gd_1604, Digits);
   gda_1620[6] = NormalizeDouble(gd_1604 - gd_1612 / 2.0, Digits);
   gda_1620[7] = NormalizeDouble(gd_1604 - 0.62 * gd_1612, Digits);
   gda_1620[8] = NormalizeDouble(gd_1604 - 1.0 * gd_1612, Digits);
   gda_1620[9] = NormalizeDouble(gd_1604 - 1.23 * gd_1612, Digits);
   gda_1620[10] = NormalizeDouble(gd_1604 - 1.38 * gd_1612, Digits);
   if (gd_1612 > 5.0) gd_1624 = gd_1612;
   else gd_1624 = 10000.0 * gd_1612;
   if (gd_1640 > 5.0) {
      gd_1632 = gd_1640;
      return;
   }
   gd_1632 = 10000.0 * gd_1640;
}

void CalculateWeeklyFibo() {
   ArrayCopyRates(gda_1576, Symbol(), PERIOD_W1);
   if (gi_1472 == FALSE) {
      gd_1492 = gda_1576[1][4];
      gd_1476 = gda_1576[1][3];
      gd_1484 = gda_1576[1][2];
      gi_1500 = gda_1576[1][0] + 518400.0;
   }
   gd_1540 = gd_1476 - gd_1484;
   gd_1532 = (gd_1476 + gd_1484 + gd_1492) / 3.0;
   gda_1548[5] = 1.382 * gd_1540 + gd_1532;
   gda_1548[4] = 1.236 * gd_1540 + gd_1532;
   gda_1548[3] = 1.0 * gd_1540 + gd_1532;
   gda_1548[2] = 0.618 * gd_1540 + gd_1532;
   gda_1548[1] = gd_1540 / 2.0 + gd_1532;
   gda_1548[6] = gd_1532 - gd_1540 / 2.0;
   gda_1548[7] = gd_1532 - 0.618 * gd_1540;
   gda_1548[8] = gd_1532 - 1.0 * gd_1540;
   gda_1548[9] = gd_1532 - 1.236 * gd_1540;
   gda_1548[10] = gd_1532 - 1.382 * gd_1540;
   if (gd_1540 > 5.0) gd_1552 = gd_1540;
   else gd_1552 = 10000.0 * gd_1540;
   if (gd_1568 > 5.0) {
      gd_1560 = gd_1568;
      return;
   }
   gd_1560 = 10000.0 * gd_1568;
}

void DrawWeekly() {
   int li_0 = gi_1500 + 518400 + 86400;
   ObjectSet("RestrictedZone", OBJPROP_TIME1, gi_1500);
   ObjectSet("RestrictedZone  ", OBJPROP_TIME2, li_0);
   ObjectSet("RestrictedZone", OBJPROP_PRICE1, gda_1548[1] - 5.0 * Point);
   ObjectSet("RestrictedZone", OBJPROP_PRICE2, gda_1548[1] - 5.0 * Point);
   ObjectSet("RestrictedZone", OBJPROP_COLOR, DarkSlateGray);
   ObjectSet("WeeklyBuyOnlyZone1", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklyBuyOnlyZone1", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklyBuyOnlyZone1", OBJPROP_PRICE1, gda_1548[6] - 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone1", OBJPROP_PRICE2, gda_1548[6] + 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone1", OBJPROP_COLOR, LightCyan);
   ObjectSet("WeeklyBuyOnlyZone1", OBJPROP_WIDTH, 2);
   ObjectSet("WeeklyBuyOnlyZone1", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklyBuyOnlyZone2", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklyBuyOnlyZone3", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklyBuyOnlyZone4", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklyBuyOnlyZone5", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklySellOnlyZone1", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklySellOnlyZone2", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklySellOnlyZone3", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklySellOnlyZone4", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklySellOnlyZone5", OBJPROP_RAY, FALSE);
   ObjectSet("WeeklyBuyOnlyZone2", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklyBuyOnlyZone2", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklyBuyOnlyZone2", OBJPROP_PRICE1, gda_1548[7] - 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone2", OBJPROP_PRICE2, gda_1548[7] + 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone2", OBJPROP_COLOR, LightBlue);
   ObjectSet("WeeklyBuyOnlyZone2", OBJPROP_WIDTH, 2);
   ObjectSet("WeeklyBuyOnlyZone3", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklyBuyOnlyZone3", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklyBuyOnlyZone3", OBJPROP_PRICE1, gda_1548[8] - 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone3", OBJPROP_PRICE2, gda_1548[8] + 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone3", OBJPROP_COLOR, CornflowerBlue);
   ObjectSet("WeeklyBuyOnlyZone3", OBJPROP_WIDTH, 2);
   ObjectSet("WeeklyBuyOnlyZone4", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklyBuyOnlyZone4", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklyBuyOnlyZone4", OBJPROP_PRICE1, gda_1548[9] - 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone4", OBJPROP_PRICE2, gda_1548[9] + 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone4", OBJPROP_COLOR, Blue);
   ObjectSet("WeeklyBuyOnlyZone4", OBJPROP_WIDTH, 2);
   ObjectSet("WeeklyBuyOnlyZone5", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklyBuyOnlyZone5", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklyBuyOnlyZone5", OBJPROP_PRICE1, gda_1548[10] - 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone5", OBJPROP_PRICE2, gda_1548[10] + 0.0 * Point);
   ObjectSet("WeeklyBuyOnlyZone5", OBJPROP_COLOR, Blue);
   ObjectSet("WeeklyBuyOnlyZone5", OBJPROP_WIDTH, 2);
   ObjectSet("WeeklySellOnlyZone1", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklySellOnlyZone1", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklySellOnlyZone1", OBJPROP_PRICE1, gda_1548[1] + 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone1", OBJPROP_PRICE2, gda_1548[1] - 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone1", OBJPROP_COLOR, Bisque);
   ObjectSet("WeeklySellOnlyZone1", OBJPROP_WIDTH, 2);
   ObjectSet("WeeklySellOnlyZone2", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklySellOnlyZone2", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklySellOnlyZone2", OBJPROP_PRICE1, gda_1548[2] + 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone2", OBJPROP_PRICE2, gda_1548[2] - 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone2", OBJPROP_COLOR, LightSalmon);
   ObjectSet("WeeklySellOnlyZone2", OBJPROP_WIDTH, 2);
   ObjectSet("WeeklySellOnlyZone3", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklySellOnlyZone3", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklySellOnlyZone3", OBJPROP_PRICE1, gda_1548[3] + 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone3", OBJPROP_PRICE2, gda_1548[3] - 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone3", OBJPROP_COLOR, Red);
   ObjectSet("WeeklySellOnlyZone3", OBJPROP_WIDTH, 2);
   ObjectSet("WeeklySellOnlyZone4", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklySellOnlyZone4", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklySellOnlyZone4", OBJPROP_PRICE1, gda_1548[4] + 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone4", OBJPROP_PRICE2, gda_1548[4] - 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone4", OBJPROP_COLOR, Maroon);
   ObjectSet("WeeklySellOnlyZone4", OBJPROP_WIDTH, 2);
   ObjectSet("WeeklySellOnlyZone5", OBJPROP_TIME1, gi_1500);
   ObjectSet("WeeklySellOnlyZone5", OBJPROP_TIME2, li_0);
   ObjectSet("WeeklySellOnlyZone5", OBJPROP_PRICE1, gda_1548[5] + 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone5", OBJPROP_PRICE2, gda_1548[5] - 0.0 * Point);
   ObjectSet("WeeklySellOnlyZone5", OBJPROP_COLOR, Maroon);
   ObjectSet("WeeklySellOnlyZone5", OBJPROP_WIDTH, 2);
   ObjectCreate("HorizontalLine1", OBJ_HLINE, 0, 0, Bid);
   ObjectSet("HorizontalLine1", OBJPROP_PRICE1, Bid);
   ObjectSet("HorizontalLine1", OBJPROP_COLOR, Gray);
   ObjectCreate("VerticalLine1", OBJ_VLINE, 0, 0, TimeCurrent());
   ObjectSet("VerticalLine1", OBJPROP_TIME1, TimeCurrent());
   ObjectSet("VerticalLine1", OBJPROP_COLOR, Gray);
}

void DrawDaily() {
   string ls_0 = StringSubstr(TimeToStr(TimeCurrent()), 0, 10) + " 00:00";
   int li_8 = StrToTime(ls_0) + 86400;
   ObjectSet("RestrictedZone", OBJPROP_TIME1, gi_1528);
   ObjectSet("RestrictedZone", OBJPROP_TIME2, li_8);
   ObjectSet("RestrictedZone", OBJPROP_PRICE1, gda_1620[1] - 5.0 * Point);
   ObjectSet("RestrictedZone", OBJPROP_PRICE2, gda_1620[6] + 5.0 * Point);
   ObjectSet("DailyBuyOnlyZone1", OBJPROP_TIME1, gi_1528);
   ObjectSet("DailyBuyOnlyZone1", OBJPROP_TIME2, li_8);
   ObjectSet("DailyBuyOnlyZone1", OBJPROP_PRICE1, gda_1620[6] - 0.0 * Point);
   ObjectSet("DailyBuyOnlyZone1", OBJPROP_PRICE2, gda_1620[7] + 0.0 * Point);
   ObjectSet("DailyBuyOnlyZone2", OBJPROP_TIME1, gi_1528);
   ObjectSet("DailyBuyOnlyZone2", OBJPROP_TIME2, li_8);
   ObjectSet("DailyBuyOnlyZone2", OBJPROP_PRICE1, gda_1620[7] - 0.0 * Point);
   ObjectSet("DailyBuyOnlyZone2", OBJPROP_PRICE2, gda_1620[8] + 0.0 * Point);
   ObjectSet("DailyBuyOnlyZone3", OBJPROP_TIME1, gi_1528);
   ObjectSet("DailyBuyOnlyZone3", OBJPROP_TIME2, li_8);
   ObjectSet("DailyBuyOnlyZone3", OBJPROP_PRICE1, gda_1620[8] - 0.0 * Point);
   ObjectSet("DailyBuyOnlyZone3", OBJPROP_PRICE2, gda_1620[9] + 0.0 * Point);
   ObjectSet("DailyBuyOnlyZone4", OBJPROP_TIME1, gi_1528);
   ObjectSet("DailyBuyOnlyZone4", OBJPROP_TIME2, li_8);
   ObjectSet("DailyBuyOnlyZone4", OBJPROP_PRICE1, gda_1620[9] - 0.0 * Point);
   ObjectSet("DailyBuyOnlyZone4", OBJPROP_PRICE2, gda_1620[10] + 0.0 * Point);
   ObjectSet("DailySellOnlyZone1", OBJPROP_TIME1, gi_1528);
   ObjectSet("DailySellOnlyZone1", OBJPROP_TIME2, li_8);
   ObjectSet("DailySellOnlyZone1", OBJPROP_PRICE1, gda_1620[1] + 0.0 * Point);
   ObjectSet("DailySellOnlyZone1", OBJPROP_PRICE2, gda_1620[2] - 0.0 * Point);
   ObjectSet("DailySellOnlyZone2", OBJPROP_TIME1, gi_1528);
   ObjectSet("DailySellOnlyZone2", OBJPROP_TIME2, li_8);
   ObjectSet("DailySellOnlyZone2", OBJPROP_PRICE1, gda_1620[2] + 0.0 * Point);
   ObjectSet("DailySellOnlyZone2", OBJPROP_PRICE2, gda_1620[3] - 0.0 * Point);
   ObjectSet("DailySellOnlyZone3", OBJPROP_TIME1, gi_1528);
   ObjectSet("DailySellOnlyZone3", OBJPROP_TIME2, li_8);
   ObjectSet("DailySellOnlyZone3", OBJPROP_PRICE1, gda_1620[3] + 0.0 * Point);
   ObjectSet("DailySellOnlyZone3", OBJPROP_PRICE2, gda_1620[4] - 0.0 * Point);
   ObjectSet("DailySellOnlyZone4", OBJPROP_TIME1, gi_1528);
   ObjectSet("DailySellOnlyZone4", OBJPROP_TIME2, li_8);
   ObjectSet("DailySellOnlyZone4", OBJPROP_PRICE1, gda_1620[4] + 0.0 * Point);
   ObjectSet("DailySellOnlyZone4", OBJPROP_PRICE2, gda_1620[5] - 0.0 * Point);
   ObjectCreate("HorizontalLine1", OBJ_HLINE, 0, 0, Bid);
   ObjectSet("HorizontalLine1", OBJPROP_PRICE1, Bid);
   ObjectSet("HorizontalLine1", OBJPROP_COLOR, Gray);
   ObjectCreate("VerticalLine1", OBJ_VLINE, 0, 0, TimeCurrent());
   ObjectSet("VerticalLine1", OBJPROP_TIME1, TimeCurrent());
   ObjectSet("VerticalLine1", OBJPROP_COLOR, Gray);
}

bool SpreadImpact() {
   if (StringSubstr(Symbol(), 0, 6) == "EURUSD" && MarketInfo(Symbol(), MODE_SPREAD) > gi_1396) return (TRUE);
   if (StringSubstr(Symbol(), 0, 6) == "EURUSD" && MarketInfo(Symbol(), MODE_SPREAD) > gi_1396) return (TRUE);
   return (FALSE);
}

void ReInit() {
   gd_672 = 0;
   gi_764 = 0;
   gd_664 = 0;
   gi_760 = 0;
   gd_688 = 0;
   gi_772 = 0;
   gd_680 = 0;
   gi_768 = 0;
   gd_736 = 0;
   gi_796 = 0;
   gd_728 = 0;
   gi_792 = 0;
   gd_704 = 0;
   gi_780 = 0;
   gd_696 = 0;
   gi_776 = 0;
   gd_720 = 0;
   gi_788 = 0;
   gd_712 = 0;
   gi_784 = 0;
   gi_800 = 0;
   gi_800 = 0;
   gd_744 = 0;
   gi_804 = 0;
   gi_804 = 0;
   gd_752 = 0;
}

string CurrentTime() {
   string ls_0 = StringConcatenate(DoubleToStr(Hour(), 0), ":", DoubleToStr(Minute(), 0));
   if (Hour() < 10) ls_0 = "0" + ls_0;
   if (Minute() < 10) ls_0 = StringSubstr(ls_0, 0, 2) + ":0" + StringSubstr(ls_0, 3);
   return (ls_0);
}

void DisplayNewsHours() {
   int li_0 = 0;
   if (DayOfWeek() == 1) {
      for (li_0 = 1; li_0 < 13; li_0++)
         if (gia_1824[li_0] > 0) gia_1844[li_0] = gia_1824[li_0];
      ShowTodayNewsHours();
   }
   if (DayOfWeek() == 2) {
      for (li_0 = 1; li_0 < 13; li_0++)
         if (gia_1828[li_0] > 0) gia_1844[li_0] = gia_1828[li_0];
      ShowTodayNewsHours();
   }
   if (DayOfWeek() == 3) {
      for (li_0 = 1; li_0 < 13; li_0++)
         if (gia_1832[li_0] > 0) gia_1844[li_0] = gia_1832[li_0];
      ShowTodayNewsHours();
   }
   if (DayOfWeek() == 4) {
      for (li_0 = 1; li_0 < 13; li_0++)
         if (gia_1836[li_0] > 0) gia_1844[li_0] = gia_1836[li_0];
      ShowTodayNewsHours();
   }
   if (DayOfWeek() == 5) {
      for (li_0 = 1; li_0 < 13; li_0++)
         if (gia_1840[li_0] > 0) gia_1844[li_0] = gia_1840[li_0];
      ShowTodayNewsHours();
   }
}

double SymbolProfit() {
   double ld_0 = 0;
   for (int li_8 = 0; li_8 < OrdersTotal(); li_8++) {
      OrderSelect(li_8, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == gi_620 || OrderMagicNumber() == gi_624 || OrderMagicNumber() == gi_628 || OrderMagicNumber() == gi_632 || OrderMagicNumber() == gi_636 ||
         OrderMagicNumber() == gi_640 || OrderMagicNumber() == gi_644 || OrderMagicNumber() == gi_648 || OrderMagicNumber() == gi_652 || OrderMagicNumber() == gi_656)
         if (OrderProfit() > 0.0) ld_0 += OrderProfit();
   }
   return (ld_0);
}

double SymbolLoss() {
   double ld_0 = 0;
   for (int li_8 = 0; li_8 < OrdersTotal(); li_8++) {
      OrderSelect(li_8, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == gi_620 || OrderMagicNumber() == gi_624 || OrderMagicNumber() == gi_628 || OrderMagicNumber() == gi_632 || OrderMagicNumber() == gi_636 ||
         OrderMagicNumber() == gi_640 || OrderMagicNumber() == gi_644 || OrderMagicNumber() == gi_648 || OrderMagicNumber() == gi_652 || OrderMagicNumber() == gi_656)
         if (OrderProfit() < 0.0) ld_0 += OrderProfit();
   }
   return (ld_0);
}

bool Fluctuation() {
   if ((Open[0] - Ask) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation || (Bid - Open[0]) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation || (Open[1] - Ask) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation ||
      (Bid - Open[1]) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation || (Open[2] - Ask) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation || (Bid - Open[2]) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation ||
      (Low[0] - High[0]) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation || (High[0] - Low[0]) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation || (Low[1] - High[1]) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation ||
      (High[1] - Low[1]) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation || (Low[2] - High[2]) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation || (High[2] - Low[2]) / MarketInfo(Symbol(), MODE_POINT) > PriceFluctuation) return (TRUE);
   return (FALSE);
}

double SymbolNetProfit() {
   return (SymbolProfit() + SymbolLoss());
}

void DrawInfoBox() {
   DisplayText("c1", "_______________________________", "Fixedsys", 18, DarkGray, 404, 205);
   for (int li_0 = 0; li_0 < 220; li_0 += 10) DisplayText("a" + li_0, "|                              |                              |", "Fixedsys", 12, DarkGray, 400, li_0);
   DisplayText("aaa", "|                              |                              |", "Fixedsys", 12, DarkGray, 400, li_0);
}

bool InitCurrency1NewsFile() {
   string ls_4;
   string ls_12;
   string ls_20;
   string ls_28;
   string ls_36;
   int li_44;
   int li_48;
   int li_56;
   if (IsTesting() == 0) {
      gs_1892 = StringSubstr(Symbol(), 0, 3) + "_News.txt";
      li_44 = FileOpen(gs_1892, FILE_CSV|FILE_READ);
      if (li_44 < 1) {
         li_44 = FileOpen(gs_1892, FILE_CSV|FILE_WRITE);
         FileWrite(li_44, "MON: ");
         FileWrite(li_44, "TUE: ");
         FileWrite(li_44, "WED: ");
         FileWrite(li_44, "THU: ");
         FileWrite(li_44, "FRI: ");
         FileWrite(li_44, "-----------------------------");
         FileWrite(li_44, " ");
         FileWrite(li_44, "Important Notes:");
         FileWrite(li_44, " 1. Enter the news release hours in accordance with your broker timing only");
         FileWrite(li_44, " 2. Only Six Hours can be entered for each currency (the impact will continue for 2 hours)");
         FileWrite(li_44, " 3. Hours format must be in 2 digits, example (Mon: 01 05 12 14 18 22 ");
         FileWrite(li_44, " 4. 00 hour (midnight) must be entered as 24");
         FileWrite(li_44, " 5. If you feel the format is incorrect or you receive file format error, delete the entire file and restart the EA");
         FileWrite(li_44, " 6. You can change the hours any time during live trading without switching off the EA");
         FileFlush(li_44);
         FileClose(li_44);
         Sleep(1000);
         return (TRUE);
      }
      li_48 = 3;
      ls_4 = FileReadString(li_44);
      ls_12 = FileReadString(li_44);
      ls_20 = FileReadString(li_44);
      ls_28 = FileReadString(li_44);
      ls_36 = FileReadString(li_44);
      if (!(StringSubstr(ls_4, 0, 5) == "MON: ") || StringLen(ls_4) > 32) {
         MessageBox("Invalid File Structure (Day 1)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_56 = 5;
      for (int li_0 = 1; li_0 < 7; li_0++) {
         gia_1824[li_0] = StrToDouble(StringSubstr(ls_4, li_56, 2));
         li_56 += 3;
         if (gia_1824[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[1] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      if (!(StringSubstr(ls_12, 0, 5) == "TUE: ") || StringLen(ls_12) > 32) {
         MessageBox("Invalid File Structure (Day 2)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_56 = 5;
      for (li_0 = 1; li_0 < 7; li_0++) {
         gia_1828[li_0] = StrToDouble(StringSubstr(ls_12, li_56, 2));
         li_56 += 3;
         if (gia_1828[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[2] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      if (!(StringSubstr(ls_20, 0, 5) == "WED: ") || StringLen(ls_20) > 32) {
         MessageBox("Invalid File Structure (Day 3)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_56 = 5;
      for (li_0 = 1; li_0 < 7; li_0++) {
         gia_1832[li_0] = StrToDouble(StringSubstr(ls_20, li_56, 2));
         li_56 += 3;
         if (gia_1832[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[3] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      if (!(StringSubstr(ls_28, 0, 5) == "THU: ") || StringLen(ls_28) > 32) {
         MessageBox("Invalid File Structure (Day 4)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_56 = 5;
      for (li_0 = 1; li_0 < 7; li_0++) {
         gia_1836[li_0] = StrToDouble(StringSubstr(ls_28, li_56, 2));
         li_56 += 3;
         if (gia_1836[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[4] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      if (!(StringSubstr(ls_36, 0, 5) == "FRI: ") || StringLen(ls_36) > 32) {
         MessageBox("Invalid File Structure (Day 5)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_56 = 5;
      for (li_0 = 1; li_0 < 7; li_0++) {
         gia_1840[li_0] = StrToDouble(StringSubstr(ls_36, li_56, 2));
         li_56 += 3;
         if (gia_1840[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[5] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      FileClose(li_44);
      Sleep(1000);
   }
   return (TRUE);
}

bool InitCurrency2NewsFile() {
   string ls_4;
   string ls_12;
   string ls_20;
   string ls_28;
   string ls_36;
   int li_44;
   int li_48;
   if (IsTesting() == 0) {
      gs_1900 = StringSubstr(Symbol(), 3, 3) + "_News.txt";
      li_44 = FileOpen(gs_1900, FILE_CSV|FILE_READ);
      if (li_44 < 1) {
         li_44 = FileOpen(gs_1900, FILE_CSV|FILE_WRITE);
         FileWrite(li_44, "MON:  ");
         FileWrite(li_44, "TUE: ");
         FileWrite(li_44, "WED: ");
         FileWrite(li_44, "THU: ");
         FileWrite(li_44, "FRI: ");
         FileWrite(li_44, "-----------------------------");
         FileWrite(li_44, " ");
         FileWrite(li_44, "Important Notes:");
         FileWrite(li_44, " 1. Enter the news release hours in accordance with your broker timing only");
         FileWrite(li_44, " 2. Only Six Hours can be entered for each currency (the impact will continue for 2 hours)");
         FileWrite(li_44, " 3. Hours format must be in 2 digits, example (Mon: 01 05 12 14 18 22 ");
         FileWrite(li_44, " 4. 00 hour (midnight) must be entered as 24");
         FileWrite(li_44, " 5. If you feel the format is incorrect or you receive file format error, delete the entire file and restart the EA");
         FileWrite(li_44, " 6. You can change the hours any time during live trading without switching off the EA");
         FileFlush(li_44);
         FileClose(li_44);
         Sleep(1000);
         return (TRUE);
      }
      ls_4 = FileReadString(li_44);
      ls_12 = FileReadString(li_44);
      ls_20 = FileReadString(li_44);
      ls_28 = FileReadString(li_44);
      ls_36 = FileReadString(li_44);
      if (!(StringSubstr(ls_4, 0, 5) == "MON: ") || StringLen(ls_4) > 32) {
         MessageBox("Invalid File Structure (Day 1)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_48 = 5;
      for (int li_0 = 7; li_0 < 13; li_0++) {
         gia_1824[li_0] = StrToDouble(StringSubstr(ls_4, li_48, 2));
         li_48 += 3;
         if (gia_1824[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[1] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      if (!(StringSubstr(ls_12, 0, 5) == "TUE: ") || StringLen(ls_12) > 32) {
         MessageBox("Invalid File Structure (Day 2)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_48 = 5;
      for (li_0 = 7; li_0 < 13; li_0++) {
         gia_1828[li_0] = StrToDouble(StringSubstr(ls_12, li_48, 2));
         li_48 += 3;
         if (gia_1828[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[2] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      if (!(StringSubstr(ls_20, 0, 5) == "WED: ") || StringLen(ls_20) > 32) {
         MessageBox("Invalid File Structure (Day 3)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_48 = 5;
      for (li_0 = 7; li_0 < 13; li_0++) {
         gia_1832[li_0] = StrToDouble(StringSubstr(ls_20, li_48, 2));
         li_48 += 3;
         if (gia_1832[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[3] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      if (!(StringSubstr(ls_28, 0, 5) == "THU: ") || StringLen(ls_28) > 32) {
         MessageBox("Invalid File Structure (Day 4)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_48 = 5;
      for (li_0 = 7; li_0 < 13; li_0++) {
         gia_1836[li_0] = StrToDouble(StringSubstr(ls_28, li_48, 2));
         li_48 += 3;
         if (gia_1836[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[4] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      if (!(StringSubstr(ls_36, 0, 5) == "FRI: ") || StringLen(ls_36) > 32) {
         MessageBox("Invalid File Structure (Day 5)", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
         return (FALSE);
      }
      li_48 = 5;
      for (li_0 = 7; li_0 < 13; li_0++) {
         gia_1840[li_0] = StrToDouble(StringSubstr(ls_36, li_48, 2));
         li_48 += 3;
         if (gia_1840[li_0] > 24) {
            MessageBox("Invalid Hour in " + gsa_356[4] + " (" + gia_1824[li_0] + ")", "Error", MB_OKCANCEL|MB_ICONEXCLAMATION);
            return (FALSE);
         }
      }
      FileClose(li_44);
   }
   return (TRUE);
}

void ShowTodayNewsHours() {
   DisplayText("currency1", StringSubstr(Symbol(), 0, 3), "Fixedsys", 16, White, 670, 65);
   if (gia_1844[1] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[1] > 0) DisplayText("hours1", gia_1844[1] + ":00", "Fixedsys", 14, gi_1820, 710, 65);
   if (gia_1844[2] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[2] > 0) DisplayText("hours2", gia_1844[2] + ":00", "Fixedsys", 14, gi_1820, 770, 65);
   if (gia_1844[3] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[3] > 0) DisplayText("hours3", gia_1844[3] + ":00", "Fixedsys", 14, gi_1820, 830, 65);
   if (gia_1844[4] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[4] > 0) DisplayText("hours4", gia_1844[4] + ":00", "Fixedsys", 14, gi_1820, 710, 80);
   if (gia_1844[5] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[5] > 0) DisplayText("hours5", gia_1844[5] + ":00", "Fixedsys", 14, gi_1820, 770, 80);
   if (gia_1844[6] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[6] > 0) DisplayText("hours6", gia_1844[6] + ":00", "Fixedsys", 14, gi_1820, 830, 80);
   DisplayText("currency2", StringSubstr(Symbol(), 3, 3), "Fixedsys", 16, White, 670, 100);
   if (gia_1844[7] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[7] > 0) DisplayText("hours7", gia_1844[7] + ":00", "Fixedsys", 14, gi_1820, 710, 100);
   if (gia_1844[8] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[8] > 0) DisplayText("hours8", gia_1844[8] + ":00", "Fixedsys", 14, gi_1820, 770, 100);
   if (gia_1844[9] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[9] > 0) DisplayText("hours9", gia_1844[9] + ":00", "Fixedsys", 14, gi_1820, 830, 100);
   if (gia_1844[10] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[10] > 0) DisplayText("hours10", gia_1844[10] + ":00", "Fixedsys", 14, gi_1820, 710, 115);
   if (gia_1844[11] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[11] > 0) DisplayText("hours11", gia_1844[11] + ":00", "Fixedsys", 14, gi_1820, 770, 115);
   if (gia_1844[12] == Hour()) gi_1820 = 255;
   else gi_1820 = 11119017;
   if (gia_1844[12] > 0) DisplayText("hours12", gia_1844[12] + ":00", "Fixedsys", 14, gi_1820, 830, 115);
}

bool NewsHour() {
   for (int li_0 = 1; li_0 <= 12; li_0++) {
      if (gia_1844[li_0] == 0) return (FALSE);
      if (Hour() == gia_1844[li_0] && gia_1844[li_0] > 0) return (TRUE);
      if (Hour() == gia_1844[li_0] + 1 && gia_1844[li_0] < 24) return (TRUE);
      if (Hour() == 1 && gia_1844[li_0] == 24) return (TRUE);
      if (Hour() == 0 && gia_1844[li_0] == 24) return (TRUE);
   }
   return (FALSE);
}

void WriteStatusFile() {
   string ls_0;
   int li_8;
   if (IsTesting() == 0) {
      ls_0 = "Multiple10_" + Symbol() + "_" + DoubleToStr(AccountNumber(), 0) + ".info";
      li_8 = FileOpen(ls_0, FILE_CSV|FILE_WRITE);
      FileWrite(li_8, DoubleToStr(gd_1848, 2));
      FileWrite(li_8, DoubleToStr(gd_1856, 2));
      FileWrite(li_8, DoubleToStr(gd_1864, 2));
      FileWrite(li_8, DoubleToStr(gd_1872, 2));
      FileWrite(li_8, DoubleToStr(gd_1880, 2));
      FileWrite(li_8, gd_664);
      FileWrite(li_8, gi_760);
      FileWrite(li_8, gd_672);
      FileWrite(li_8, gi_764);
      FileWrite(li_8, gd_680);
      FileWrite(li_8, gi_768);
      FileWrite(li_8, gd_688);
      FileWrite(li_8, gi_772);
      FileWrite(li_8, gd_696);
      FileWrite(li_8, gi_776);
      FileWrite(li_8, gd_704);
      FileWrite(li_8, gi_780);
      FileWrite(li_8, gd_712);
      FileWrite(li_8, gi_784);
      FileWrite(li_8, gd_720);
      FileWrite(li_8, gi_788);
      FileWrite(li_8, gd_728);
      FileWrite(li_8, gi_792);
      FileWrite(li_8, gd_736);
      FileWrite(li_8, gi_796);
      FileFlush(li_8);
      FileClose(li_8);
   }
}

void InitStatusFile() {
   string ls_0;
   int li_8;
   if (IsTesting() == 0) {
      ls_0 = "Multiple10_" + Symbol() + "_" + DoubleToStr(AccountNumber(), 0) + ".info";
      li_8 = FileOpen(ls_0, FILE_CSV|FILE_READ);
      if (li_8 < 1 || IsTesting()) WriteStatusFile();
      FileClose(li_8);
      li_8 = FileOpen(ls_0, FILE_CSV|FILE_READ);
      gd_1848 = FileReadNumber(li_8);
      gd_1856 = FileReadNumber(li_8);
      gd_1864 = FileReadNumber(li_8);
      gd_1872 = FileReadNumber(li_8);
      gd_1880 = FileReadNumber(li_8);
      gd_664 = FileReadNumber(li_8);
      gi_760 = FileReadNumber(li_8);
      gd_672 = FileReadNumber(li_8);
      gi_764 = FileReadNumber(li_8);
      gd_680 = FileReadNumber(li_8);
      gi_768 = FileReadNumber(li_8);
      gd_688 = FileReadNumber(li_8);
      gi_772 = FileReadNumber(li_8);
      gd_696 = FileReadNumber(li_8);
      gi_776 = FileReadNumber(li_8);
      gd_704 = FileReadNumber(li_8);
      gi_780 = FileReadNumber(li_8);
      gd_712 = FileReadNumber(li_8);
      gi_784 = FileReadNumber(li_8);
      gd_720 = FileReadNumber(li_8);
      gi_788 = FileReadNumber(li_8);
      gd_728 = FileReadNumber(li_8);
      gi_792 = FileReadNumber(li_8);
      gd_736 = FileReadNumber(li_8);
      gi_796 = FileReadNumber(li_8);
      FileClose(li_8);
   }
}

void SetTakeProfitAllOrders(int ai_0, double ad_4) {
   for (gi_808 = 0; gi_808 < OrdersTotal(); gi_808++) {
      OrderSelect(gi_808, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol() && ai_0 == OrderMagicNumber()) OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), gd_512, 0, Black);
   }
}