← К каталогу
Исходный код · ID 4083

fibonacci pivot points.mq5

Вы автор или правообладатель?

Сообщите нам, если считаете, что материал размещён без разрешения.

Краткий обзор

О программе

Индикатор рассчитывает уровни Фибоначчи Пивот на основе ценовых данных предыдущей торговой сессии (High, Low, Close). На графике отображаются семь горизонтальных уровней: три уровня сопротивления (R1, R2, R3), пивот-пункт (P) и три уровня поддержки (S1, S2, S3), каждый из которых сопровождается текстовой меткой с ценовым значением.

Индикатор работает в платформе MetaTrader 5 на таймфреймах ниже ежедневного (D1). Для определения данных предыдущей сессии используются пять последних дневных баров с корректной обработкой перехода между пятницей и понедельником. Пивот-пункт вычисляется как среднее от предыдущего High, Low и Close, а уровни поддержки и сопротивления рассчитываются с использованием коэффициентов Фибоначчи (0.382, 0.618, 1.000).

Все визуальные параметры — цвета, стили и толщины линий, а также размер шрифта меток — настраиваются через входные параметры индикатора.

Настройки программы

НастройкаОписание
Color_R3 Цвет горизонтальной линии уровня сопротивления R3.
Color_R2 Цвет горизонтальной линии уровня сопротивления R2.
Color_R1 Цвет горизонтальной линии уровня сопротивления R1.
Color_P Цвет горизонтальной линии пивот-пункта (P).
Color_S1 Цвет горизонтальной линии уровня поддержки S1.
Color_S2 Цвет горизонтальной линии уровня поддержки S2.
Color_S3 Цвет горизонтальной линии уровня поддержки S3.
Style_R3 Стиль линии уровня сопротивления R3.
Style_R2 Стиль линии уровня сопротивления R2.
Style_R1 Стиль линии уровня сопротивления R1.
Style_P Стиль линии пивот-пункта (P).
Style_S1 Стиль линии уровня поддержки S1.
Style_S2 Стиль линии уровня поддержки S2.
Style_S3 Стиль линии уровня поддержки S3.
Width_R3 Толщина линии уровня сопротивления R3.
Width_R2 Толщина линии уровня сопротивления R2.
Width_R1 Толщина линии уровня сопротивления R1.
Width_P Толщина линии пивот-пункта (P).
Width_S1 Толщина линии уровня поддержки S1.
Width_S2 Толщина линии уровня поддержки S2.
Width_S3 Толщина линии уровня поддержки S3.
TextSize Размер шрифта текстовых меток уровней на графике.
Получить полный код

Поиск по коду файла

#property version   "1.01"

#property indicator_chart_window 

#property indicator_buffers 0

#property indicator_plots   0

enum Number
  {
   Number_0,
   Number_1,
   Number_2,
   Number_3
  };

enum Width
  {
   Width_1=1, //1
   Width_2,   //2
   Width_3,   //3
   Width_4,   //4
   Width_5    //5
  };

enum STYLE
  {
   SOLID_,//Solid line
   DASH_,//Dashed line
   DOT_,//Dotted line
   DASHDOT_,//Dot-dash line
   DASHDOTDOT_   // Dot-dash line with double dots
  };

input color  Color_R3 = MediumSeaGreen; //Color of the R3 level
input color  Color_R2 = MediumSeaGreen; //Color of the R2 level
input color  Color_R1 = MediumSeaGreen; //Color of the R1 level
input color  Color_P  = DarkOrchid;     //Color of the P level
input color  Color_S1 = Red;            //Color of the S1 level
input color  Color_S2 = Red;            //Color of the S2 level
input color  Color_S3 = Red;            //Color of the S3 level

