TRUE Forex

Просмотр кода форекс индикатора !!XCM-MT4-02 SESSIONS.mq4

#property indicator_chart_window

extern int DaysToShow = 30;

extern string  AsiaLabel2  = " HiLo = ";
extern string  AsiaStart2  = "02:00";
extern string  AsiaEnd2    = "07:00";
extern color   AsiaColor2  = C'150,20,20';

extern string  EurLabel2   = " HiLo = ";
extern string  EurStart2   = "10:00";
extern string  EurEnd2     = "15:00";
extern color   EurColor2   = C'20,20,150';

extern string  USLabel2    = " HiLo = ";
extern string  USStart2    = "15:00";
extern string  USEnd2      = "20:00";
extern color   USColor2    = C'20,150,20';

extern bool    ShowBestTradingZones          = true;
extern bool    ShowSolidRectangle            = true;
extern int     Line_Style = 4;
extern int     Line_Width = 0;


int g_datetime_352;
int g_str2time_356;
int g_str2time_360;
int g_str2time_364;
int g_str2time_368;
int g_str2time_372;
int g_str2time_376;
int g_str2time_380;
int g_str2time_384;

int g_count_388;
int g_shift_392;
int g_shift_396;
int g_shift_400;
int g_shift_404;
int g_shift_408;
int g_shift_412;
int g_shift_416;
int g_shift_420;

double g_high_424;
double g_high_440;
double g_low_464;
double g_low_480;

int g_str2time_488;
int g_str2time_492;
int g_str2time_496;
int g_str2time_500;

double gd_504;
double gd_512;
double g_high_520;
double gd_528;

int g_shift_536;
int g_shift_540;
int g_shift_544;
int g_shift_548;

bool gi_552;
int gi_556;

int init() {
   DeleteObjects();
   for (g_count_388 = 0; g_count_388 < DaysToShow; g_count_388++) {
      
      CreateObjects5("AS_REC" + g_count_388, AsiaColor2);
      CreateObjects5("EU_REC" + g_count_388, EurColor2);
      CreateObjects5("US_REC" + g_count_388, USColor2);
      }
   return (0);
}

int deinit() {
   DeleteObjects();
   ObjectDelete("ASIA");
   ObjectDelete("EURO");
   ObjectDelete("USA");
   ObjectDelete("CANDLE");
   return (0);
}

int start() {
   int l_ind_counted_0 = IndicatorCounted();
   g_datetime_352 = TimeCurrent();
   for (g_count_388 = 0; g_count_388 < DaysToShow; g_count_388++) {
    
      if (ShowBestTradingZones) {
         DrawObjects5(g_datetime_352, "AS_REC" + g_count_388, AsiaStart2, AsiaEnd2);
         DrawObjects5(g_datetime_352, "EU_REC" + g_count_388, EurStart2, EurEnd2);
         DrawObjects5(g_datetime_352, "US_REC" + g_count_388, USStart2, USEnd2);
      }
      for (g_datetime_352 = decDateTradeDay(g_datetime_352); TimeDayOfWeek(g_datetime_352) > 5; g_datetime_352 = decDateTradeDay(g_datetime_352)) {
      }
   }
   
   return (0);
}


void CreateObjects5(string a_name_0, color a_color_8) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, 0, 0);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_8);
   ObjectSet(a_name_0, OBJPROP_WIDTH, 2);
   ObjectSet(a_name_0, OBJPROP_STYLE, STYLE_DOT);
   ObjectSet(a_name_0, OBJPROP_BACK, ShowSolidRectangle);
}


void DeleteObjects() {
   for (g_count_388 = 0; g_count_388 < DaysToShow; g_count_388++) {
      ObjectDelete("AS_REC" + g_count_388);
      ObjectDelete("EU_REC" + g_count_388);
      ObjectDelete("US_REC" + g_count_388);
      
   }
}


void DrawObjects5(int ai_0, string a_name_4, string as_12, string as_20) {
   g_str2time_488 = StrToTime(TimeToStr(ai_0, TIME_DATE) + " " + as_12);
   g_str2time_492 = StrToTime(TimeToStr(ai_0, TIME_DATE) + " " + as_20);
   g_shift_536 = iBarShift(NULL, 0, g_str2time_488 - 60 * Period());
   g_shift_540 = iBarShift(NULL, 0, g_str2time_492);
   gd_504 = High[iHighest(NULL, 0, MODE_HIGH, g_shift_536 - g_shift_540, g_shift_540)] - 0.75 * Point;
   gd_512 = Low[iLowest(NULL, 0, MODE_LOW, g_shift_536 - g_shift_540, g_shift_540)] + Point / 2.0;
   ObjectSet(a_name_4, OBJPROP_TIME1, g_str2time_488);
   ObjectSet(a_name_4, OBJPROP_PRICE1, gd_504);
   ObjectSet(a_name_4, OBJPROP_TIME2, g_str2time_492);
   ObjectSet(a_name_4, OBJPROP_PRICE2, gd_512);
}


