0
В параметрах «Цена закрытия», это расстояние от цены открытия до цены закрытия последнего стопового ордера?


это цена от момента установки ордеров до +- (700) дельта пунктов. например есть 3 ордера с шагом 200 и дельта 700, все тейки будут на цене бид+-700пунктов
avatar

AM2

  • 6 февраля 2022, 13:27
0
у вас задание и коменты без скринов. это не есть гуд
avatar

AM2

  • 6 февраля 2022, 11:27
0
цена закрытия ордеров как задается?
avatar

AM2

  • 5 февраля 2022, 20:51
0
как должно быть? покажите на скрине?
avatar

AM2

  • 5 февраля 2022, 20:25
0
на скрине видно что лот меняется
avatar

AM2

  • 5 февраля 2022, 08:48
0
Необходимо создать отправку этих сигналов(текст алерта) через сокет в сторонную программу


в какую программу?
avatar

AM2

  • 3 февраля 2022, 19:52
0
с чужим кодом не работаю
avatar

AM2

  • 2 февраля 2022, 18:55
0
я не работаю с чужим кодом, поэтому прошу тз
avatar

AM2

  • 2 февраля 2022, 18:53
0
опишите подробнее в тз все что нужно
avatar

AM2

  • 2 февраля 2022, 17:41
+1
такой еще сделал вариант, но он одним цветом:




//+------------------------------------------------------------------+
//|                                                        Gisto.mq5 |
//|                                              Copyright 2022, AM2 |
//|                                     https://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, AM2"
#property link      "https://www.forexsystems.biz"
#property version   "1.00"
#property indicator_separate_window

#property indicator_buffers 3
#property indicator_plots   1

#property indicator_type1  DRAW_COLOR_HISTOGRAM
#property indicator_color1  Red,Lime
#property indicator_style1  STYLE_SOLID
#property indicator_width1  2

int ind=0;
double gi[],col[],ac[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,gi,INDICATOR_DATA);
   SetIndexBuffer(1,col,INDICATOR_COLOR_INDEX);
   SetIndexBuffer(2,ac,INDICATOR_CALCULATIONS);
   ind=iAC(NULL,0);
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Count(int k)
  {
   int n=0;
   ArraySetAsSeries(ac,true);
   CopyBuffer(ind,0,0,111,ac);

   for(int i=k; i<111; i++)
     {
      double ac1=ac[i];
      double ac2=ac[i+1];

      n++;

      if((ac1>0 && ac2<0) || (ac1<0 && ac2>0))
         break;
     }
   return(n);
  }
//+------------------------------------------------------------------+
//| 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[])
  {
//---
   ArraySetAsSeries(gi,true);

   for(int i=0; i<=rates_total-1; i++)
     {
      if(ac[i]>0)
        {
         col[i]=0;
         gi[i]=Count(i);
        }

      if(ac[i]<0)
        {
         col[i]=1;
         gi[i]=-Count(i);
        }
     }

   Comment("\n Count: ",Count(0));

//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+



avatar

AM2

  • 1 февраля 2022, 23:47
+1
я часа 2 просидел с этим индикатором, нужно больше времени. пока так:




//+------------------------------------------------------------------+
//|                                                        Gisto.mq5 |
//|                                              Copyright 2022, AM2 |
//|                                     https://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, AM2"
#property link      "https://www.forexsystems.biz"
#property version   "1.00"
#property indicator_separate_window

#property indicator_buffers 2
#property indicator_plots   1

#property indicator_type1  DRAW_COLOR_HISTOGRAM
#property indicator_color1  Red,Lime
#property indicator_style1  STYLE_SOLID
#property indicator_width1  2

int ind=0;
double gi[],col[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,gi,INDICATOR_DATA);
   SetIndexBuffer(1,col,INDICATOR_COLOR_INDEX);
   ind=iAC(NULL,0);
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int Count()
  {
   int n=0;

   for(int i=ArraySize(gi); i>=0; i--)
     {
      double ac1=gi[i];
      double ac2=gi[i+1];

      n++;

      if((ac1>0 && ac2<0) || (ac1<0 && ac2>0))
         break;
     }
   return(n);
  }
//+------------------------------------------------------------------+
//| 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[])
  {
//---
   //ArraySetAsSeries(gi,true);
   CopyBuffer(ind,0,0,rates_total-1,gi);

   for(int i=0; i<=rates_total-1; i++)
     {
      if(gi[i]>0)
        {
         col[i]=0;
         //gi[i]=Count(i);
        }

      if(gi[i]<0)
        {
         col[i]=1;
         //gi[i]=-Count(i);
        }
     }

   Comment(Count());

//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+



avatar

AM2

  • 1 февраля 2022, 23:17