Navigation´╝ÜHome > Content >

Dolly_v13_ultimaforex~.mq4

Time: 2010-10-21 | Download file:Dolly_v13_ultimaforex~.mq4

/*
   Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
   Website: http://purebeam.biz
   E-mail : [email protected]
*/
#property copyright "Property of www.forex-tsd.com"
#property link      " Dolly Graphics cja"

#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 Black
#property indicator_color2 Black
#property indicator_color3 Black
#property indicator_color4 Black
#property indicator_color5 Black
#property indicator_color6 Black
#property indicator_color7 Black
#property indicator_color8 Black

#import "kernel32.dll"
   void GetLocalTime(int& a0[]);
   int GetTimeZoneInformation(int& a0[]);
#import

extern string Dolly_PassWord = "";
extern bool Show_DollyTrading_Instructions = FALSE;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_1 = "<<<< If Broker GMT+2 enter 2 >>>>>>";
extern int GMTHours = 0;
extern int GMTMinutes = 0;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_2 = "<<<< true=Open false=Pivot >>>>>>>>>";
extern bool Using_OpenGraphics = TRUE;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_3 = "<<<< Dolly Settings >>>>>>>>>>>>>>>>>>>>>>>>";
extern bool Dolly_GRAPHICS_SOLID = TRUE;
extern int BUY_Target_2 = 50;
extern int BUY_Target_1 = 40;
extern int BUY_Area = 20;
extern int SELL_Area = 20;
extern int SELL_Target_1 = 40;
extern int SELL_Target_2 = 50;
extern int SHIFT_TargetText = 0;
extern int TargetText_Size = 9;
extern string TargetText_Font = "Arial Bold";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_4 = "<<<< Daily Average Settings >>>>>>>>>>>>>>>>>>>";
extern bool Show_DailyAverageGRAPHICS = TRUE;
extern bool Daily_AverageGRAPHICS_SOLID = TRUE;
extern int SHIFT_DailyAverageText = 20;
extern int DailyAverage_FontSize = 9;
extern string DailyAverage_Font = "Arial Bold";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_5 = "<<<< Colors Options 1 to 8 >>>>>>>>>";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_5A = "<<<>>>>>>>>";
extern int Color_Options = 1;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_5B = "<<<< Manual Color Inputs >>>>>>>>>";
extern color Buy_Text_col = DodgerBlue;
extern color Sell_Text_col = DarkOrange;
extern color Av_TextUP_col = DeepSkyBlue;
extern color Av_TextDN_col = Yellow;
extern color BuyCol_2 = C'0x00,0x00,0x96';
extern color BuyCol_1 = C'0x00,0x00,0x64';
extern color SellCol_1 = C'0x78,0x00,0x00';
extern color SellCol_2 = C'0xAA,0x00,0x00';
extern color AvUP_col_150 = C'0x00,0x6E,0xFF';
extern color AvUP_col_125 = C'0x00,0x46,0xFF';
extern color AvUP_col_100 = C'0x14,0x14,0xFF';
extern color AvUP_col_75 = C'0x00,0x00,0xD2';
extern color AvUP_col_50 = C'0x00,0x00,0xBE';
extern color AvDN_col_50 = C'0xC8,0x00,0x00';
extern color AvDN_col_75 = C'0xDC,0x00,0x00';
extern color AvDN_col_100 = C'0xFF,0x00,0x0A';
extern color AvDN_col_125 = C'0xFF,0x46,0x00';
extern color AvDN_col_150 = C'0xFF,0x6E,0x00';
extern color Pivot_color = Gray;
extern color Open_color = YellowGreen;
extern color Fib_color = Green;
extern color Comment_Background_col = Black;
extern color Comment_Border_col = Gray;
extern bool Show_Background_and_Border = TRUE;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_6 = "<<<< Comment Settings >>>>>>>>>>>>>>>>>>>>>>";
extern bool Auto_Signals = FALSE;
extern bool Show_DollyCOMMENTS = TRUE;
extern int Shift_DollyCOMMENTS_UP_DN = 0;
extern int Shift_DollyCOMMENTS_SIDEWAYS = 0;
extern bool Show_CommentsText_Bold = TRUE;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_7 = "<<<< TREND + Entry Signals >>>>>>>>>";
extern bool Show_ENTRY_TREND_Analysis = TRUE;
extern int Shift_ENTRY_TREND_UP_DN = 0;
extern int Shift_ENTRY_TREND_SIDEWAYS = 0;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_7a = "<<<< ENTRY EXIT Alerts >>>>>>>>>";
extern int EntrySignal_TimeFrame1 = 1;
extern int EntrySignal_TimeFrame2 = 5;
extern bool EntrySignal_AlertON = FALSE;
extern bool EntrySignal_SoundON = FALSE;
extern string EntrySignal_SoundFileUP = "alert2";
extern string EntrySignal_SoundFileDN = "alert2";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_7b = "<<<< TREND Analysis Alerts >>>>>>>>>";
extern int Analysis_TimeFrame = 5;
extern bool ENTRY_TREND_AlertON = FALSE;
extern bool ENTRY_TREND_SoundON = FALSE;
extern string ENTRY_TREND_SoundFileUP = "alert2";
extern string ENTRY_TREND_SoundFileDN = "alert2";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_7c = "<<<< MAIN TREND Alerts >>>>>>>>>";
extern int Maintrend_TimeFrame = 60;
extern bool Maintrend_AlertON = FALSE;
extern bool Maintrend_SoundON = FALSE;
extern string Maintrend_SoundFileUP = "alert2";
extern string Maintrend_SoundFileDN = "alert2";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_8 = "<<<< Pivot Level Settings >>>>>>>>>>>>>>>>>>>>>>";
extern bool Show_PivotLines = FALSE;
extern bool Show_M_PivotLines = FALSE;
extern int SHIFT_PivotPointText = 2;
extern int Pivot_FontSize = 9;
extern string Pivot_Font = "Arial Bold";
extern int PivotPoint_ExtendLINE = 0;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_9 = "<<<< Fib Level Settings >>>>>>>>>>>>>>>>>>>";
extern bool Show_FibLines = FALSE;
extern bool Show_EXTRAFibLines = FALSE;
extern int SHIFT_FibText = 30;
extern int Fib_FontSize = 9;
extern string Fib_Font = "Arial Bold";
extern int FIB_ExtendDISPLAY = 1;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_10 = "<<<< Prev High & Low Settings >>>>>>>>>>>>>>>>>>>>>";
extern bool Show_PrevDaily_HI_LOW = FALSE;
extern int SHIFT_HI_LOW_TEXT = 50;
extern int HI_LOW_FontSize = 9;
extern string HI_LOW_Font = "Arial Bold";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_11 = "<<<< Daily Open Settings >>>>>>>>>>>>>>>>>>>>";
extern bool Show_Daily_OPEN = TRUE;
extern int SHIFT_Daily_OPEN_TEXT = 0;
extern int Open_FontSize = 9;
extern string Open_Font = "Arial Bold";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_12 = "<<<< Central Pivot Settings >>>>>>>>>>>>>>>>>>>>";
extern bool Show_CentralPIVOT_Only = TRUE;
extern int SHIFT_CentralPIVOT_Only_TEXT = 0;
extern int CentralPivot_FontSize = 9;
extern string CentralPivot_Font = "Arial Bold";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_13 = "<<<< Change Display Settings >>>>>>>>>>>>>>>>>>>>";
extern bool Show_ChangeDISPLAY = TRUE;
extern bool Show_Percentage = TRUE;
extern int Shift_Change_UP_DN = 0;
extern int Shift_Change_SIDEWAYS = 550;
extern int Change_FontSize = 15;
extern string Change_Font = "Arial Bold";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_14 = "<<<< Time Info Display Settings >>>>>>>>>>>>>>>>>>>>";
extern bool Show_TimeDISPLAY = FALSE;
extern int Shift_Time_UP_DN = 0;
extern int Shift_Time_SIDEWAYS = 0;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_15 = "<<<< Time Trade Display Settings >>>>>>>>>>>>>>>>>>>>";
extern int Trade_FontSize = 9;
extern string Trade_Font = "Arial";
extern color PreTrade_color = Gray;
extern int Line_Style = 4;
extern bool Show_LowerTimeLabel = FALSE;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_15a = "<<<< Trade Time #1 >>>>>>>>>>>>>>>>>>>>";
extern bool Show_TradeHour_1 = FALSE;
extern int TradeHour_1 = 3;
extern int TradeMinute_1 = 0;
extern color TradeHour1_color = Aqua;
extern string Trade_Message_1 = "Asia";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_15b = "<<<< Trade Time #2 >>>>>>>>>>>>>>>>>>>>";
extern bool Show_TradeHour_2 = FALSE;
extern int TradeHour_2 = 10;
extern int TradeMinute_2 = 0;
extern color TradeHour2_color = Aqua;
extern string Trade_Message_2 = "Euro";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_15c = "<<<< Trade Time #3 >>>>>>>>>>>>>>>>>>>>";
extern bool Show_TradeHour_3 = FALSE;
extern int TradeHour_3 = 15;
extern int TradeMinute_3 = 0;
extern color TradeHour3_color = Aqua;
extern string Trade_Message_3 = "US";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_15d = "<<<< Trade Time #4 >>>>>>>>>>>>>>>>>>>>";
extern bool Show_TradeHour_4 = FALSE;
extern int TradeHour_4 = 19;
extern int TradeMinute_4 = 0;
extern color TradeHour4_color = Aqua;
extern string Trade_Message_4 = "Euro END";
extern string IIIIIIIIIIIIII_DOLLY_TITLE_16 = "<<<< Bands MA Timeframe >>>>>>>>>>>>>>>>>>>>";
extern int Trend_TimeFrame = 0;
extern int MaxBars = 500;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_16a = "<<<< Double Trend MA Settings >>>>>>>>>>>>>>>>>>>>";
extern bool Show_TrendMAs = FALSE;
extern int TrendPeriodHI = 144;
extern int TrendPeriodLO = 89;
extern color TrendHI_color = Aqua;
extern color TrendLO_color = Yellow;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_16b = "<<<< Single Trend MA Settings >>>>>>>>>>>>>>>>>>>>";
extern bool Show_TrendMA = FALSE;
extern int TrendMAPeriod = 34;
extern color TrendMA_color = Gold;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_16c = "<<<< Guppy MA Settings >>>>>>>>>>>>>>>>>>>>";
extern bool Show_GuppyMAs = FALSE;
extern color GuppyHI_color = Aqua;
extern color GuppyLO_color = Yellow;
extern int MAPeriod1 = 15;
extern int MAPeriod2 = 10;
extern int MAPeriod3 = 7;
extern int MAPeriod4 = 5;
extern int MAPeriod5 = 50;
extern int MAPeriod6 = 40;
extern int MAPeriod7 = 35;
extern int MAPeriod8 = 30;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_16d = "<<<< Bands Settings >>>>>>>>>>>>>>>>>>>>";
extern bool Show_Bands = FALSE;
extern int Band_Period = 24;
extern int Band_Deviation = 2;
extern color Bands_color = Aqua;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_17 = "<<<< Murrey Math Settings >>>>>>>>>>>>>>>>>>>>";
extern bool Show_MMLevels = FALSE;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_18 = "<<<< MM P settings >>>>>>>>>>>>>>>>>>>>";
extern int MMP = 64;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_19 = "<<<< MM Line Text inputs >>>>>>>>>>>>>>>>>>>>";
extern int MM_LabelSize = 9;
extern int Shift_MMText = 80;
extern bool Show_PriceLevels = TRUE;
extern string TEXT_Font = "Arial Bold";
extern int Main_MM_LineStyle = 0;
extern int Main_MM_LineWidth = 1;
extern bool Show_BabyMM_48 = FALSE;
extern int Baby_MM_LineStyle = 4;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_20 = "<<<< MM color input >>>>>>>>>>>>>>>>>>>>";
extern bool MM_Color_Bright = FALSE;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_21 = "<<<< Email + PopUP Level Alerts >>>>>>>>>>>>>>>>>>>>>>>>";
extern bool Alert_ON = FALSE;
extern bool EmailON = FALSE;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_22 = "<<<< Emails All Daily Levels >>>>>>>>>>>>>>>>>>>>>";
extern bool Email_DATA = FALSE;
extern string IIIIIIIIIIIIII_DOLLY_TITLE_23 = "<<<< Email Time = Local >>>>>>>>>>>>>>>>>";
extern string DATA_EmailTime = "10:30";
int g_color_1120;
int g_color_1124;
int g_color_1128;
int g_color_1132;
int g_color_1136;
int g_color_1140;
int g_color_1144;
int g_color_1148;
int g_color_1152;
int g_color_1156;
int g_color_1160;
int g_color_1164;
int g_color_1168;
int g_color_1172;
int g_color_1176;
int g_color_1180;
int g_color_1184;
int g_color_1188;
int g_color_1192;
int g_color_1196;
int g_color_1200;
int g_color_1204;
int g_color_1208;
double g_ibuf_1212[];
double g_ibuf_1216[];
double g_ibuf_1220[];
double g_ibuf_1224[];
double g_ibuf_1228[];
double g_ibuf_1232[];
double g_ibuf_1236[];
double g_ibuf_1240[];
int gi_1244;
int gi_1248;
int gi_1252;
int g_index_1256 = 0;
double gd_1260 = 0.0;
double gd_unused_1268 = 0.0;
double gd_1276 = 0.0;
double g_ilow_1284 = 0.0;
double g_ihigh_1292 = 0.0;
double gd_1300 = 0.0;
double gd_1308 = 0.0;
double gd_1316 = 0.0;
double gd_1324 = 0.0;
double gd_1332 = 0.0;
double gd_1340 = 0.0;
double gd_1348 = 0.0;
double gd_1356 = 0.0;
double gd_1364 = 0.0;
double gd_1372 = 0.0;
double gd_1380 = 0.0;
double gd_1388 = 0.0;
double gd_1396 = 0.0;
double gd_1404 = 0.0;
double gd_1412 = 0.0;
double gd_1420 = 0.0;
double gd_1428 = 0.0;
double gd_1436 = 0.0;
double gd_1444 = 0.0;
double gda_1452[13];
string gsa_unused_1456[13];
string g_name_1460 = "";
int gi_1468 = 13;
int gi_unused_1472 = 8;
int gia_unused_1476[13];
int gi_1480 = 3;
int gi_1484 = 0;
int g_timeframe_1488 = 0;
int gi_1492;
double gd_1560;
double gd_1568;
double gd_1584;
double gd_1592;
double gd_1600;
double gd_1608 = 0.0;
double gd_1616 = 0.0;
double g_close_1624 = 0.0;
double gd_unused_1632 = 0.0;
string gs_1640;
string gs_1648;
string gs_1656;
string gs_1664;
bool gi_1672 = TRUE;
double gd_1676;
bool gi_1684 = FALSE;
int g_datetime_1688 = 0;
int g_datetime_1692 = 0;
int g_datetime_1696 = 0;
int g_datetime_1700 = 0;

