Errors, bugs, questions - page 66

 
Interesting:


Now, the main inconvenience is that MQ only create USD accounts with 100 leverage anyway, and for example Alpari only with 500 leverage...

Our demo server already has multicurrency demo accounts with a wide range of leverage:

Re-install the terminal from the updated distribution:https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mt5setup.exe

 
Renat:

Our demo server already has multicurrency demo accounts with a wide range of leverage:

Re-install the terminal from the updated distribution:https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mt5setup.exe

Weird, maybe I'm already completely out....


Server selection


Select account type


Choose leverage size

PS

This is on 294 release, not a week ago I set it up...

 
Interesting:

Strange, maybe I'm completely out of date....

Just download the distributive again - it has been updated.

The initial conditions for demo account registrations are set exactly in the distributive label and are not updated with updates.

 
Renat:

Simply download the distribution again - it has been updated.

The initial conditions for demo account registrations are set exactly in the distributive label and are not updated with updates.

Thanks, updated over the previous release, all OK...
 

Can you tell me how to get 2 zigzag extrema? I'm doing this:

int zzHandle;     // хэндл индикатора ZigZag
double zzVal[];   // динамические массивы для хранения численных значений индикатора ZigZag
double zz1, zz2;  // значения цены 1-го и 2-го зигзага

ArraySetAsSeries(zzVal,true);
CopyBuffer(zzHandle,0,0,50,zzVal); // Cкопировали значения индикатора в массив

int ke=0;
for (int i=1;i<50;i++)
{
if (zzVal[i]!=0)
{
   zz1=zzVal[i];
   ke++;
}
if (ke>1) zz2=zzVal[i];
}  

Lots of examples but can't figure it out yet.

//+------------------------------------------------------------------+
//+----------------------------------------------------------------------------+
//|  Автор    : Ким Игорь В. aka KimIV,  http://www.kimiv.ru                   |
//+----------------------------------------------------------------------------+
//|  Версия   : 07.10.2006                                                     |
//|  Описание : Возвращает экстремум ЗигЗага по его номеру.                    |
//+----------------------------------------------------------------------------+
//|  Параметры:                                                                |
//|    sy - наименование инструмента   (NULL или "" - текущий символ)          |
//|    tf - таймфрейм                  (      0     - текущий ТФ)              |
//|    ne - номер экстремума           (      0     - последний)               |
//|    dp - ExtDepth                                                           |
//|    dv - ExtDeviation                                                       |
//|    bs - ExtBackstep                                                        |
//+----------------------------------------------------------------------------+
double GetExtremumZZPrice(string sy="", int tf=0, int ne=0, int dp=12, int dv=5, int bs=3) {
  if (sy=="" || sy=="0") sy=Symbol();
  double zz;
  int    i, k=iBars(sy, tf), ke=0;

  for (i=0; i<k; i++) {
    zz=iCustom(sy, tf, "ZigZag", dp, dv, bs, 0, i);
    if (zz!=0) {
      ke++;
      if (ke>ne) return(zz);
    }
  }
  Print("GetExtremumZZPrice(): Экстремум ЗигЗага номер ",ne," не найден");
  return(0);
=================================================================
double ZZ, arr[7];
int i=0, sh=0;
  while (sh<1000)
   {
    if (iCustom(NULL,0,"ZigZag",12,5,3,0,sh)!=0)
     {
      arr[i]=iCustom(NULL,0,"ZigZag",12,5,3,0,sh);
      Alert("arr[",i+"]=",arr[i]+" Период= "+Period());
      i++;
     }
    if (i==7) return(0);
  sh++;
   }
=================================================================
double // экстремумы Зиг-Зага
  y3=0, //предпоследнего экстремума
   y2=0,//значение последего экстремума
    y1=0,//тек. экстр.
     y0,//кончик посл. луча  
     zz;    //кончик 3-го экстр
int    x3, x2, x1, sh=1;// номера баров  
   double stop;
// Comment(zz,"_",y1,"_",y2,"_",y3);
  y0=iCustom(NULL, 0, "ZigZag", ExtDepth, ExtDeviation, ExtBackstep, 0, 1);
  
//=============================================================================
  // Берём три экстремума Зиг-Зага
   while (y3==0)
      {
      zz=iCustom(NULL, 0, "ZigZag", ExtDepth, ExtDeviation, ExtBackstep, 0, sh);
      if (zz!=0 && zz!=EMPTY_VALUE)
         {
         if      (y1==0) { x1=sh; y1=zz; }
         else if (y2==0) { x2=sh; y2=zz; }
         else if (y3==0) { x3=sh; y3=zz; }
         }
      sh++;
    //----- Вывод информации на экран -----------------------------------------------
string info="";
string on_off="---------------------------------------------------"+  "\r\n";
//if (BUY)     on_off=StringConcatenate  (on_off,"Сделки BUY разрешены ", "\r\n");
//else         on_off=StringConcatenate (on_off,"Сделки BUY - отключ. ","\r\n");
//if (SELL)    on_off=StringConcatenate (on_off,"Сделки SELL разрешены ","\r\n");
//else         on_off=StringConcatenate (on_off,"Сделки SELL - отключ. ","\r\n");
on_off=StringConcatenate (on_off,"Экстремум= ",y1," на ",x1," баре","\r\n");
on_off=StringConcatenate (on_off,"Экстремум= ",y2," на ",x2," баре","\r\n");
info=StringConcatenate(info,on_off,"\r\n");
info=StringConcatenate(info,"\r\n");
Comment(info);    
//-----------------------------------------------                
                
      } // while (y3==0)      
//=================================================================================    
double zz[2]={0,0};
int bzz[2]={0,0};
int i=0;
int b=0;
while(i<1 && b<Bars-1)
{
   double u=iCustom(NULL,0,..,b); // не знаю с какого ZZ ищем узлы
   if(u!=EMPTY_VALUE)
   {
      zz[i]=u;
      bzz[i]=b;
      i++;
   }
   b++;
}
// в zz[0] и zz[1] имеем цены двух узлов
// в bzz[0] и bzz[1] имеем номера баров двух узлов
===============================================================
 
Thank you for extending the gradations of leverage.
 
Wait a minute... I'm a novice in this business, of course, and I could get bogged down with trivial questions, but still... If I plan to make live visualization of trades in the Strategy Tester during run (like in MT4), is it possible to visualize in the same way, say, automatic scripted graphical drawings? So far I've only heard of the Tester as a numerical handler and a primitive visual indicator for opening/closing trades. But what about live drawing/deleting graphical objects during test runs?
 

Done!

double zz[2]={0,0};
int zzHandle;     // хэндл индикатора ZigZag
double zzVal[];   // динамические массивы для хранения численных значений индикатора ZigZag
//--- Получить хэндл индикатора ZigZag
zzHandle=iCustom(NULL,0,"ZigZag",ExtDepth,ExtDeviation,ExtBackstep,0,PRICE_CLOSE);  //Расчет индикатора ZigZag
ArraySetAsSeries(zzVal,true);
CopyBuffer(zzHandle,0,0,50,zzVal);// Cкопировали значения индикатора в массив
// Ищем ближайший экстремум
int a =0;
for (int i=1;i<50;i++)
{
if (zzVal[i]!=0)
{
     if(a<2)
      {
       zz[a]=zzVal[i];
       a++;
      }
    }
}
}  
 
AM2:

Can you tell me how to get 2 zigzag extrema? I'm doing this:

Lots of examples but can't figure it out yet.

There is an example of getting the last 20 extrema - see the example in the Methods of Object Binding section
 
Want to choose to install the x64 or x32 bit version of the terminal.
Reason: