Смотри, как бесплатно скачать роботов
Ищи нас в Telegram!
Ставь лайки и следи за новостями
Интересный скрипт?
Поставь на него ссылку - пусть другие тоже оценят
Понравился скрипт?
Оцени его работу в терминале MetaTrader 5
Индикаторы

Insid Bar, Внутренний бар. - индикатор для MetaTrader 5

Просмотров:
2256
Рейтинг:
(12)
Опубликован:
2019.01.26 11:25
Обновлен:
2019.01.27 11:35
Нужен робот или индикатор на основе этого кода? Закажите его на бирже фрилансеров Перейти на биржу


//+------------------------------------------------------------------+
//|                                                   Insid_Bar.mq5 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                              https://www.mql5.com/ru/users/s22aa |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property indicator_chart_window

#property indicator_buffers 2  
#property indicator_plots 2   

#property indicator_type1 DRAW_ARROW  
#property indicator_type2 DRAW_ARROW  

#property indicator_color1 clrRed  
#property indicator_color2 clrBlue   

#property indicator_width1  2     
#property indicator_width2  2

double BuffUp[];    
double BuffDn[];    

input int  ArrowShift = 0;  //   отступ точек от свечи, по высоте
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
{
      SetIndexBuffer(0,BuffUp, INDICATOR_DATA); 
      SetIndexBuffer(1,BuffDn, INDICATOR_DATA);
    
      IndicatorSetString (INDICATOR_SHORTNAME,"Insid_Bar"); 
      IndicatorSetInteger(INDICATOR_DIGITS, _Digits); 
          
      PlotIndexSetInteger(0, PLOT_ARROW, 159);        
      PlotIndexSetInteger(1, PLOT_ARROW, 159);
      
      PlotIndexSetInteger(0, PLOT_ARROW_SHIFT, ArrowShift); 
      PlotIndexSetInteger(1, PLOT_ARROW_SHIFT, -ArrowShift);
   
      PlotIndexSetDouble(0, PLOT_EMPTY_VALUE, EMPTY_VALUE);
      PlotIndexSetDouble(1, PLOT_EMPTY_VALUE, EMPTY_VALUE);  
    
    return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{
 int i, limit;
   
   if (rates_total < 2)
      return(0);
     
   if (prev_calculated < 3)
   {
      limit = 2;
      
      ArrayInitialize(BuffDn, EMPTY_VALUE); 
      ArrayInitialize(BuffUp, EMPTY_VALUE);
      
   } else limit = rates_total - 2;
   
   for(i = limit; i<rates_total-1; i++)
   {
      if (high[i] <= high[i-1] && low[i] >= low[i-1])
      {
         BuffUp[i-1] = low[i-1]; BuffDn[i-1] = high[i-1];
      }
      else
      {
         BuffUp[i] = EMPTY_VALUE;
         BuffDn[i] = EMPTY_VALUE;
      }
      
   }

   return(rates_total);
}


iCCI iMA iSAR iCCI iMA iSAR

Торговая стратегия на двух таймфреймах и индикаторах iCCI (Commodity Channel Index, CCI)), iMA (Moving Average, MA) и iSAR (Parabolic SAR, SAR)

LeManTrend_Cloud LeManTrend_Cloud

Индикатор определяет положение тренда на основе текущей цены и максимальных и минимальных цен за три периода

LeManTrend_Cloud_HTF LeManTrend_Cloud_HTF

Индикатор LeManTrend_Cloud с возможностью изменения таймфрейма индикатора во входных параметрах

Gap System Gap System

Торговая система построенная на движении после гэпа.