string TimeToString(int ai_0) {
   if (!gi_1684) return (TimeToStr(ai_0, TIME_MINUTES));
   int li_4 = TimeHour(ai_0);
   int l_minute_8 = TimeMinute(ai_0);
   string ls_12 = " AM";
   if (li_4 >= 12) {
      li_4 -= 12;
      ls_12 = " PM";
   }
   if (li_4 == 0) li_4 = 12;
   string ls_ret_20 = DoubleToStr(li_4, 0) + ":";
   if (l_minute_8 < 10) ls_ret_20 = ls_ret_20 + "0";
   ls_ret_20 = ls_ret_20 + DoubleToStr(l_minute_8, 0);
   ls_ret_20 = ls_ret_20 + ls_12;
   return (ls_ret_20);
}

double SetPoint() {
   double ld_ret_0;
   if (Digits < 4) ld_ret_0 = 0.01;
   else ld_ret_0 = 0.0001;
   return (ld_ret_0);
}

void DollyLabel(string a_name_0, int a_window_8, string a_text_12, int a_fontsize_20, string a_fontname_24, color a_color_32, int a_corner_36, int a_y_40, int a_x_44) {
   if (ObjectFind(a_name_0) != 0) ObjectCreate(a_name_0, OBJ_LABEL, a_window_8, 0, 0);
   ObjectSetText(a_name_0, a_text_12, a_fontsize_20, a_fontname_24, a_color_32);
   ObjectSet(a_name_0, OBJPROP_CORNER, a_corner_36);
   ObjectSet(a_name_0, OBJPROP_XDISTANCE, a_x_44);
   ObjectSet(a_name_0, OBJPROP_YDISTANCE, a_y_40);
}

void DollyTimeLine(string a_name_0, int ai_unused_8, double a_width_12, double ad_unused_20, color a_color_28, int a_datetime_32, bool ai_36) {
   if (ai_36) ObjectDelete(a_name_0);
   if (ObjectFind(a_name_0) != 0) {
      if (Show_LowerTimeLabel) ObjectCreate(a_name_0, OBJ_VLINE, 0, a_datetime_32, 0, a_datetime_32, 100);
      else ObjectCreate(a_name_0, OBJ_TREND, 0, a_datetime_32, 0, a_datetime_32, 100);
      ObjectSet(a_name_0, OBJPROP_COLOR, a_color_28);
      ObjectSet(a_name_0, OBJPROP_BACK, FALSE);
      ObjectSet(a_name_0, OBJPROP_WIDTH, a_width_12);
      ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style);
      return;
   }
   ObjectMove(a_name_0, 0, a_datetime_32, 100);
}

void DollyText(string a_name_0, int a_window_8, string a_text_12, int a_fontsize_20, string a_fontname_24, color a_color_32, int a_datetime_36, double a_price_40, bool ai_48) {
   if (ai_48) ObjectDelete(a_name_0);
   if (ObjectFind(a_name_0) != 0) {
      ObjectCreate(a_name_0, OBJ_TEXT, a_window_8, a_datetime_36, a_price_40);
      ObjectSetText(a_name_0, a_text_12, a_fontsize_20, a_fontname_24, a_color_32);
      ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
      return;
   }
   ObjectMove(a_name_0, 0, a_datetime_36, a_price_40);
}

void FibLines(string a_name_0, int ai_unused_8, double a_price_12, double a_price_20, double a_width_28, double a_style_36, color a_color_44, bool ai_48) {
   if (ai_48) ObjectDelete(a_name_0);
   if (ObjectFind(a_name_0) != 0) {
      ObjectCreate(a_name_0, OBJ_TREND, 0, iTime(NULL, PERIOD_D1, FIB_ExtendDISPLAY), a_price_12, Time[0], a_price_20);
      ObjectSet(a_name_0, OBJPROP_COLOR, a_color_44);
      ObjectSet(a_name_0, OBJPROP_RAY, FALSE);
      ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
      ObjectSet(a_name_0, OBJPROP_WIDTH, a_width_28);
      ObjectSet(a_name_0, OBJPROP_STYLE, a_style_36);
      return;
   }
   ObjectMove(a_name_0, 0, iTime(NULL, PERIOD_D1, FIB_ExtendDISPLAY), Time[0]);
}

void PivotLines(string a_name_0, int ai_unused_8, double a_price_12, double a_price_20, double a_width_28, double a_style_36, color a_color_44, bool ai_48) {
   if (ai_48) ObjectDelete(a_name_0);
   if (ObjectFind(a_name_0) != 0) {
      ObjectCreate(a_name_0, OBJ_TREND, 0, iTime(NULL, PERIOD_D1, PivotPoint_ExtendLINE) + 3600 * GMTHours + 60 * GMTMinutes, a_price_12, Time[0], a_price_20);
      ObjectSet(a_name_0, OBJPROP_COLOR, a_color_44);
      ObjectSet(a_name_0, OBJPROP_RAY, FALSE);
      ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
      ObjectSet(a_name_0, OBJPROP_WIDTH, a_width_28);
      ObjectSet(a_name_0, OBJPROP_STYLE, a_style_36);
      return;
   }
   ObjectMove(a_name_0, 0, iTime(NULL, PERIOD_D1, PivotPoint_ExtendLINE + 0) + 3600 * GMTHours + 60 * GMTMinutes, Time[0]);
}

