Группа "Стол заказов MQL"

Рейтинг 2087



РЕКОМЕНДУЮ



Создание стрелки+всплывающего окна с указанием актива и направления для МТ4

Здравствуйте! Можете обЪединить в одну стрелу с алертом и всплывающим окошком актива и направления «old school» индикаторы?
Скрин прилагаю.Он на покупку, на продажу зеркально условиям на покупку.
Условия:
1.Свеча зашла в зелёную/красную область канала.
2.Две стрелки появились на одной свече.
3.Два подвала показали ГОЛУБЫЕ:D столбы (два).
4.Зелёный червяк находится ниже уровня 30 или красный червяк находится выше уровня 70.
uno minutO.rar (57 Kb)

  • 0
  • Просмотров: 2083
  • 23 марта 2020, 21:20
  • Shiva
Понравилcя материал? Не забудьте поставить плюс и поделиться в социальной сети!

Вступите в группу "Стол заказов MQL", чтобы следить за обновлениями
ПРИСОЕДИНИТЬСЯ К ГРУППЕ
присоединиться
  Предыдущая запись в группе
Советник
Следующая запись в группе  
советник Leonidos 2
22 марта 2020
24 марта 2020

Комментарии (9)

+
0
на 27-е
avatar

  34  AM2 Сообщений: 15880 - Андрей

  • 23 марта 2020, 21:28
+
0
Спасибо*za* 
avatar

  10  Shiva Автор Сообщений: 148

  • 23 марта 2020, 22:36
+
0
Можно в подвале на цвете не делать акцент! Просто ниже 30 или выше 70.
avatar

  10  Shiva Автор Сообщений: 148

  • 25 марта 2020, 17:05
+
0
сколько индикаторов используется для сигнала и какие именно?
в архиве их 6
avatar

  34  AM2 Сообщений: 15880 - Андрей

  • 27 марта 2020, 20:42
+
0
Все 6. Только подвал самый Нижний без разницы какого цвета, главное ниже 30 (покупка), выше 70 продажа.
Редактирован: 27 марта 2020, 23:04
avatar

  10  Shiva Автор Сообщений: 148

  • 27 марта 2020, 22:49
+
0
при добавлении 4-го индикатора совпадения условий крайне редкие:




//+------------------------------------------------------------------+
//|                                                     Pointer9.mq4 |
//|                                              Copyright 2020, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, AM2"
#property link      "http://www.forexsystems.biz"
#property version   "1.00"
#property strict
#property indicator_chart_window

#property indicator_buffers 2

extern int Count=111;

extern string IndName1="SonicR VSA (Black)";

extern string IndName2="BetterVolume 1.4";

extern string IndName3="BB_Alert Arrows";

extern string IndName4="MBFX Timing";

double up[];
double dn[];

datetime t=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexStyle(0,DRAW_ARROW,0,3,Blue);
   SetIndexArrow(0,233);
   SetIndexBuffer(0,up);

   SetIndexStyle(1,DRAW_ARROW,0,3,Red);
   SetIndexArrow(1,234);
   SetIndexBuffer(1,dn);

   Comment("");
