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) //================================================================================= 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] имеем номера баров двух узлов ===============================================================
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?
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
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...
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.
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.
Can you tell me how to get 2 zigzag extrema? I'm doing this:
Lots of examples but can't figure it out yet.
Done!
Can you tell me how to get 2 zigzag extrema? I'm doing this:
Lots of examples but can't figure it out yet.