void CreateRec(string a_name_0, int ai_unused_8, double a_price_12, double a_price_20, color a_color_28, bool ai_32) {
   if (ai_32) ObjectDelete(a_name_0);
   if (ObjectFind(a_name_0) != 0) {
      ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, PERIOD_D1, 0) + 3600 * GMTHours + 60 * GMTMinutes, a_price_12, Time[0], a_price_20);
      ObjectSet(a_name_0, OBJPROP_COLOR, a_color_28);
      ObjectSet(a_name_0, OBJPROP_BACK, Daily_AverageGRAPHICS_SOLID);
      ObjectSet(a_name_0, OBJPROP_WIDTH, 2);
      ObjectSet(a_name_0, OBJPROP_STYLE, STYLE_SOLID);
      return;
   }
   ObjectMove(a_name_0, 0, iTime(NULL, PERIOD_D1, 0) + 3600 * GMTHours + 60 * GMTMinutes, Time[0]);
}

void CreateRec2(string a_name_0, int ai_unused_8, double a_price_12, double a_price_20, color a_color_28, bool ai_32) {
   if (ai_32) ObjectDelete(a_name_0);
   if (ObjectFind(a_name_0) != 0) {
      ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, PERIOD_D1, 0) + 3600 * GMTHours + 60 * GMTMinutes, a_price_12, Time[0], a_price_20);
      ObjectSet(a_name_0, OBJPROP_COLOR, a_color_28);
      ObjectSet(a_name_0, OBJPROP_BACK, Dolly_GRAPHICS_SOLID);
      ObjectSet(a_name_0, OBJPROP_WIDTH, 2);
      ObjectSet(a_name_0, OBJPROP_STYLE, STYLE_SOLID);
      return;
   }
   ObjectMove(a_name_0, 0, iTime(NULL, PERIOD_D1, 0) + 3600 * GMTHours + 60 * GMTMinutes, Time[0]);
}

void MMLines(string a_name_0, int ai_unused_8, double a_price_12, double a_price_20, double a_width_28, double a_style_36, color a_color_44, bool ai_48) {
   if (ai_48) ObjectDelete(a_name_0);
   if (ObjectFind(a_name_0) != 0) {
      ObjectCreate(a_name_0, OBJ_TREND, 0, iTime(NULL, 0, MMP), a_price_12, Time[0], a_price_20);
      ObjectSet(a_name_0, OBJPROP_COLOR, a_color_44);
      ObjectSet(a_name_0, OBJPROP_RAY, FALSE);
      ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
      ObjectSet(a_name_0, OBJPROP_WIDTH, a_width_28);
      ObjectSet(a_name_0, OBJPROP_STYLE, a_style_36);
      return;
   }
   ObjectMove(a_name_0, 0, iTime(NULL, 0, MMP), Time[0]);
}

void MMText(string a_name_0, int a_window_8, string a_text_12, int a_fontsize_20, string a_fontname_24, color a_color_32, int a_datetime_36, double a_price_40, bool ai_48) {
   if (ai_48) ObjectDelete(a_name_0);
   if (ObjectFind(a_name_0) != 0) {
      ObjectCreate(a_name_0, OBJ_TEXT, a_window_8, a_datetime_36, a_price_40);
      ObjectSetText(a_name_0, a_text_12, a_fontsize_20, a_fontname_24, a_color_32);
      ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
      return;
   }
   ObjectMove(a_name_0, 0, a_datetime_36, a_price_40);
}

string FormatDateTime(int ai_0, int ai_4, int ai_8, int ai_12, int ai_16, int ai_20) {
   string ls_24 = ai_4 + 100;
   ls_24 = StringSubstr(ls_24, 1);
   string ls_32 = ai_8 + 100;
   ls_32 = StringSubstr(ls_32, 1);
   string ls_40 = ai_12 + 100;
   ls_40 = StringSubstr(ls_40, 1);
   string ls_48 = ai_16 + 100;
   ls_48 = StringSubstr(ls_48, 1);
   string ls_56 = ai_20 + 100;
   ls_56 = StringSubstr(ls_56, 1);
   return (StringConcatenate(ai_0, ".", ls_24, ".", ls_32, " ", ls_40, ":", ls_48, ":", ls_56));
}

int init() {
   gd_1676 = SetPoint();
   IndicatorShortName("Dolly Graphics #13");
   switch (Analysis_TimeFrame) {
   case 1:
      gs_1640 = "M1";
      break;
   case 5:
      gs_1640 = "M5";
      break;
   case 15:
      gs_1640 = "M15";
      break;
   case 30:
      gs_1640 = "M30";
      break;
   case 60:
      gs_1640 = "H1";
      break;
   case 240:
      gs_1640 = "H4";
      break;
   case 1440:
      gs_1640 = "D1";
      break;
   case 10080:
      gs_1640 = "W1";
      break;
   case 43200:
      gs_1640 = "MN1";
      break;
   default:
      Analysis_TimeFrame = Period();
      init();
      return (0);
   }
   switch (EntrySignal_TimeFrame1) {
   case 1:
      gs_1648 = " M1";
      break;
   case 5:
      gs_1648 = " M5";
      break;
   case 15:
      gs_1648 = "M15";
      break;
   case 30:
      gs_1648 = "M30";
      break;
   case 60:
      gs_1648 = " H1";
      break;
   case 240:
      gs_1648 = " H4";
      break;
   case 1440:
      gs_1648 = " D1";
      break;
   case 10080:
      gs_1648 = " W1";
      break;
   case 43200:
      gs_1648 = "MN1";
      break;
   default:
      EntrySignal_TimeFrame1 = Period();
      init();
      return (0);
   }
   switch (EntrySignal_TimeFrame2) {
   case 1:
      gs_1656 = " M1";
      break;
   case 5:
      gs_1656 = " M5";
      break;
   case 15:
      gs_1656 = "M15";
      break;
   case 30:
      gs_1656 = "M30";
      break;
   case 60:
      gs_1656 = "  H1";
      break;
   case 240:
      gs_1656 = "  H4";
      break;
   case 1440:
      gs_1656 = " D1";
      break;
   case 10080:
      gs_1656 = " W1";
      break;
   case 43200:
      gs_1656 = "MN1";
      break;
   default:
      EntrySignal_TimeFrame2 = Period();
      init();
      return (0);
   }
   switch (Maintrend_TimeFrame) {
   case 1:
      gs_1664 = " M1";
      break;
   case 5:
      gs_1664 = " M5";
      break;
   case 15:
      gs_1664 = "M15";
      break;
   case 30:
      gs_1664 = "M30";
      break;
   case 60:
      gs_1664 = " H1";
      break;
   case 240:
      gs_1664 = " H4";
      break;
   case 1440:
      gs_1664 = " D1";
      break;
   case 10080:
      gs_1664 = " W1";
      break;
   case 43200:
      gs_1664 = "MN1";
      break;
   default:
      Maintrend_TimeFrame = Period();
      init();
      return (0);
   }
   if (Show_GuppyMAs) {
      SetIndexDrawBegin(0, MAPeriod1);
      SetIndexDrawBegin(1, MAPeriod2);
      SetIndexDrawBegin(2, MAPeriod3);
      SetIndexDrawBegin(3, MAPeriod4);
      SetIndexDrawBegin(4, MAPeriod5);
      SetIndexDrawBegin(5, MAPeriod6);
      SetIndexDrawBegin(6, MAPeriod7);
      SetIndexDrawBegin(7, MAPeriod8);
   }
   if (Show_TrendMA) {
      SetIndexDrawBegin(0, TrendMAPeriod);
      SetIndexDrawBegin(1, TrendMAPeriod);
      SetIndexDrawBegin(2, TrendMAPeriod);
   }
   if (Show_TrendMAs) {
      SetIndexDrawBegin(0, TrendPeriodHI);
      SetIndexDrawBegin(1, TrendPeriodHI);
      SetIndexDrawBegin(2, TrendPeriodHI);
      SetIndexDrawBegin(3, TrendPeriodLO);
      SetIndexDrawBegin(4, TrendPeriodLO);
      SetIndexDrawBegin(5, TrendPeriodLO);
   }
   if (Show_Bands) {
      SetIndexDrawBegin(0, Band_Period);
      SetIndexDrawBegin(1, Band_Period);
      SetIndexDrawBegin(2, Band_Period);
   }
   SetIndexBuffer(0, g_ibuf_1212);
   SetIndexBuffer(1, g_ibuf_1216);
   SetIndexBuffer(2, g_ibuf_1220);
   SetIndexBuffer(3, g_ibuf_1224);
   SetIndexBuffer(4, g_ibuf_1228);
   SetIndexBuffer(5, g_ibuf_1232);
   SetIndexBuffer(6, g_ibuf_1236);
   SetIndexBuffer(7, g_ibuf_1240);
   SetIndexLabel(0, "");
   SetIndexLabel(1, "");
   SetIndexLabel(2, "");
   SetIndexLabel(3, "");
   SetIndexLabel(4, "");
   SetIndexLabel(5, "");
   SetIndexLabel(6, "");
   SetIndexLabel(7, "");
   return (0);
}

int deinit() {
   DeleteObjects();
   Comment("");
   for (g_index_1256 = 0; g_index_1256 < gi_1468; g_index_1256++) {
      g_name_1460 = "mml";
      ObjectDelete(g_name_1460);
      g_name_1460 = "mml_txt";
      ObjectDelete(g_name_1460);
   }
   return (0);
}