int decDateTradeDay(int ai_0) {
   int li_4 = TimeYear(ai_0);
   int li_8 = TimeMonth(ai_0);
   int li_12 = TimeDay(ai_0);
   int l_hour_16 = TimeHour(ai_0);
   int l_minute_20 = TimeMinute(ai_0);
   li_12--;
   if (li_12 == 0) {
      li_8--;
      if (li_8 == 0) {
         li_4--;
         li_8 = 12;
      }
      if (li_8 == 1 || li_8 == 3 || li_8 == 5 || li_8 == 7 || li_8 == 8 || li_8 == 10 || li_8 == 12) li_12 = 31;
      if (li_8 == 2) {
         if (MathMod(li_4, 4) == 0.0) li_12 = 29;
         else li_12 = 28;
      }
      if (li_8 == 4 || li_8 == 6 || li_8 == 9 || li_8 == 11) li_12 = 30;
   }
   return (StrToTime(li_4 + "." + li_8 + "." + li_12 + " " + l_hour_16 + ":" + l_minute_20));
}


//--------------------------------------------Xard@hotmail.co.uk-----+
/*                                                                   
                              ud$$$**$$$$$$$bc.                          
                          u@**"        4$$$$$$$Nu                       
                        J                ""#$$$$$$r                     
                       @                       $$$$b                    
                     .F                        ^*3$$$                   
                    :% 4                         J$$$N                  
                    $  :F                       :$$$$$                  
                   4F  9                       J$$$$$$$                 
                   4$   k             4$$$$bed$$$$$$$$$                 
                   $$r  'F            $$$$$$$$$$$$$$$$$r                
                   $$$   b.           $$$$$$$$$$$$$$$$$N                
                   $$$$$k 3eeed$$b    XARD777."$$$$$$$$$                
    .@$**N.        $$$$$" $$$$$$F'L $$$$$$$$$$$  $$$$$$$                
    :$$L  'L       $$$$$ 4$$$$$$  * $$$$$$$$$$F  $$$$$$F         edNc   
   @$$$$N  ^k      $$$$$  3$$$$*%   $F4$$$$$$$   $$$$$"        d"  z$N  
   $$$$$$   ^k     '$$$"   #$$$F   .$  $$$$$c.u@$$$          J"  @$$$$r 
   $$$$$$$b   *u    ^$L            $$  $$$$$$$$$$$$u@       $$  d$$$$$$ 
    ^$$$$$$.    "NL   "N. z@*     $$$  $$$$$$$$$$$$$P      $P  d$$$$$$$ 
       ^"*$$$$b   '*L   9$E      4$$$  d$$$$$$$$$$$"     d*   J$$$$$r   
            ^$$$$u  '$.  $$$L     "#" d$$$$$$".@$$    .@$"  z$$$$*"     
              ^$$$$. ^$N.3$$$       4u$$$$$$$ 4$$$  u$*" z$$$"          
                '*$$$$$$$$ *$b      J$$$$$$$b u$$P $"  d$$P             
                   #$$$$$$ 4$ 3*$"$*$ $"$'c@@$$$$ .u@$$$P               
                     "$$$$  ""F~$ $uNr$$$^&J$$$$F $$$$#                 
                       "$$    "$$$bd$.TZUMAN$$$$F $$"                   
                         ?k         ?$$$$$$$$$$$F'*                     
                          9$$bL     z$$$$$$$$$$$F                       
                           $$$$    $$$$$$$$$$$$$                        
                            '#$$c  '$$$$$$$$$"                          
                             .@"#$$$$$$$$$$$$b                          
                           z*      $$$$$$$$$$$$N.                       
                         e"      z$$"  #$$$k  '*$$.                     
                     .u*      u@$P"      '#$$c   "$$c                   
              u@$*"""       d$$"            "$$$u  ^*$$b.               
            :$F           J$P"                ^$$$c   '"$$$$$$bL        
           d$$  ..      @$#                      #$$b         '#$       
           #ISMAEL#   4$$                          ^$$k         '$      
            "$$6""$b u$$                             '$    d$$$$$P      
              '$F $$$$$"                              ^b  ^$$$$b$       
               '$W$$$$"                                'b@$$$$"         
                                                        ^$$$*  
*/

Комментарии к исходному коду форекс индикатора !!XCM-MT4-02 SESSIONS.mq4
В целях безопасности и борьбы со спамом в тексте комментариев запрещено размещать html-теги и ссылки. Благодарим за понимание.

  • X
  • 0% загружено
« индикатор !!XCM-MT4-01 TF DUO.mq4
индикатор !!XCM-MT4-03 CANDLES.mq4 »