Хотябы помогите новичку - моя попытка переписать наткнулась на ошибку, с которой ни как не могу справится, может кто намекнет:
//+------------------------------------------------------------------+ //| HL_Actevator_mext.mq4 | //| | //| Conversion only | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Tomato #property indicator_color2 Cornsilk //---- input parameters extern int HL_period=3; extern int NumBars=1000; //---- buffers double Up[]; double Down[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,159); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159); SetIndexBuffer(0,Up); SetIndexBuffer(1,Down); //---- //---- return(0); } //+------------------------------------------------------------------+ //| Hi-Lo | //+------------------------------------------------------------------+ int start() { SetIndexDrawBegin(0,Bars-NumBars+HL_period); SetIndexDrawBegin(1,Bars-NumBars+HL_period); // int i; // int counted_bars=IndicatorCounted(); // bool Pr=false, PrevPr=false; // double val,val2; int alt=0; int shift=0; int n=0; int sumH=0; int sumL=0; int MaH=0; int MaL=0; int hh=0; int ll=0; int cl=0; int Nbar2=0; int Nbar=0; int k=0; int m=0; int mm=0; int ur[99999,2]; int h1[99999]; int l1[99999]; // if(NumBars<=HL_period) return(0); if (Period()==PERIOD_M5) { for (n=0;n<=NumBars;n++) { ur[n,1] = 0; ur[n,2] = 0; h1[n] = 0; l1[n] = 0; } for (shift=NumBars;shift=0;shift--) { if (TimeHour(CurTime(shift + 1))!=TimeHour(CurTime(shift)) { Nbar = -1; k = 1; mm = 0; n = shift - 15; while(n <= shift + HL_period * 12 + 5) { if (n<0) { Nbar = 0; n = 1; } if ((TimeHour(CurTime(n + 1))!=TimeHour(CurTime(n))&& (Nbar == -1)) {Nbar = n; mm = n; n++; continue; } } if ((TimeHour(CurTime(n + 1))!=TimeHour(CurTime(n))&& (Nbar != -1)) { h1[k] = Highest(2,n,n - Nbar); l1[k] = Lowest(1,n,n - Nbar); k++; Nbar = n; } n++; }//while MaH = 0; MaL = 0; for (n = 1;n <=HL_period;n++) { MaH = MaH + High[h1[n]]; MaL = MaL + Low[l1[n]]; } MaH = MaH / HL_period; MaL = MaL / HL_period; ur[shift,1] = MaH; ur[shift,2] = MaL; if(Close[mm + 1] >= MaH) { ll = 1; hh = 0; } if(Close[mm + 1] <= MaL ) { hh = 1; ll = 0; } if(ur[shift,1] == 0) { ur[shift,1] = ur[shift + 1,1]; ur[shift,2] = ur[shift + 1,2]; } } if (ll == 1 ) ( Up[shift]=0; Down[shift]=ur[shift,2]; } if (hh == 1) { Up[shift]=0; Down[shift]=ur[shift,1]; } } }
Пишет - '}' - unbalanced parentheses
если убираю последнюю фигурную скобку - пишет
'\end_of_program' - unbalanced left parenthesis
____________________
Заранее благодарю за помощь!!!
//+------------------------------------------------------------------+ //| HL_Actevator_mext.mq4 | //| | //| Conversion only | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Tomato #property indicator_color2 Cornsilk //---- input parameters extern int HL_period=3; extern int NumBars=1000; //---- buffers double Up[]; double Down[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,159); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159); SetIndexBuffer(0,Up); SetIndexBuffer(1,Down); return(0); } //+------------------------------------------------------------------+ //| Hi-Lo | //+------------------------------------------------------------------+ int start() { SetIndexDrawBegin(0,Bars-NumBars+HL_period); SetIndexDrawBegin(1,Bars-NumBars+HL_period); // int i; // int counted_bars=IndicatorCounted(); // bool Pr=false, PrevPr=false; // double val,val2; int alt=0; int shift=0; int n=0; int sumH=0; int sumL=0; int MaH=0; int MaL=0; int hh=0; int ll=0; int cl=0; int Nbar2=0; int Nbar=0; int k=0; int m=0; int mm=0; int ur[99999,2]; int h1[99999]; int l1[99999]; // if(NumBars<=HL_period) return(0); if (Period()==PERIOD_M5) { for (n=0;n<=NumBars;n++) { ur[n,1] = 0; ur[n,2] = 0; h1[n] = 0; l1[n] = 0; } for (shift = NumBars; shift == 0; shift--) { if(TimeHour(iTime(NULL, 0, shift + 1)) != TimeHour(iTime(NULL, 0, shift))) { Nbar = -1; k = 1; mm = 0; n = shift - 15; while(n <= shift + HL_period * 12 + 5) { if (n<0) { Nbar = 0; n = 1; } if ((TimeHour(iTime(NULL, 0, n + 1)) != TimeHour(iTime(NULL, 0, n))) && (Nbar == -1)) { Nbar = n; mm = n; n++; continue; } if ((TimeHour(iTime(NULL, 0, n + 1)) != TimeHour(iTime(NULL, 0, n))) && (Nbar != -1)) { h1[k] = Highest(2,n,n - Nbar); l1[k] = Lowest(1,n,n - Nbar); k++; Nbar = n; } n++; }//while MaH = 0; MaL = 0; for (n = 1; n <= HL_period; n++) { MaH = MaH + High[h1[n]]; MaL = MaL + Low[l1[n]]; } MaH = MaH / HL_period; MaL = MaL / HL_period; ur[shift,1] = MaH; ur[shift,2] = MaL; if(Close[mm + 1] >= MaH) { ll = 1; hh = 0; } if(Close[mm + 1] <= MaL ) { hh = 1; ll = 0; } if(ur[shift,1] == 0) { ur[shift,1] = ur[shift + 1,1]; ur[shift,2] = ur[shift + 1,2]; } } if(ll == 1 ) { Up[shift]=0; Down[shift]=ur[shift,2]; } if(hh == 1) { Up[shift]=0; Down[shift]=ur[shift,1]; } } } }
СПАСИБО!!!
СПАСИБО!!!
Имейте ввиду HL_Activator_Next - этот индюк перерисовывает историю на нескольких предыдущих барах
Посмотрел HL_Activator_Next, заинтересовался, никак не пойму алгоритм, а просто в тупую переделывать на четверку не могу
Вот очищенный и оптимизированный код :
Вот очищенный и оптимизированный код :
/*[[ Name := HL_Activator_Next Separate Window := No First Color := DarkKhaki First Draw Type := Symbol First Symbol := 159 Use Second Data := Yes Second Color := Red Second Draw Type := Symbol Second Symbol := 159 ]]*/ Input: HL_period(3); Input: NumBars(1000); Var: cb(0); Var: n(0); Var: Nbar(0); Var: k(0); Var: MaH(0); Var: MaL(0); Var: hh(0); Var: ll(0); Var: mm(0); Array: ur[99999,2](0); Array: h1[99999](0); Array: l1[99999](0); SetLoopCount(0); for n = 0 to NumBars { ur[n,1] = 0; ur[n,2] = 0; h1[n] = 0; l1[n] = 0; } for cb = NumBars downto 0 { Nbar = -1; k = 1; mm = 0; //----------------------------------------------------------------------------- if Period == 5 then //если график - М5 { if TimeHour(Time[cb + 1]) != TimeHour(Time[cb]) then { n = cb - 15; while n <= cb + HL_period * 12 + 5 { if n < 0 then { Nbar = 0; n = 1; } if TimeHour(Time[n + 1]) != TimeHour(Time[n]) then { if Nbar == -1 then { Nbar = n; mm = n; n++; continue; } else { h1[k] = Highest(2,n,n - Nbar); l1[k] = Lowest(1,n,n - Nbar); k++; Nbar = n; }; } n++; } MaH = 0; MaL = 0; for n = 1 to HL_period { MaH = MaH + High[h1[n]]; MaL = MaL + Low[l1[n]]; } MaH = MaH / HL_period; MaL = MaL / HL_period; ur[cb,1] = MaH; ur[cb,2] = MaL; if Close[mm + 1] >= MaH then { ll = 1; hh = 0; } if Close[mm + 1] <= MaL then { hh = 1; ll = 0; } } if ur[cb,1]==0 then { ur[cb,1] = ur[cb + 1,1]; ur[cb,2] = ur[cb + 1,2]; } if ll == 1 then { SetIndexValue2(cb,0); SetIndexValue(cb,ur[cb,2]); } else { if hh == 1 then { SetIndexValue(cb,0); SetIndexValue2(cb,ur[cb,1]); } }; } else { //----------------------------------------------------------------------------- if Period == 15 then //если график - М15 { if TimeHour(Time[cb + 1]) != TimeHour(Time[cb]) then { n = cb - 5; while n <= cb + HL_period * 4 + 2 { if n < 0 then { Nbar = 0; n = 1; } if TimeHour(Time[n + 1]) != TimeHour(Time[n]) then { if Nbar==-1 then { Nbar = n; mm = n; n++; continue; } else { h1[k] = Highest(2,n,n - Nbar); l1[k] = Lowest(1,n,n - Nbar); k++; Nbar = n; }; } n++; } MaH = 0; MaL = 0; for n = 1 to HL_period { MaH = MaH + High[h1[n]]; MaL = MaL + Low[l1[n]]; } MaH = MaH / HL_period; MaL = MaL / HL_period; ur[cb,1] = MaH; ur[cb,2] = MaL; if Close[mm + 1] >= MaH then { ll = 1; hh = 0; } if Close[mm + 1] <= MaL then { hh = 1; ll = 0; } } if ur[cb,1]==0 then { ur[cb,1] = ur[cb + 1,1]; ur[cb,2] = ur[cb + 1,2]; } if ll == 1 then { SetIndexValue2(cb,0); SetIndexValue(cb,ur[cb,2]); } else { if hh == 1 then { SetIndexValue(cb,0); SetIndexValue2(cb,ur[cb,1]); } }; } else { //----------------------------------------------------------------------------- if Period == 30 then //если график - М30 { if (TimeMinute(Time[cb])==0 & (TimeHour(Time[cb])==0 | TimeHour(Time[cb])==4 | TimeHour(Time[cb])==8 | TimeHour(Time[cb])==12 | TimeHour(Time[cb])==16 | TimeHour(Time[cb])==20)) then { n = cb - 10; while n <= cb + HL_period * 8 + 5 { if n < 0 then { Nbar = 0; n = 1; } if (TimeMinute(Time[n])==0 & (TimeHour(Time[n])==0 | TimeHour(Time[n])==4 | TimeHour(Time[n])==8 | TimeHour(Time[n])==12 | TimeHour(Time[n])==16 | TimeHour(Time[n])==20)) then { if Nbar==-1 then { Nbar = n; mm = n; n++; continue; } else { h1[k] = Highest(2,n,n - Nbar); l1[k] = Lowest(1,n,n - Nbar); k++; Nbar = n; }; } n++; } MaH = 0; MaL = 0; for n = 1 to HL_period { MaH = MaH + High[h1[n]]; MaL = MaL + Low[l1[n]]; } MaH = MaH / HL_period; MaL = MaL / HL_period; ur[cb,1] = MaH; ur[cb,2] = MaL; if Close[mm + 1] >= MaH then { ll = 1; hh = 0; } if Close[mm + 1] <= MaL then { hh = 1; ll = 0; } } if ur[cb,1]==0 then { ur[cb,1] = ur[cb + 1,1]; ur[cb,2] = ur[cb + 1,2]; } if ll == 1 then { SetIndexValue2(cb,0); SetIndexValue(cb,ur[cb,2]); } else { if hh == 1 then { SetIndexValue(cb,0); SetIndexValue2(cb,ur[cb,1]); } }; } else { //----------------------------------------------------------------------------- if Period == 60 then //если график - H1 { if (TimeMinute(Time[cb])==0 & (TimeHour(Time[cb])==0 | TimeHour(Time[cb])==4 | TimeHour(Time[cb])==8 | TimeHour(Time[cb])==12 | TimeHour(Time[cb])==16 | TimeHour(Time[cb])==20)) then { n = cb - 6; while n <= cb + HL_period * 4 + 3 { if n < 0 then { Nbar = 0; n = 1; } if (TimeMinute(Time[n])==0 & (TimeHour(Time[n])==0 | TimeHour(Time[n])==4 | TimeHour(Time[n])==8 | TimeHour(Time[n])==12 | TimeHour(Time[n])==16 | TimeHour(Time[n])==20)) then { if Nbar==-1 then { Nbar = n; mm = n; n++; continue; } else { h1[k] = Highest(2,n,n - Nbar); l1[k] = Lowest(1,n,n - Nbar); k++; Nbar = n; }; } n++; } MaH = 0; MaL = 0; for n = 1 to HL_period { MaH = MaH + High[h1[n]]; MaL = MaL + Low[l1[n]]; } MaH = MaH / HL_period; MaL = MaL / HL_period; ur[cb,1] = MaH; ur[cb,2] = MaL; if Close[mm + 1] >= MaH then { ll = 1; hh = 0; } if Close[mm + 1] <= MaL then { hh = 1; ll = 0; } } if ur[cb,1]==0 then { ur[cb,1] = ur[cb + 1,1]; ur[cb,2] = ur[cb + 1,2]; } if ll == 1 then { SetIndexValue2(cb,0); SetIndexValue(cb,ur[cb,2]); } else { if hh == 1 then { SetIndexValue(cb,0); SetIndexValue2(cb,ur[cb,1]); } }; } else { //----------------------------------------------------------------------------- if Period == 240 then //если график - H4 { if TimeDay(Time[cb + 1]) != TimeDay(Time[cb]) then { n = cb - 8; while n <= cb + HL_period * 8 + 4 { if n < 0 then { Nbar = 0; n = 1; } if TimeDay(Time[n + 1]) != TimeDay(Time[n]) then { if Nbar == -1 then { Nbar = n; mm = n; n++; continue; } else { h1[k] = Highest(2,n,n - Nbar); l1[k] = Lowest(1,n,n - Nbar); k++; Nbar = n; }; } n++; } MaH = 0; MaL = 0; for n = 1 to HL_period { MaH = MaH + High[h1[n]]; MaL = MaL + Low[l1[n]]; } MaH = MaH / HL_period; MaL = MaL / HL_period; ur[cb,1] = MaH; ur[cb,2] = MaL; if Close[mm + 1] >= MaH then { ll = 1; hh = 0; } if Close[mm + 1] <= MaL then { hh = 1; ll = 0; } } if ur[cb,1]==0 then { ur[cb,1] = ur[cb + 1,1]; ur[cb,2] = ur[cb + 1,2]; } if ll == 1 then { SetIndexValue2(cb,0); SetIndexValue(cb,ur[cb,2]); } else { if hh == 1 then { SetIndexValue(cb,0); SetIndexValue2(cb,ur[cb,1]); } }; } else { //----------------------------------------------------------------------------- if Period == 1440 then //если график - D1 { if TimeDayOfWeek(Time[cb + 1]) == 6 & TimeDayOfWeek(Time[cb]) == 2 then { n = cb - 6; while n <= cb + HL_period * 5 + 3 { if n < 0 then { Nbar = 0; n = 1; } if TimeDayOfWeek(Time[n + 1]) == 6 & TimeDayOfWeek(Time[n]) == 2 then { if Nbar==-1 then { Nbar = n; mm = n; n++; continue; } else { h1[k] = Highest(2,n,n - Nbar); l1[k] = Lowest(1,n,n - Nbar); k++; Nbar = n; }; } n++; } MaH = 0; MaL = 0; for n = 1 to HL_period { MaH = MaH + High[h1[n]]; MaL = MaL + Low[l1[n]]; } MaH = MaH / HL_period; MaL = MaL / HL_period; ur[cb,1] = MaH; ur[cb,2] = MaL; if Close[mm + 1] >= MaH then { ll = 1; hh = 0; } if Close[mm + 1] <= MaL then { hh = 1; ll = 0; } } if ur[cb,1]==0 then { ur[cb,1] = ur[cb + 1,1]; ur[cb,2] = ur[cb + 1,2]; } if ll == 1 then { SetIndexValue2(cb,0); SetIndexValue(cb,ur[cb,2]); } else { if hh == 1 then { SetIndexValue(cb,0); SetIndexValue2(cb,ur[cb,1]); } }; } else { //----------------------------------------------------------------------------- if Period == 10080 then //если график - W1 { if TimeMonth(Time[cb + 1]) != TimeMonth(Time[cb]) then { n = cb - 8; while n <= cb + HL_period * 8 + 4 { if n < 0 then { Nbar = 0; n = 1; } if TimeMonth(Time[n + 1]) != TimeMonth(Time[n]) then { if Nbar == -1 then { Nbar = n; mm = n; n++; continue; } else { h1[k] = Highest(2,n,n - Nbar); l1[k] = Lowest(1,n,n - Nbar); k++; Nbar = n; }; } n++; } MaH = 0; MaL = 0; for n = 1 to HL_period { MaH = MaH + High[h1[n]]; MaL = MaL + Low[l1[n]]; } MaH = MaH / HL_period; MaL = MaL / HL_period; ur[cb,1] = MaH; ur[cb,2] = MaL; if Close[mm + 1] >= MaH then { ll = 1; hh = 0; } if Close[mm + 1] <= MaL then { hh = 1; ll = 0; } } if ur[cb,1]==0 then { ur[cb,1] = ur[cb + 1,1]; ur[cb,2] = ur[cb + 1,2]; } if ll == 1 then { SetIndexValue2(cb,0); SetIndexValue(cb,ur[cb,2]); } else { if hh == 1 then { SetIndexValue(cb,0); SetIndexValue2(cb,ur[cb,1]); } }; } }}}}}} //----------------------------------------------------------------------------- };
может кто приведет алгоритм или ссылку где можно прочитать, единственное что нашел что связано с разработками Гана, а материала по данной теме у меня нет
СПАСИБО!!!
Имейте ввиду HL_Activator_Next - этот индюк перерисовывает историю на нескольких предыдущих барах
Я это поняла по работе с индикатором - не вижу в этом недостатка, просто важно об этом знать при принятии решений на основании показаний этого индикатора
очищенный и оптимозированный код посмотрела сегодня в процессе - по моему все отлично, работает аналогично исходному. Пока к сожалению не хватает умения переделать - пытаюсь переделать, для начала - пытаюсь заставить заработать часть, которая обсчитывает пятиминутки, но он ни как не хочет ни чего рисовать :-(
Даже тестовую печать не удается заставить написать
Может кто подскажет, что я не так делаю
Даже тестовую печать не удается заставить написать
Может кто подскажет, что я не так делаю
#property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Black #property indicator_color2 DeepSkyBlue //---- input parameters extern int HL_period=3; extern int NumBars=1000; //---- buffers double up[]; double dn[]; double ur1[]; double ur2[]; int h1[]; int l1[]; int shift=0; int nbar=0; int cb; Print("TEST"); //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW); SetIndexStyle(1,DRAW_ARROW); SetIndexBuffer(0,up); SetIndexBuffer(1,dn); SetIndexArrow(1,159); SetIndexArrow(0,159); // SetIndexEmptyValue(0,0.0); // SetIndexEmptyValue(1,0.0); Print("TEST"); //---- //---- // return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- // return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() {SetIndexDrawBegin(0,Bars-NumBars+HL_period); SetIndexDrawBegin(1,Bars-NumBars+HL_period); int counted_bars=IndicatorCounted(), n, Nbar, k, hh, ll, mm, limit; double MaH, MaL; Print("TEST"); //---- // Print("TEST"); // if(counted_bars!=0) // { // if(Bars-1-counted_bars>=0) limit=Bars-1-counted_bars; else limit=0; // } // else // { // limit=Bars-1; // } //---- for(n=0;n>=NumBars;n++) { ur1[n]=0.0; ur2[n]=0.0; h1[n]=0.0; l1[n]=0.0; } for(shift=NumBars;shift>=0;shift--) //глобальный цикл по всем барам { Nbar = -1; k = 1; mm = 0; Print("Расчет "+cb+" бара"); //----------------------- Расчет на M5 ------------------------------------------------------ if( Period()==PERIOD_M5 ) //если график - М5 { if( TimeHour(Time[shift+1])!=TimeHour(Time[shift])) { n=shift-15; Print("---- n="+n); while( n<=shift+HL_period*12+5 ) { if( n<0 ) { Nbar=0; n=1; } if( TimeHour(Time[n+1])!=TimeHour(Time[n]) && Nbar==-1 ) { Nbar=n; mm=n; n++; continue; } Print("---- Nbar="+Nbar+" n="+n+" mm"+mm); if( TimeHour(Time[n+1])!=TimeHour(Time[n]) && Nbar!= -1 ) { // h1[k]=High[Highest(NULL,0,MODE_HIGH,n-Nbar,n)]; // l1[k]=Low[Lowest(NULL,0,MODE_LOW,n-Nbar,n)]; // Print("---- Nbar="+Nbar+" n="+n+" mm"+mm+" h1["+k+"]="+h1[k]+" l1["+k+"]="+l1[k]); k++; Nbar=n; mm=n; n++; continue; } if( TimeHour(Time[n+1])!=TimeHour(Time[n]) && Nbar!= -1 ) { h1[k]=High[Highest(NULL,0,MODE_HIGH,n-Nbar,n)]; l1[k]=Low[Lowest(NULL,0,MODE_LOW,n-Nbar,n)]; k++; nbar=n; } n++; } MaH=0; MaL=0; for( n=1;n<=HL_period;n++ ) { MaH=MaH+High[h1[n]]; MaL=MaL+Low[l1[n]]; } MaH = MaH/HL_period; MaL = MaL/HL_period; ur1[shift]=MaH; ur2[shift]=MaL; if( Close[mm+1]>=MaH) { ll=1; hh=0; } if( Close[mm+1]<=MaL) { hh=1; ll=0; } } if (ur1[shift]==0) { ur1[shift]=ur1[shift+1]; ur2[shift]=ur2[shift+2]; } if( ll==1 ) { // up[shift]=ur2[shift]; // dn[shift]=0.0; up[shift]=ur2[shift]; dn[shift]=0; } if( hh==1 ) { up[shift]=0; dn[shift]=ur1[shift]; } } //else { //----------------------- Конец расчета на M5 ----------------------------------------------- //----------------------- Расчет на M15 ------------------------------------------------------ //----------------------- Конец расчета на M15 ----------------------------------------------- } Print("TEST"); return(0); } //+------------------------------------------------------------------+
СПАСИБО!!!
Имейте ввиду HL_Activator_Next - этот индюк перерисовывает историю на нескольких предыдущих барах
Я это поняла по работе с индикатором - не вижу в этом недостатка, просто важно об этом знать при принятии решений на основании показаний этого индикатора
Как же можно принимать во внимание показания индикатора, когда Вы их не знаете ? и не знаете сколько и каких будет изменено ? Этот индикатор изменяет показания по истории до пяти баров назад. Просто он сейчас может показывать, что если бы Вы выставили позицию пять баров (или три) бара назад, то было бы Вам счастье. Второй пример - выставляете ордер с учетом его показаний, а потом после изменеия по истории оказывается, что показывал то он в противоположную сторону.
Если это не является с Вашей точки зрения недостатками, то советую поплотнее сесть за изучение ТехАнализа.
Удачи.
Не думаю, что кто то принимает решение на основании только одного индикатора. а этот индикатор, на мой взгляд очень хорошо показывает направление тренда, и по моему не плохо сигнализирует - о приближении изменений. По крайней мере, из всех индикаторов, которые я видела - он лучший. А тактику использования этого конкретного индикатора можно обсудить отдельно. О себе могу сказать лишь одно - мне этот индикатор очень помогает, единственная трудность - что из за него мне приходится держать запущенными одновременно Mt3 и Mt4 и переключаться между окнами. Так что - я буду счастлива, если смогу перевести этот индикатор на MT4
что-то застопорился здесь:
h1[k]=High[Highest(NULL,0,MODE_HIGH,(n-Nbar),n)]; l1[k]=Low[Lowest(NULL,0,MODE_LOW,(n-Nbar),n)]; Print("---- k= "+k+" Nbar= "+Nbar+" n= "+n+" h1["+k+"]= "+h1[k]+" l1["+k+"]= "+l1[k]+" "+(Low[Lowest(NULL,0,MODE_LOW,(n-Nbar),n)])+" "+(High[Lowest(NULL,0,MODE_HIGH,(n-Nbar),n)]) );
на выходе получаю:
---- k= 1 Nbar= 965 n= 977 h1[1]= 0.00000000 l1[1]= 0.00000000 1.74330000 1.74350000 ---- k= 2 Nbar= 977 n= 986 h1[2]= 0.00000000 l1[2]= 0.00000000 1.74450000 1.74520000 ---- k= 3 Nbar= 986 n= 996 h1[3]= 0.00000000 l1[3]= 0.00000000 1.74580000 1.74620000 ---- k= 4 Nbar= 996 n= 1006 h1[4]= 0.00000000 l1[4]= 0.00000000 1.74480000 1.74580000 ---- k= 5 Nbar= 1006 n= 1017 h1[5]= 0.00000000 l1[5]= 0.00000000 1.74620000 1.74680000
т.е. хайжест и лоувест отдельно считаются а вот в буфер типа дабл никак не хотят :(
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
1 - первый
второй