int start() {
   string ls_0;
   string ls_8;
   double l_ihigh_16;
   double l_ilow_24;
   int lia_48[4];
   int lia_52[43];
   string ls_unused_84;
   string ls_144;
   string ls_152;
   double ld_340;
   int li_740;
   int li_744;
   int li_748;
   int li_1032;
   string ls_1036;
   int li_unused_1044;
   double l_imacd_1048;
   double l_imacd_1056;
   string ls_1064;
   int li_unused_1072;
   double l_irsi_1076;
   string ls_1084;
   int li_unused_1092;
   double l_irsi_1096;
   string ls_1104;
   string ls_1112;
   string ls_1120;
   int li_1128;
   int li_1132;
   int li_1136;
   string ls_1144;
   int li_unused_1152;
   double l_imacd_1156;
   double l_imacd_1164;
   string ls_1172;
   int li_unused_1180;
   double l_irsi_1184;
   string ls_1192;
   double l_irsi_1204;
   string ls_1212;
   string ls_1220;
   string ls_1228;
   int li_unused_1236;
   int li_unused_1240;
   int li_1244;
   int li_1248;
   int li_1252;
   double ld_1256;
   double ld_1264;
   double ld_1272;
   double ld_1280;
   double ld_1288;
   double ld_1296;
   double ld_1304;
   double ld_1312;
   string ls_1320;
   string ls_1328;
   int li_1340;
   int li_1344;
   int li_1348;
   double l_imacd_1352;
   double l_imacd_1360;
   double l_imacd_1368;
   double l_imacd_1376;
   string ls_1384;
   string ls_1392;
   int li_1404;
   double l_irsi_1408;
   double l_irsi_1416;
   double l_irsi_1424;
   double l_irsi_1432;
   double ld_1440;
   double ld_1448;
   string l_dbl2str_1456;
   string l_dbl2str_1464;
   string ls_1472;
   int li_1480;
   int li_1484;
   double ld_1488;
   double l_iopen_1496;
   double l_ilow_1504;
   double l_iclose_1512;
   double l_ihigh_1520;
   double ld_1528;
   double ld_1536;
   int li_1544;
   string ls_1556;
   string ls_1564;
   string ls_1572;
   string ls_1580;
   string ls_1588;
   string ls_1596;
   string ls_1604;
   string ls_1612;
   int l_color_1620;
   int l_color_1624;
   int l_color_1628;
   int l_color_1632;
   int l_shift_1644;
   string l_dbl2str_1648;
   string l_dbl2str_1656;
   string l_dbl2str_1664;
   string l_dbl2str_1672;
   string l_dbl2str_1680;
   string l_dbl2str_1688;
   string l_dbl2str_1696;
   string l_dbl2str_1704;
   string l_dbl2str_1712;
   string l_dbl2str_1720;
   string l_dbl2str_1728;
   string l_dbl2str_1736;
   string l_dbl2str_1744;
   string l_dbl2str_1752;
   string l_dbl2str_1760;
   int li_1768;
   int li_1772;
   int li_1776;
   int li_1780;
   int li_1784;
   int li_1788;
   int li_1792;
   int li_1796;
   int li_1800;
   int li_1804;
   int li_1808;
   int li_1812;
   int li_1816;
   int li_1820;
   if (Dolly_PassWord != "FREE_at_tsd") {
      if (Dolly_PassWord == "") ls_0 = "NO PASSWORD ENTERED !!";
      else ls_0 = "  INCORRECT PASSWORD !!";
      ls_8 = "Password avaliable @  www.forex-tsd.com";
      DollyLabel("Dolly87", 0, " " + ls_0 + " ", 30, "Arial Bold", Red, 0, 500, 300);
      ObjectSet("Dolly87", OBJPROP_ANGLE, 45);
      DollyLabel("Dolly88", 0, " " + ls_8 + " ", 30, "Arial Bold", Red, 0, 650, 250);
      ObjectSet("Dolly88", OBJPROP_ANGLE, 45);
      return (0);
   }
   ls_0 = "";
   ls_8 = "";
   if (Show_GuppyMAs) {
      if (Show_GuppyMAs && Show_TrendMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 0, GuppyHI_color);
      else SetIndexStyle(0, DRAW_NONE);
      if (Show_GuppyMAs && Show_TrendMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 0, GuppyHI_color);
      else SetIndexStyle(1, DRAW_NONE);
      if (Show_GuppyMAs && Show_TrendMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(2, DRAW_LINE, STYLE_SOLID, 0, GuppyHI_color);
      else SetIndexStyle(2, DRAW_NONE);
      if (Show_GuppyMAs && Show_TrendMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(3, DRAW_LINE, STYLE_SOLID, 0, GuppyHI_color);
      else SetIndexStyle(3, DRAW_NONE);
      if (Show_GuppyMAs && Show_TrendMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(4, DRAW_LINE, STYLE_SOLID, 0, GuppyLO_color);
      else SetIndexStyle(4, DRAW_NONE);
      if (Show_GuppyMAs && Show_TrendMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(5, DRAW_LINE, STYLE_SOLID, 0, GuppyLO_color);
      else SetIndexStyle(5, DRAW_NONE);
      if (Show_GuppyMAs && Show_TrendMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(6, DRAW_LINE, STYLE_SOLID, 0, GuppyLO_color);
      else SetIndexStyle(6, DRAW_NONE);
      if (Show_GuppyMAs && Show_TrendMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(7, DRAW_LINE, STYLE_SOLID, 0, GuppyLO_color);
      else SetIndexStyle(7, DRAW_NONE);
   }
   if (Show_TrendMAs) {
      if (Show_TrendMAs && Show_GuppyMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(0, DRAW_LINE, STYLE_DOT, 0, TrendHI_color);
      else SetIndexStyle(0, DRAW_NONE);
      if (Show_TrendMAs && Show_GuppyMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 0, TrendHI_color);
      else SetIndexStyle(1, DRAW_NONE);
      if (Show_TrendMAs && Show_GuppyMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(2, DRAW_LINE, STYLE_DOT, 0, TrendHI_color);
      else SetIndexStyle(2, DRAW_NONE);
      if (Show_TrendMAs && Show_GuppyMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(3, DRAW_LINE, STYLE_DOT, 0, TrendLO_color);
      else SetIndexStyle(3, DRAW_NONE);
      if (Show_TrendMAs && Show_GuppyMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(4, DRAW_LINE, STYLE_SOLID, 0, TrendLO_color);
      else SetIndexStyle(4, DRAW_NONE);
      if (Show_TrendMAs && Show_GuppyMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(5, DRAW_LINE, STYLE_DOT, 0, TrendLO_color);
      else SetIndexStyle(5, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(6, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) SetIndexStyle(7, DRAW_NONE);
   }
   if (Show_TrendMA) {
      if (Show_TrendMA && Show_TrendMAs == FALSE && Show_GuppyMAs == FALSE && Show_Bands == FALSE) SetIndexStyle(0, DRAW_LINE, STYLE_DOT, 0, TrendMA_color);
      else SetIndexStyle(0, DRAW_NONE);
      if (Show_TrendMA && Show_TrendMAs == FALSE && Show_GuppyMAs == FALSE && Show_Bands == FALSE) SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 0, TrendMA_color);
      else SetIndexStyle(1, DRAW_NONE);
      if (Show_TrendMA && Show_TrendMAs == FALSE && Show_GuppyMAs == FALSE && Show_Bands == FALSE) SetIndexStyle(2, DRAW_LINE, STYLE_DOT, 0, TrendMA_color);
      else SetIndexStyle(2, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_Bands == FALSE) SetIndexStyle(3, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_Bands == FALSE) SetIndexStyle(4, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_Bands == FALSE) SetIndexStyle(5, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_Bands == FALSE) SetIndexStyle(6, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_Bands == FALSE) SetIndexStyle(7, DRAW_NONE);
   }
   if (Show_Bands) {
      if (Show_Bands && Show_TrendMA == FALSE && Show_TrendMAs == FALSE && Show_GuppyMAs == FALSE) SetIndexStyle(0, DRAW_LINE, STYLE_DOT, 0, Bands_color);
      else SetIndexStyle(0, DRAW_NONE);
      if (Show_Bands && Show_TrendMA == FALSE && Show_TrendMAs == FALSE && Show_GuppyMAs == FALSE) SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 0, Bands_color);
      else SetIndexStyle(1, DRAW_NONE);
      if (Show_Bands && Show_TrendMA == FALSE && Show_TrendMAs == FALSE && Show_GuppyMAs == FALSE) SetIndexStyle(2, DRAW_LINE, STYLE_DOT, 0, Bands_color);
      else SetIndexStyle(2, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_TrendMA == FALSE) SetIndexStyle(3, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_TrendMA == FALSE) SetIndexStyle(4, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_TrendMA == FALSE) SetIndexStyle(5, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_TrendMA == FALSE) SetIndexStyle(6, DRAW_NONE);
      if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_TrendMA == FALSE) SetIndexStyle(7, DRAW_NONE);
   }
   if (Show_GuppyMAs == FALSE && Show_TrendMAs == FALSE && Show_TrendMA == FALSE && Show_Bands == FALSE) {
      SetIndexStyle(0, DRAW_NONE);
      SetIndexStyle(1, DRAW_NONE);
      SetIndexStyle(2, DRAW_NONE);
      SetIndexStyle(3, DRAW_NONE);
      SetIndexStyle(4, DRAW_NONE);
      SetIndexStyle(5, DRAW_NONE);
      SetIndexStyle(6, DRAW_NONE);
      SetIndexStyle(7, DRAW_NONE);
   }
   gi_1480 = gi_1492;
   if (gi_1484 != Time[0] || g_timeframe_1488 != Period()) {
      l_ihigh_16 = iHigh(NULL, 0, iHighest(NULL, 0, MODE_CLOSE, MMP, 0));
      l_ilow_24 = iLow(NULL, 0, iLowest(NULL, 0, MODE_CLOSE, MMP, 0));
      g_ilow_1284 = l_ilow_24;
      g_ihigh_1292 = l_ihigh_16;
      if (g_ihigh_1292 <= 250000.0 && g_ihigh_1292 > 25000.0) gd_1420 = 100000;
      else {
         if (g_ihigh_1292 <= 25000.0 && g_ihigh_1292 > 2500.0) gd_1420 = 10000;
         else {
            if (g_ihigh_1292 <= 2500.0 && g_ihigh_1292 > 250.0) gd_1420 = 1000;
            else {
               if (g_ihigh_1292 <= 250.0 && g_ihigh_1292 > 25.0) gd_1420 = 100;
               else {
                  if (g_ihigh_1292 <= 25.0 && g_ihigh_1292 > 12.5) gd_1420 = 12.5;
                  else {
                     if (g_ihigh_1292 <= 12.5 && g_ihigh_1292 > 6.25) gd_1420 = 12.5;
                     else {
                        if (g_ihigh_1292 <= 6.25 && g_ihigh_1292 > 3.125) gd_1420 = 6.25;
                        else {
                           if (g_ihigh_1292 <= 3.125 && g_ihigh_1292 > 1.5625) gd_1420 = 3.125;
                           else {
                              if (g_ihigh_1292 <= 1.5625 && g_ihigh_1292 > 0.390625) gd_1420 = 1.5625;
                              else
                                 if (g_ihigh_1292 <= 0.390625 && g_ihigh_1292 > 0.0) gd_1420 = 0.1953125;
                           }
                        }
                     }
                  }
               }
            }
         }
      }
      gd_1428 = g_ihigh_1292 - g_ilow_1284;
      gd_1276 = MathFloor(MathLog(gd_1420 / gd_1428) / MathLog(2));
      gd_1412 = gd_1420 * MathPow(0.5, gd_1276);
      gd_1300 = MathFloor(g_ilow_1284 / gd_1412) * gd_1412;
      if (gd_1300 + gd_1412 > g_ihigh_1292) gd_1308 = gd_1300 + gd_1412;
      else gd_1308 = gd_1300 + 2.0 * gd_1412;
      if (g_ilow_1284 >= 3.0 * (gd_1308 - gd_1300) / 16.0 + gd_1300 && g_ihigh_1292 <= 9.0 * (gd_1308 - gd_1300) / 16.0 + gd_1300) gd_1324 = gd_1300 + (gd_1308 - gd_1300) / 2.0;
      else gd_1324 = 0;
      if (g_ilow_1284 >= gd_1300 - (gd_1308 - gd_1300) / 8.0 && g_ihigh_1292 <= 5.0 * (gd_1308 - gd_1300) / 8.0 + gd_1300 && gd_1324 == 0.0) gd_1316 = gd_1300 + (gd_1308 - gd_1300) / 2.0;
      else gd_1316 = 0;
      if (g_ilow_1284 >= gd_1300 + 7.0 * (gd_1308 - gd_1300) / 16.0 && g_ihigh_1292 <= 13.0 * (gd_1308 - gd_1300) / 16.0 + gd_1300) gd_1340 = gd_1300 + 3.0 * (gd_1308 - gd_1300) / 4.0;
      else gd_1340 = 0;
      if (g_ilow_1284 >= gd_1300 + 3.0 * (gd_1308 - gd_1300) / 8.0 && g_ihigh_1292 <= 9.0 * (gd_1308 - gd_1300) / 8.0 + gd_1300 && gd_1340 == 0.0) gd_1348 = gd_1308;
      else gd_1348 = 0;
      if (g_ilow_1284 >= gd_1300 + (gd_1308 - gd_1300) / 8.0 && g_ihigh_1292 <= 7.0 * (gd_1308 - gd_1300) / 8.0 + gd_1300 && gd_1316 == 0.0 && gd_1324 == 0.0 && gd_1340 == 0.0 &&
         gd_1348 == 0.0) gd_1332 = gd_1300 + 3.0 * (gd_1308 - gd_1300) / 4.0;
      else gd_1332 = 0;
      if (gd_1316 + gd_1324 + gd_1332 + gd_1340 + gd_1348 == 0.0) gd_1356 = gd_1308;
      else gd_1356 = 0;
      gd_1436 = gd_1316 + gd_1324 + gd_1332 + gd_1340 + gd_1348 + gd_1356;
      if (gd_1316 > 0.0) gd_1364 = gd_1300;
      else gd_1364 = 0;
      if (gd_1324 > 0.0) gd_1372 = gd_1300 + (gd_1308 - gd_1300) / 4.0;
      else gd_1372 = 0;
      if (gd_1332 > 0.0) gd_1380 = gd_1300 + (gd_1308 - gd_1300) / 4.0;
      else gd_1380 = 0;
      if (gd_1340 > 0.0) gd_1388 = gd_1300 + (gd_1308 - gd_1300) / 2.0;
      else gd_1388 = 0;
      if (gd_1348 > 0.0) gd_1396 = gd_1300 + (gd_1308 - gd_1300) / 2.0;
      else gd_1396 = 0;
      if (gd_1436 > 0.0 && gd_1364 + gd_1372 + gd_1380 + gd_1388 + gd_1396 == 0.0) gd_1404 = gd_1300;
      else gd_1404 = 0;
      gd_1444 = gd_1364 + gd_1372 + gd_1380 + gd_1388 + gd_1396 + gd_1404;
      for (g_index_1256 = 0; g_index_1256 < gi_1468; g_index_1256++) gda_1452[g_index_1256] = 0;
      gd_1260 = (gd_1436 - gd_1444) / 8.0;
      gda_1452[0] = gd_1444 - 2.0 * gd_1260;
      for (g_index_1256 = 1; g_index_1256 < gi_1468; g_index_1256++) gda_1452[g_index_1256] = gda_1452[g_index_1256 - 1] + gd_1260;
      for (g_index_1256 = 0; g_index_1256 < gi_1468; g_index_1256++) {
         g_name_1460 = "mml";
         if (ObjectFind(g_name_1460) == -1) ObjectMove(g_name_1460, 0, Time[0], gda_1452[g_index_1256]);
         else ObjectMove(g_name_1460, 0, Time[0], gda_1452[g_index_1256]);
      }
      gi_1484 = Time[0];
      g_timeframe_1488 = Period();
   }
   int l_timeframe_32 = Period();
   if (l_timeframe_32 > PERIOD_H4) return (-1);
   if (Show_DollyTrading_Instructions == TRUE) {
      Comment("\n General Trading instructions for Dolly Graphics v13" 
         + "\n -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" 
         + "\n Dolly is BreakOut trading system which uses either the DAILY OPEN or DAILY CENTRAL PIVOT as the Central starting point." 
         + "\n" 
         + "\n Dolly gives the Trading Setups in the COMMENTS on the left side of the chart" 
         + "\n These COMMENTS can be either STATIC or DYNAMIC by selecting the Auto_Signals or Show_DollyCOMMENTS inputs " 
         + "\n NOTE : Both types of COMMENTS STATIC & DYNAMIC can be moved to anywhere on you chart by using the Shift inputs " 
         + "\n" 
         + "\n -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" 
         + "\n MANUAL TRADING : " 
         + "\n NOTE : Breakout Trading is usually best at times such as the LONDON / NEW YORK / ASIAN OPENS" 
         + "\n" 
         + "\n When PRICE approaches a Dolly ENTRY LEVEL wait for the 5 Minute candle to CLOSE before making a trading decision  " 
         + "\n Use your favourite indicators of TREND and STRENGTH of DIRECTION to help with these trades " 
         + "\n A combination of H4 MACD & H1 MACD for the general TREND is commonly used with a M1 & M5 MACD & RSI 10 for ENTRIES" 
         + "\n NEVER trade against the H1 MACD Trend, Recommended settings for MACD are 8 / 17 / 9 for a quicker response " 
         + "\n" 
         + "\n If H1 & H4 MACD are both ABOVE the CENTRE LEVEL and pointing UP only take LONG Trades" 
         + "\n If H1 & H4 MACD are both BELOW the CENTRE LEVEL and pointing DOWN only take SHORT Trades" 
         + "\n If HI is ABOVE the CENTRE LEVEL and pointing UP but the H4 is TURNED DOWN the PRICE may not run very far LONG   " 
         + "\n If HI is BELOW the CENTRE LEVEL and pointing DOWN but the H4 is TURNED UP the PRICE may not run very far SHORT" 
         + "\n NOTE : Generally if both TREND MACDs are pointing in the same direction the TRADES will go the  " 
         + "\n DAILY AVERAGE DISTANCE or more for that day" 
         + "\n If the TREND MACDs are against each other go with the H1 direction but expect about 60% of the DAILY AVERAGE DISTANCE" 
         + "\n" 
         + "\n FOR EXAMPLE : EURUSD H1 / H4 Both UP = Range 80 - 120 pips  -  GBPUSD  =  Range 120 -  200 pips" 
         + "\n                          EURUSD H1 UP / H4 DN  or H1 DN / H4 UP  = Range 30  -  60 pips  -  GBPUSD = Range 80  -  100 pips" 
         + "\n ENTRIES : " 
         + "\n Wait for the M5 RSI to swing DOWN from ABOVE the 70 Level and the M1 & M5 MACD to turn DOWN from ABOVE the Centre Level to go SHORT" 
         + "\n Wait for the M5 RSI to swing UP from BELOW the 30 Level and the M1 & M5 MACD to turn UP from BELOW the Centre Level to go LONG  " 
         + "\n Using these entries should give minimal losses if you pick the wrong trade and it goes against you as the MOMETUM for the" 
         + "\n M5 entry is going with you and so should the longer term TREND" 
         + "\n" 
         + "\n EXITS : " 
         + "\n LONG Exit on the Dolly Levels  -   Enter at BUY AREA and exit at either the 1 st or 2nd BUY TARGET" 
         + "\n SHORT Exit on the Dolly Levels  -   Enter at SELL AREA and exit at either the 1 st or 2nd SELL TARGET" 
         + "\n DAILY AVERAGE EXITS : " 
         + "\n The other option is to assess the STRENGTH of the move and use the Dolly AVERAGE ZONES 50% 75% 100% 125% 150% etc" 
         + "\n as an indication of how far the PRICE will move based on the H1 / H4 TREND information previously assessed." 
         + "\n" 
         + "\n Built in TREND STRENGTH ENTRY System" 
         + "\n TREND ANALYSIS" 
         + "\n Dolly 13 has built in Trading signals for TREND + STRENGTH" 
         + "\n Select the Analysis_TimeFrame that suits your trading style or leave the the input   Analysis_TimeFrame = 0;" 
         + "\n to automatically select the timeframe you are viewing.  " 
         + "\n" 
         + "\n ENTRY Signals" 
         + "\n The EntrySignal_TimeFrame1 + EntrySignal_TimeFrame2 are where you set the ENTRY Signal timeframes to suit your trading style  " 
         + "\n NOTE :  The EntrySignal_TimeFrame1 must be smaller than the EntrySignal_TimeFrame2 for the ENTRY Signals to work correctly" 
         + "\n For example the trader would select M1 / M5 ENTRY Signals if trading off M5 or perhaps M15 &  M5 / M15 ENTRY Signals " 
         + "\n if trading M30 or H1  -   NOTE :  The Dolly System is mainly traded in the lower timeframes from M1 to  M30" 
         + "\n" 
      + "\n -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
   }
   if (Color_Options >= 0) {
      for (int li_36 = 1; li_36 <= 9; li_36++) {
         switch (li_36) {
         case 1:
            if (Color_Options == 0) {
               g_color_1128 = BuyCol_2;
               g_color_1132 = BuyCol_1;
               g_color_1136 = SellCol_1;
               g_color_1140 = SellCol_2;
               g_color_1144 = AvUP_col_150;
               g_color_1148 = AvUP_col_125;
               g_color_1152 = AvUP_col_100;
               g_color_1156 = AvUP_col_75;
               g_color_1160 = AvUP_col_50;
               g_color_1164 = AvDN_col_50;
               g_color_1168 = AvDN_col_75;
               g_color_1172 = AvDN_col_100;
               g_color_1176 = AvDN_col_125;
               g_color_1180 = AvDN_col_150;
               g_color_1204 = Pivot_color;
               g_color_1208 = Fib_color;
               g_color_1184 = Buy_Text_col;
               g_color_1188 = Sell_Text_col;
               g_color_1196 = Av_TextUP_col;
               g_color_1200 = Av_TextDN_col;
               g_color_1192 = Open_color;
               g_color_1120 = Comment_Background_col;
               g_color_1124 = Comment_Border_col;
            }
            break;
         case 2:
            if (Color_Options == 1) {
               g_color_1128 = C'0x00,0x00,0x96';
               g_color_1132 = C'0x00,0x00,0x64';
               g_color_1136 = C'0x78,0x00,0x00';
               g_color_1140 = C'0xAA,0x00,0x00';
               g_color_1144 = C'0x00,0x6E,0xFF';
               g_color_1148 = C'0x00,0x46,0xFF';
               g_color_1152 = C'0x14,0x14,0xFF';
               g_color_1156 = C'0x00,0x00,0xD2';
               g_color_1160 = C'0x00,0x00,0xBE';
               g_color_1164 = C'0xC8,0x00,0x00';
               g_color_1168 = C'0xDC,0x00,0x00';
               g_color_1172 = C'0xFF,0x00,0x0A';
               g_color_1176 = C'0xFF,0x46,0x00';
               g_color_1180 = C'0xFF,0x6E,0x00';
               g_color_1204 = C'0x78,0x78,0x78';
               g_color_1208 = C'0x00,0x78,0x00';
               g_color_1184 = DodgerBlue;
               g_color_1188 = DarkOrange;
               g_color_1196 = DeepSkyBlue;
               g_color_1200 = Yellow;
               g_color_1192 = YellowGreen;
               g_color_1120 = C'0x00,0x00,0x41';
               g_color_1124 = DodgerBlue;
            }
            break;
         case 3:
            if (Color_Options == 2) {
               g_color_1128 = C'0x00,0x50,0x00';
               g_color_1132 = C'0x00,0x32,0x00';
               g_color_1136 = C'0x6E,0x00,0x00';
               g_color_1140 = C'0x82,0x00,0x00';
               g_color_1144 = C'0x00,0xAA,0x00';
               g_color_1148 = C'0x00,0x96,0x00';
               g_color_1152 = C'0x00,0x87,0x00';
               g_color_1156 = C'0x00,0x78,0x00';
               g_color_1160 = DarkGreen;
               g_color_1164 = C'0x96,0x00,0x00';
               g_color_1168 = C'0xAA,0x00,0x00';
               g_color_1172 = C'0xBE,0x00,0x00';
               g_color_1176 = C'0xD2,0x00,0x00';
               g_color_1180 = C'0xE6,0x00,0x00';
               g_color_1204 = C'0xA0,0xA0,0xA0';
               g_color_1208 = C'0x00,0x50,0x00';
               g_color_1184 = Lime;
               g_color_1188 = Gold;
               g_color_1196 = Lime;
               g_color_1200 = Gold;
               g_color_1192 = YellowGreen;
               g_color_1120 = C'0x00,0x23,0x00';
               g_color_1124 = Green;
            }
            break;
         case 4:
            if (Color_Options == 3) {
               g_color_1128 = C'0x50,0x50,0x50';
               g_color_1132 = C'0x32,0x32,0x32';
               g_color_1136 = C'0x78,0x00,0x00';
               g_color_1140 = C'0xB4,0x00,0x00';
               g_color_1144 = C'0xB4,0xB4,0xB4';
               g_color_1148 = C'0xA0,0xA0,0xA0';
               g_color_1152 = C'0x8C,0x8C,0x8C';
               g_color_1156 = C'0x78,0x78,0x78';
               g_color_1160 = C'0x64,0x64,0x64';
               g_color_1164 = C'0xC8,0x00,0x00';
               g_color_1168 = C'0xDC,0x00,0x00';
               g_color_1172 = C'0xFF,0x00,0x0A';
               g_color_1176 = C'0xFF,0x46,0x00';
               g_color_1180 = C'0xFF,0x6E,0x00';
               g_color_1204 = C'0x50,0x50,0x50';
               g_color_1208 = DarkGreen;
               g_color_1184 = Gray;
               g_color_1188 = DarkOrange;
               g_color_1196 = White;
               g_color_1200 = Gold;
               g_color_1192 = Olive;
               g_color_1120 = C'0x1E,0x1E,0x1E';
               g_color_1124 = Gray;
            }
            break;
         case 5:
            if (Color_Options == 4) {
               g_color_1128 = C'0x50,0x50,0x50';
               g_color_1132 = C'0x32,0x32,0x32';
               g_color_1136 = C'0x00,0x00,0x64';
               g_color_1140 = C'0x00,0x00,0x96';
               g_color_1144 = C'0xB4,0xB4,0xB4';
               g_color_1148 = C'0xA0,0xA0,0xA0';
               g_color_1152 = C'0x8C,0x8C,0x8C';
               g_color_1156 = C'0x78,0x78,0x78';
               g_color_1160 = C'0x64,0x64,0x64';
               g_color_1164 = C'0x00,0x00,0xBE';
               g_color_1168 = C'0x00,0x00,0xD2';
               g_color_1172 = C'0x14,0x14,0xFF';
               g_color_1176 = C'0x00,0x46,0xFF';
               g_color_1180 = C'0x00,0x6E,0xFF';
               g_color_1204 = C'0x50,0x50,0x50';
               g_color_1208 = DarkGreen;
               g_color_1184 = Gray;
               g_color_1188 = DodgerBlue;
               g_color_1196 = White;
               g_color_1200 = DeepSkyBlue;
               g_color_1192 = Olive;
               g_color_1120 = C'0x1E,0x1E,0x1E';
               g_color_1124 = Gray;
            }
            break;
         case 6:
            if (Color_Options == 5) {
               g_color_1128 = C'0x00,0x50,0x00';
               g_color_1132 = C'0x00,0x3C,0x00';
               g_color_1136 = C'0x6C,0x36,0x00';
               g_color_1140 = C'0x82,0x41,0x00';
               g_color_1144 = C'0x00,0xAA,0x00';
               g_color_1148 = C'0x00,0x96,0x00';
               g_color_1152 = C'0x00,0x82,0x00';
               g_color_1156 = C'0x00,0x6E,0x00';
               g_color_1160 = C'0x00,0x5A,0x00';
               g_color_1164 = C'0x9D,0x4F,0x00';
               g_color_1168 = C'0xBB,0x5E,0x00';
               g_color_1172 = C'0xCE,0x67,0x00';
               g_color_1176 = C'0xE6,0x73,0x00';
               g_color_1180 = C'0xFA,0x7C,0x00';
               g_color_1204 = C'0xA0,0xA0,0xA0';
               g_color_1208 = C'0x00,0x50,0x00';
               g_color_1184 = LimeGreen;
               g_color_1188 = Orange;
               g_color_1196 = Lime;
               g_color_1200 = Yellow;
               g_color_1192 = DarkOliveGreen;
               g_color_1120 = C'0x00,0x1E,0x00';
               g_color_1124 = DarkGoldenrod;
            }
            break;
         case 7:
            if (Color_Options == 6) {
               g_color_1128 = C'0x82,0x41,0x00';
               g_color_1132 = C'0x6C,0x36,0x00';
               g_color_1136 = C'0x00,0x00,0x78';
               g_color_1140 = C'0x00,0x00,0x96';
               g_color_1144 = C'0xFA,0x7C,0x00';
               g_color_1148 = C'0xE6,0x73,0x00';
               g_color_1152 = C'0xCE,0x67,0x00';
               g_color_1156 = C'0xBB,0x5E,0x00';
               g_color_1160 = C'0x9D,0x4F,0x00';
               g_color_1164 = C'0x00,0x00,0xBE';
               g_color_1168 = C'0x00,0x00,0xD2';
               g_color_1172 = C'0x14,0x14,0xFF';
               g_color_1176 = C'0x00,0x46,0xFF';
               g_color_1180 = C'0x00,0x6E,0xFF';
               g_color_1204 = C'0x96,0x96,0x96';
               g_color_1208 = DarkGreen;
               g_color_1184 = Orange;
               g_color_1188 = DodgerBlue;
               g_color_1196 = Yellow;
               g_color_1200 = DeepSkyBlue;
               g_color_1192 = SkyBlue;
               g_color_1120 = C'0x00,0x00,0x3C';
               g_color_1124 = C'0x00,0x00,0xB4';
            }
            break;
         case 8:
            if (Color_Options == 7) {
               g_color_1128 = C'0x82,0x41,0x00';
               g_color_1132 = C'0x6C,0x36,0x00';
               g_color_1136 = C'0x6E,0x00,0x00';
               g_color_1140 = C'0x82,0x00,0x00';
               g_color_1144 = C'0xFA,0x7C,0x00';
               g_color_1148 = C'0xE6,0x73,0x00';
               g_color_1152 = C'0xCE,0x67,0x00';
               g_color_1156 = C'0xBB,0x5E,0x00';
               g_color_1160 = C'0x9D,0x4F,0x00';
               g_color_1164 = C'0x96,0x00,0x00';
               g_color_1168 = C'0xAA,0x00,0x00';
               g_color_1172 = C'0xBE,0x00,0x00';
               g_color_1176 = C'0xD2,0x00,0x00';
               g_color_1180 = C'0xE6,0x00,0x00';
               g_color_1204 = C'0x91,0x91,0x91';
               g_color_1208 = DarkGreen;
               g_color_1184 = Orange;
               g_color_1188 = Red;
               g_color_1196 = Yellow;
               g_color_1200 = Orange;
               g_color_1192 = Tan;
               g_color_1120 = C'0x32,0x00,0x00';
               g_color_1124 = Maroon;
            }
            break;
         case 9:
            if (Color_Options == 8) {
               g_color_1128 = C'0x50,0x50,0x50';
               g_color_1132 = C'0x32,0x32,0x32';
               g_color_1136 = C'0x6C,0x36,0x00';
               g_color_1140 = C'0x82,0x41,0x00';
               g_color_1144 = C'0xAA,0xAA,0xAA';
               g_color_1148 = C'0x96,0x96,0x96';
               g_color_1152 = C'0x82,0x82,0x82';
               g_color_1156 = C'0x78,0x78,0x78';
               g_color_1160 = C'0x64,0x64,0x64';
               g_color_1164 = C'0x9D,0x4F,0x00';
               g_color_1168 = C'0xBB,0x5E,0x00';
               g_color_1172 = C'0xCE,0x67,0x00';
               g_color_1176 = C'0xE6,0x73,0x00';
               g_color_1180 = C'0xFA,0x7C,0x00';
               g_color_1204 = C'0x50,0x50,0x50';
               g_color_1208 = DarkGreen;
               g_color_1184 = Gray;
               g_color_1188 = Orange;
               g_color_1196 = White;
               g_color_1200 = Yellow;
               g_color_1192 = Coral;
               g_color_1120 = C'0x28,0x28,0x28';
               g_color_1124 = DarkGoldenrod;
            }
         }
      }
   }
   if (gi_1672) {
      gi_1672 = FALSE;
      if (Color_Options >= 0) ObjectsRedraw();
   }
   if (!IsDllsAllowed()) {
      Alert(" " + "Dolly Graphics #13" + "  DLLs are disabled. \n To enable tick the checkbox \n in the Common Tab of indicator");
      return;
   }
   int li_44 = IndicatorCounted();
   GetLocalTime(lia_48);
   int li_56 = lia_48[0] & 65535;
   int li_60 = lia_48[0] >> 16;
   int li_64 = lia_48[1] >> 16;
   int li_68 = lia_48[2] & 65535;
   int li_72 = lia_48[2] >> 16;
   int li_76 = lia_48[3] & 65535;
   int li_80 = lia_48[3] >> 16;
   string ls_92 = FormatDateTime(li_56, li_60, li_64, li_68, li_72, li_76);
   int l_str2time_100 = StrToTime(ls_92);
   int li_104 = 0;
   int li_108 = GetTimeZoneInformation(lia_52);
   if (li_108 != 0) li_104 = lia_52[0];
   if (li_108 == 2) li_104 += lia_52[42];
   int l_datetime_112 = TimeCurrent();
   int li_116 = l_str2time_100 + 60 * li_104;
   string ls_120 = TimeToString(li_116);
   string ls_128 = TimeToString(l_str2time_100);
   string ls_136 = TimeToString(TimeCurrent());
   if (Show_CommentsText_Bold) ls_144 = "Arial Bold";
   else ls_144 = "Arial";
   if (Show_TimeDISPLAY) {
      if (Show_Background_and_Border) {
         DollyLabel("CBG", 0, "g", 95, "Webdings", g_color_1124, 1, Shift_Time_UP_DN + 18, Shift_Time_SIDEWAYS + 23);
         DollyLabel("CCBG", 0, "g", 95, "Webdings", g_color_1124, 1, Shift_Time_UP_DN + 45, Shift_Time_SIDEWAYS + 23);
         DollyLabel("DBG", 0, "g", 92, "Webdings", g_color_1120, 1, Shift_Time_UP_DN + 20, Shift_Time_SIDEWAYS + 25);
         DollyLabel("DDBG", 0, "g", 92, "Webdings", g_color_1120, 1, Shift_Time_UP_DN + 47, Shift_Time_SIDEWAYS + 25);
      }
      DollyLabel("Dolly76", 0, "Time Data", 10, "Arial Bold", Gold, 1, Shift_Time_UP_DN + 22, Shift_Time_SIDEWAYS + 53);
      DollyLabel("Dolly77", 0, ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", 8, "Arial", White, 1, Shift_Time_UP_DN + 32, Shift_Time_SIDEWAYS + 36);
      DollyLabel("Dolly78", 0, "Local : " + ls_128 + "", 10, ls_144, SteelBlue, 1, Shift_Time_UP_DN + 46, Shift_Time_SIDEWAYS + 45);
      DollyLabel("Dolly79", 0, ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", 8, "Arial", White, 1, Shift_Time_UP_DN + 57, Shift_Time_SIDEWAYS + 36);
      DollyLabel("Dolly80", 0, "GMT : " + ls_120 + "", 12, ls_144, Silver, 1, Shift_Time_UP_DN + 73, Shift_Time_SIDEWAYS + 40);
      DollyLabel("Dolly81", 0, "Broker : " + ls_136 + "", 12, ls_144, SteelBlue, 1, Shift_Time_UP_DN + 93, Shift_Time_SIDEWAYS + 31);
      DollyLabel("Dolly82", 0, ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", 8, "Arial", White, 1, Shift_Time_UP_DN + 106, Shift_Time_SIDEWAYS + 36);
      DollyLabel("Dolly83", 0, "Platform Offset", 10, ls_144, DarkOrange, 1, Shift_Time_UP_DN + 120, Shift_Time_SIDEWAYS + 38);
      ls_152 = TimeToString(li_116 - TimeCurrent());
      if (StrToDouble(ls_152) >= 1.0) ls_152 = TimeToString(li_116 - TimeCurrent());
      else ls_152 = TimeToString(TimeCurrent() - li_116);
      DollyLabel("Dolly84", 0, ls_152 + "hrs", 18, ls_144, Gray, 1, Shift_Time_UP_DN + 135, Shift_Time_SIDEWAYS + 38);
   }
   if (Show_DollyTrading_Instructions == TRUE) return (0);
   gd_1592 = 0;
   gd_1600 = 0;
   for (int li_160 = 99999; li_160 != 0; li_160--) {
      if (TimeDayOfWeek(Time[li_160]) == 0) gd_1592 = gd_1600;
      else gd_1592 = TimeDay(Time[li_160] - (3600 * GMTHours + 60 * GMTMinutes));
      if (gd_1600 != gd_1592) {
         g_close_1624 = Close[li_160 + 1];
         gd_1584 = Open[li_160];
         gd_1608 = gd_1560;
         gd_1616 = gd_1568;
         gd_1560 = High[li_160];
         gd_1568 = Low[li_160];
         gd_1600 = gd_1592;
      }
      if (High[li_160] > gd_1560) gd_1560 = High[li_160];
      if (Low[li_160] < gd_1568) gd_1568 = Low[li_160];
   }
   double ld_164 = (gd_1608 + gd_1616 + g_close_1624) / 3.0;
   double ld_172 = 2.0 * ld_164 + (gd_1608 - 2.0 * gd_1616);
   double ld_180 = ld_164 + (gd_1608 - gd_1616);
   double ld_188 = 2.0 * ld_164 - gd_1616;
   double ld_196 = 2.0 * ld_164 - gd_1608;
   double ld_204 = ld_164 - (gd_1608 - gd_1616);
   double ld_212 = 2.0 * ld_164 - (2.0 * gd_1608 - gd_1616);
   double ld_220 = (ld_204 + ld_212) / 2.0;
   double ld_228 = (ld_196 + ld_204) / 2.0;
   double ld_236 = (ld_164 + ld_196) / 2.0;
   double ld_244 = (ld_164 + ld_188) / 2.0;
   double ld_252 = (ld_188 + ld_180) / 2.0;
   double ld_260 = (ld_180 + ld_172) / 2.0;
   double ld_268 = gd_1584;
   double l_ihigh_276 = iHigh(NULL, PERIOD_D1, 0);
   double l_ilow_284 = iLow(NULL, PERIOD_D1, 0);
   double ld_292 = gd_1608;
   double ld_300 = gd_1616;
   int li_308 = 0;
   int li_312 = 0;
   int li_316 = 0;
   int li_320 = 0;
   int li_unused_324 = 0;
   int li_328 = 0;
   li_308 = (iHigh(NULL, PERIOD_D1, 1) - iLow(NULL, PERIOD_D1, 1)) / gd_1676;
   for (li_328 = 1; li_328 <= 5; li_328++) li_312 = li_312 + (iHigh(NULL, PERIOD_D1, li_328) - iLow(NULL, PERIOD_D1, li_328)) / gd_1676;
   for (li_328 = 1; li_328 <= 10; li_328++) li_316 = li_316 + (iHigh(NULL, PERIOD_D1, li_328) - iLow(NULL, PERIOD_D1, li_328)) / gd_1676;
   for (li_328 = 1; li_328 <= 20; li_328++) li_320 = li_320 + (iHigh(NULL, PERIOD_D1, li_328) - iLow(NULL, PERIOD_D1, li_328)) / gd_1676;
   li_312 /= 5;
   li_316 /= 10;
   li_320 /= 20;
   double ld_332 = (li_308 + li_312 + li_316 + li_320) / 4;
   if (Using_OpenGraphics == TRUE) ld_340 = ld_268;
   else ld_340 = ld_164;
   double ld_348 = ld_340 - 3.0 * (ld_332 / 2.0) * gd_1676;
   double ld_356 = ld_340 + 3.0 * (ld_332 / 2.0) * gd_1676;
   double ld_364 = ld_340 - 5.0 * (ld_332 / 4.0) * gd_1676;
   double ld_372 = ld_340 + 5.0 * (ld_332 / 4.0) * gd_1676;
   double ld_380 = ld_340 - ld_332 * gd_1676;
   double ld_388 = ld_340 + ld_332 * gd_1676;
   double ld_396 = ld_340 - 3.0 * (ld_332 / 4.0) * gd_1676;
   double ld_404 = ld_340 + 3.0 * (ld_332 / 4.0) * gd_1676;
   double ld_412 = ld_340 - ld_332 / 2.0 * gd_1676;
   double ld_420 = ld_340 + ld_332 / 2.0 * gd_1676;
   double ld_428 = ld_340 - ld_332 / 4.0 * gd_1676;
   double ld_436 = ld_340 + ld_332 / 4.0 * gd_1676;
   double l_iclose_444 = iClose(NULL, PERIOD_D1, 0);
   double ld_452 = gd_1608 - gd_1616;
   double ld_460 = gd_1616 + 4.0 * ld_452;
   double ld_468 = gd_1616 + 3.5 * ld_452;
   double ld_476 = gd_1616 + 3.0 * ld_452;
   double ld_484 = gd_1616 + 2.5 * ld_452;
   double ld_492 = gd_1616 + 2.0 * ld_452;
   double ld_500 = gd_1616 + 1.764 * ld_452;
   double ld_508 = gd_1616 + 1.618 * ld_452;
   double ld_516 = gd_1616 + 1.5 * ld_452;
   double ld_524 = gd_1616 + 1.382 * ld_452;
   double ld_532 = gd_1616 + 1.236 * ld_452;
   double ld_540 = gd_1608;
   double ld_548 = gd_1616 + 0.764 * ld_452;
   double ld_556 = gd_1616 + 0.618 * ld_452;
   double ld_564 = gd_1616 + ld_452 / 2.0;
   double ld_572 = gd_1616 + ld_452 / 2.0;
   double ld_580 = gd_1616 + 0.236 * ld_452;
   double ld_588 = gd_1616 + 0.0 * ld_452;
   double ld_596 = gd_1616 - 0.236 * ld_452;
   double ld_604 = gd_1616 - ld_452 / 2.0;
   double ld_612 = gd_1616 - ld_452 / 2.0;
   double ld_620 = gd_1616 - 0.618 * ld_452;
   double ld_628 = gd_1616 - 0.764 * ld_452;
   double ld_636 = gd_1616 - 1.0 * ld_452;
   double ld_644 = gd_1616 - 1.5 * ld_452;
   double ld_652 = gd_1616 - 2.0 * ld_452;
   double ld_660 = gd_1616 - 2.5 * ld_452;
   double ld_668 = gd_1616 - 3.0 * ld_452;
   double ld_676 = ld_340 + BUY_Area * gd_1676;
   double ld_684 = ld_340 - SELL_Area * gd_1676;
   double ld_692 = ld_340 + BUY_Target_1 * gd_1676;
   double ld_700 = ld_340 - SELL_Target_1 * gd_1676;
   double ld_708 = ld_340 + BUY_Target_2 * gd_1676;
   double ld_716 = ld_340 - SELL_Target_2 * gd_1676;
   ObjectsRedraw();
   if (Alert_ON == TRUE) {
      if (Ask > ld_676 - 2.0 * gd_1676 && Ask < ld_676 + 2.0 * gd_1676)
         if (DataBarChanged()) Alert(Symbol(), " M", Period(), " : DOLLY : BUY AREA  @  " + DoubleToStr(ld_676, Digits) + "");
      if (Bid < ld_684 + 2.0 * gd_1676 && Bid > ld_684 - 2.0 * gd_1676)
         if (DataBarChanged()) Alert(Symbol(), " M", Period(), " : DOLLY : SELL AREA  @  " + DoubleToStr(ld_684, Digits) + "");
      if (Ask > ld_692 - 2.0 * gd_1676 && Ask < ld_692 + 2.0 * gd_1676)
         if (DataBarChanged()) Alert(Symbol(), " M", Period(), " : DOLLY : BUY TARGET #1  @  " + DoubleToStr(ld_692, Digits) + "");
      if (Bid < ld_700 + 2.0 * gd_1676 && Bid > ld_700 - 2.0 * gd_1676)
         if (DataBarChanged()) Alert(Symbol(), " M", Period(), " : DOLLY : SELL TARGET #1  @  " + DoubleToStr(ld_700, Digits) + "");
      if (Ask > ld_708 - 2.0 * gd_1676 && Ask < ld_708 + 2.0 * gd_1676)
         if (DataBarChanged()) Alert(Symbol(), " M", Period(), " : DOLLY : BUY TARGET #2  @  " + DoubleToStr(ld_708, Digits) + "");
      if (Bid < ld_716 + 2.0 * gd_1676 && Bid > ld_716 - 2.0 * gd_1676)
         if (DataBarChanged()) Alert(Symbol(), " M", Period(), " : DOLLY : SELL TARGET #2  @  " + DoubleToStr(ld_716, Digits) + "");
   }
   if (TimeToStr(TimeLocal(), TIME_MINUTES) == DATA_EmailTime) {
      if (DataBarChanged()) {
         if (Email_DATA == TRUE) {
            SendMail("DOLLY Daily Trading Levels : " + Symbol() + "", "DOLLY Daily Trading Levels : " 
               + "\n" 
               + Symbol() 
               + "\n" 
               + "Date = " + TimeToStr(TimeLocal(), TIME_DATE) 
               + "\n" 
               + "GMT Shift = " + GMTHours + ":" + GMTMinutes 
               + "\n" 
               + "---------------------------------------------------------------" 
               + "\n" 
               + "\n" 
               + "BUY TARGET #2  @  " + DoubleToStr(ld_708, Digits) + "" + " - TP @ " + DoubleToStr(ld_708 + 10.0 * gd_1676, Digits) + "" + " - SL @ " + DoubleToStr(ld_708 - 20.0 * gd_1676, Digits) 
               + "\n" 
               + "BUY TARGET #1  @  " + DoubleToStr(ld_692, Digits) + "" + " - TP @ " + DoubleToStr(ld_692 + 10.0 * gd_1676, Digits) + "" + " - SL @ " + DoubleToStr(ld_692 - 20.0 * gd_1676, Digits) 
               + "\n" 
               + "BUY AREA  @  " + DoubleToStr(ld_676, Digits) + "" + " - TP @ " + DoubleToStr(ld_676 + 20.0 * gd_1676, Digits) + "" + " - SL @ " + DoubleToStr(ld_676 - 40.0 * gd_1676, Digits) 
               + "\n" 
               + "\n" 
               + "OPEN @  " + DoubleToStr(ld_268, Digits) 
               + "\n" 
               + "\n" 
               + "PIVOT @  " + DoubleToStr(ld_164, Digits) 
               + "\n" 
               + "\n" 
               + "SELL AREA  @  " + DoubleToStr(ld_684, Digits) + "" + " - TP @ " + DoubleToStr(ld_684 - 20.0 * gd_1676, Digits) + "" + " - SL @ " + DoubleToStr(ld_684 + 40.0 * gd_1676, Digits) 
               + "\n" 
               + "SELL TARGET #1  @  " + DoubleToStr(ld_700, Digits) + "" + " - TP @ " + DoubleToStr(ld_700 - 10.0 * gd_1676, Digits) + "" + " - SL @ " + DoubleToStr(ld_700 + 20.0 * gd_1676, Digits) 
               + "\n" 
               + "SELL TARGET #2  @  " + DoubleToStr(ld_716, Digits) + "" + " - TP @ " + DoubleToStr(ld_716 - 10.0 * gd_1676, Digits) + "" + " - SL @ " + DoubleToStr(ld_716 + 20.0 * gd_1676, Digits) 
               + "\n" 
               + "\n" 
               + "DAILY AVERAGE  @  " + DoubleToStr(ld_332 / gd_1676, 0) 
            + "\n");
         }
      }
   }
   if (Ask > ld_676 - 10.0 * gd_1676 && Ask < ld_676 + 0.0 * gd_1676) {
      if (BarChanged()) {
         if (EmailON == TRUE) {
            SendMail("Dolly BUY AREA Alert : " + Symbol() + " M" + Period() + " @  " + DoubleToStr(ld_676, Digits) + "", "Price is approaching : DOLLY : BUY AREA  @  " + DoubleToStr(ld_676, Digits) +
               "" + " - TP @ " + DoubleToStr(ld_676 + 20.0 * gd_1676, Digits) + "" + " - SL @ " + DoubleToStr(ld_676 - 40.0 * gd_1676, Digits) + "");
         }
      }
   }
   if (Ask > ld_692 - 5.0 * gd_1676 && Ask < ld_692 + 0.0 * gd_1676) {
      if (BarChanged()) {
         if (EmailON == TRUE) {
            SendMail("Dolly BUY TARGET #1  Alert : " + Symbol() + " M" + Period() + " @  " + DoubleToStr(ld_692, Digits) + "", "Price is approaching : DOLLY : BUY TARGET #1  @  " +
               DoubleToStr(ld_692, Digits) + "" + " - TP @ " + DoubleToStr(ld_692 + 10.0 * gd_1676, Digits) + "" + " - SL @ " + DoubleToStr(ld_692 - 20.0 * gd_1676, Digits) + "");
         }
      }
   }
   if (Ask > ld_708 - 5.0 * gd_1676 && Ask < ld_708 + 0.0 * gd_1676) {
      if (BarChanged()) {
         if (EmailON == TRUE) {
            SendMail("Dolly BUY TARGET #2 Alert : " + Symbol() + " M" + Period() + " @  " + DoubleToStr(ld_708, Digits) + "", "Price is approaching : DOLLY : BUY TARGET #2  @  " +
               DoubleToStr(ld_708, Digits) + "" + " - TP @ " + DoubleToStr(ld_708 + 10.0 * gd_1676        

Recommend