//---
   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[])
  {
//---
   double blu1=0,
          blu2=0,
          bbup=0,
          bbdn=0,
          gre=0,
          red=0;

   for(int i=1; i<Count; i++)
     {
      blu1=iCustom(NULL,0,IndName1,2,i);
      blu2=iCustom(NULL,0,IndName2,1,i);

      bbup=iCustom(NULL,0,IndName3,1,i);
      bbdn=iCustom(NULL,0,IndName3,0,i);

      gre=iCustom(NULL,0,IndName4,1,i);
      red=iCustom(NULL,0,IndName4,2,i);

      if(blu1>0 && blu2>0 && bbdn<1000 && red<1000)
        {
         dn[i]=high[i];
        }
      if(blu1>0 && blu2>0 && bbup<1000 && gre<1000)
        {
         up[i]=low[i];
        }
     }

   if(t!=time[0])
     {
      if(up[1]>0)
        {
         Alert(_Symbol+" Buy!");
        }
      if(dn[1]>0)
        {
         Alert(_Symbol+" Sell!");
        }
      t=time[0];
     }

   Comment(iCustom(NULL,0,IndName4,1,1));
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+

avatar

  34  AM2 Сообщений: 15880 - Андрей

  • 30 марта 2020, 07:36
+
0
В таком случае удобно сделать какой-либо из индикаторов отключаемым (не учитывать его показания при открытии сделки). И проверить через тестирование какой из 6-ти оказывает слабое (незначительное) влияние на общий профит.
avatar

  9  stargazer2011 Сообщений: 57

  • 30 марта 2020, 10:48
+
0
Тогда самый Нижний подвал можно сделать отключаемым, он так — на подхвате. *tipatogo* 
avatar

  10  Shiva Автор Сообщений: 148

  • 30 марта 2020, 13:21
+
0
добавил 5-й индикатор ни одной стрелки. червяк убрал, ничего не изменилось:


//+------------------------------------------------------------------+
//|                                                     Pointer9.mq4 |
//|                                              Copyright 2020, AM2 |
//|                                      http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, AM2"
#property link      "http://www.forexsystems.biz"
#property version   "1.00"
#property strict
#property indicator_chart_window

#property indicator_buffers 2

extern int Count=111;

extern string IndName1="SonicR VSA (Black)";

extern string IndName2="BetterVolume 1.4";

extern string IndName3="BB_Alert Arrows";

extern string IndName4="MBFX Timing";

extern string IndName5="Star-Profit-Channel";

double up[];
double dn[];

datetime t=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexStyle(0,DRAW_ARROW,0,3,Blue);
   SetIndexArrow(0,233);
   SetIndexBuffer(0,up);

   SetIndexStyle(1,DRAW_ARROW,0,3,Red);
   SetIndexArrow(1,234);
   SetIndexBuffer(1,dn);

   Comment("");
//---
   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[])
  {
//---
   double blu1=0,
          blu2=0,
          bbup=0,
          bbdn=0,
          gre=0,
          red=0,
          greup=0,
          gredn=0,
          redup=0,
          reddn=0;

   for(int i=1; i<Count; i++)
     {
      blu1=iCustom(NULL,0,IndName1,2,i);
      blu2=iCustom(NULL,0,IndName2,1,i);

      bbup=iCustom(NULL,0,IndName3,1,i);
      bbdn=iCustom(NULL,0,IndName3,0,i);

      gre=iCustom(NULL,0,IndName4,1,i);
      red=iCustom(NULL,0,IndName4,2,i);

      greup=iCustom(NULL,0,IndName5,4,i);
      gredn=iCustom(NULL,0,IndName5,6,i);
      
      redup=iCustom(NULL,0,IndName5,3,i);
      reddn=iCustom(NULL,0,IndName5,1,i);

      if(blu1>0 && blu2>0 && bbdn<1000 && red<1000 && Bid<redup && Bid>reddn)
        {
         dn[i]=high[i];
        }
      if(blu1>0 && blu2>0 && bbup<1000 && gre<1000 && Bid>gredn && Bid<greup)
        {
         up[i]=low[i];
        }
     }

   if(t!=time[0])
     {
      if(up[1]>0)
        {
         Alert(_Symbol+" Buy!");
        }
      if(dn[1]>0)
        {
         Alert(_Symbol+" Sell!");
        }
      t=time[0];
     }

   Comment(iCustom(NULL,0,IndName4,1,1));
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+



2-3 в одном это еще другое дело
Редактирован: 31 марта 2020, 16:40
avatar

  34  AM2 Сообщений: 15880 - Андрей

  • 30 марта 2020, 21:48

Зарегистрируйтесь или авторизуйтесь, чтобы оставить комментарий
Начать торговлю с Альпари