input STYLE  Style_R3 = DASHDOTDOT_;    //Line style of the R3 level
input STYLE  Style_R2 = SOLID_;         //Line style of the R2 level
input STYLE  Style_R1 = SOLID_;         //Line style of the R1 level
input STYLE   Style_P = DASH_;          //Line style of the P level
input STYLE  Style_S1 = SOLID_;         //Line style of the S1 level
input STYLE  Style_S2 = SOLID_;         //Line style of the S2 level
input STYLE  Style_S3 = DASHDOTDOT_;    //Line style of the S3 level

input Width  Width_R3 = Width_1;        //The width of the R3 level
input Width  Width_R2 = Width_3;        //The width of the R2 level
input Width  Width_R1 = Width_1;        //The width of the R1 level
input Width   Width_P = Width_1;        //The width of the P level
input Width  Width_S1 = Width_1;        //The width of the S1 level
input Width  Width_S2 = Width_3;        //The width of the S2 level
input Width  Width_S3 = Width_1;        //The width of the S3 level

input uint TextSize=8;

int min_rates_total;

void CreateText(long chart_id,// chart ID
                string   name,              // object name
                int      nwin,              // window index
                datetime time,              // price level time
                double   price,             // price level
                string   text,              // Labels text
                color    Color,             // Text color
                string   Font,              // Text font
                int      Size,              // Text size
                ENUM_ANCHOR_POINT point     // The chart corner to Which an text is attached
                )

  {

   ObjectCreate(chart_id,name,OBJ_TEXT,nwin,time,price);
   ObjectSetString(chart_id,name,OBJPROP_TEXT,text);
   ObjectSetInteger(chart_id,name,OBJPROP_COLOR,Color);
   ObjectSetString(chart_id,name,OBJPROP_FONT,Font);
   ObjectSetInteger(chart_id,name,OBJPROP_FONTSIZE,Size);
   ObjectSetInteger(chart_id,name,OBJPROP_BACK,false);
   ObjectSetInteger(chart_id,name,OBJPROP_ANCHOR,point);

  }

void SetText(long chart_id,// chart ID
             string   name,              // object name
             int      nwin,              // window index
             datetime time,              // price level time
             double   price,             // price level
             string   text,              // Labels text
             color    Color,             // Text color
             string   Font,              // Text font
             int      Size,              // Text size
             ENUM_ANCHOR_POINT point     // The chart corner to Which an text is attached
             )

  {

   if(ObjectFind(chart_id,name)==-1) CreateText(chart_id,name,nwin,time,price,text,Color,Font,Size,point);
   else
     {
      ObjectSetString(chart_id,name,OBJPROP_TEXT,text);
      ObjectMove(chart_id,name,0,time,price);
     }

  }

void CreateHline
(
 long   chart_id,      // chart ID
 string name,          // object name
 int    nwin,          // window index
 double price,         // price level
 color  Color,         // line color
 int    style,         // line style
 int    width,         // line width
 string text           // text
 )

  {

   ObjectCreate(chart_id,name,OBJ_HLINE,0,0,price);
   ObjectSetInteger(chart_id,name,OBJPROP_COLOR,Color);
   ObjectSetInteger(chart_id,name,OBJPROP_STYLE,style);
   ObjectSetInteger(chart_id,name,OBJPROP_WIDTH,width);
   ObjectSetString(chart_id,name,OBJPROP_TEXT,text);
   ObjectSetString(chart_id,name,OBJPROP_TOOLTIP,name);
   ObjectSetInteger(chart_id,name,OBJPROP_BACK,true);  

  }

void SetHline
(
 long   chart_id,      // chart ID
 string name,          // object name
 int    nwin,          // window index
 double price,         // price level
 color  Color,         // line color
 int    style,         // line style
 int    width,         // line width
 string text           // text
 )

  {

   if(ObjectFind(chart_id,name)==-1) CreateHline(chart_id,name,nwin,price,Color,style,width,text);
   else
   

Показано первые 50% кода (символов: 7159)

Открыть по тарифу

Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.

Разовая покупка файла

На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.

Чтобы оформить заказ, введите email и перейдите к оплате.

Стоимость полного кода
715,90₽ ≈ $8.75