Errors, bugs, questions - page 604

 
Urain:

Symbol and period don't have to be equal to chart, you can from other timeframes and symbols.

I was just surprised by this question (that's why I don't understand it), it's in iCustom() description

PS Getting the data of a calculated indicator is implemented via CopyBuffer() function, you need to specify its handle and the number of the buffer to be obtained (the description is in the manual).

PPS iCustom starts indicator calculation flow, CopyBuffer receives indicator data.

Sorry for being annoying, I had noticed the difference in spelling of "CCFp_2" and "CCFp__2". question removed.
 
sergeev:

so what?

is it your obligation to throw this indicator on a certain currency.

Anyway, don't bother - go and check it out.

Personally, everything works for me. I call it from an Expert Advisor and even throw it on a chart.

Wildly apologize for annoying, not immediately noticed the difference in the writing "CCFp_2" and "CCFp__2. question dismissed.
 
I can't understand why in Comment(line 114) ArrayMaximum and ArrayMinimum constantly show 199, despite the fact that the "c"(3rd parameterArrayMaximum/minimum) is constantly increasing...
Files:
 
Graff:
I can't understand why in Comment(line 114) ArrayMaximum and ArrayMinimum always show 199, despite the fact that "c"(3rd parameterArrayMaximum/minimum) constantly increases...

If line 110:

      while(wcond && y>=0 && c>=0 && !IsStopped())

replace with:

      if(wcond && y>=0 && c>=0 && !IsStopped())

...there start some cartoons...

In general, I suspect that a lot of embedded loops (including the implicit ones for ArrayMaximum), as well as in the indicator, hang the terminal at every tick! However, if Comment outputs not the results of extrema but some variable c, it will not hang in case of while.

Besides, look at the help:

int  ArrayMaximum(
   double  array[],               // массив для поиска
   int     start=0                // с какого индекса начинаем поиск
   int     count=WHOLE_ARRAY,     // количество проверяемых
   );

Here start always =199 while count increases from 0 to 200 - hence all the consequences. For example, it starts moving when i and c are swapped:

         hm=ArrayMaximum(h,c,i);
         lm=ArrayMinimum(l,c,i);
until it goes into minus with terminal error: array out of range.
 
Graff:
I can't understand why in Comment(line 114) ArrayMaximum and ArrayMinimum constantly show 199, despite the fact that the "c"(3rd parameterArrayMaximum/minimum) is constantly increasing...
   for(int i=calc_bars-1;i>=0;i--)// peaks loop//i=199
     {
      double pips_lh=0,pips_hl=0;
      int y=i,c=1;
      bool wcond=true;
      while(wcond && y>=0 && c>=0 && !IsStopped())
        {
         int hm=ArrayMaximum(h,i,c);//от 199
         int lm=ArrayMinimum(l,i,c);
         Comment(hm+" "+lm);
         double max_high=h[hm],min_low=l[lm];
         //Comment(max_high+" "+min_low);
         if(fabs(max_high-min_low)>min_pips)
           {
            HighestBuffer[hm]=h[hm];
            LowestBuffer[lm]=l[lm];
           }
         c++;// if h-l<min pips => add next bar
         y--;// new i
        }
      i=y;//цикл for где-та тут и заканчивается, т.е. выполняется 1 раз, когда i=199.
     }
 

Good afternoon, please advise who I can contact with the following problem - MT5 does not work on my second computer - I have tried everything possible - I changed the operating systems and providers, but as if an evil fate prevents me to see the terminal on my computer...

moby_dick:

Help me, please understand - MT5 works on my desktop computer, but it doesn't want to work on my laptop - says no connection to MetaQuotes-Demo... I can't open new demo account from the first release of MT5, or connect to demo account created on another computer... Both computers have Windows XP Pro SP3, my Internet connection is the same, disabling antivirus and firewall doesn't help... Maybe there are some mandatory components that need to be installed?

Thanks in advance - I'm with my laptop 99.9% of the time...


What is bad luck and how to deal with it???

As I wrote above (post 11.01.2010 14:03 ) MT5 stubbornly didn't want to work on my laptop from first to last release... I recently got a newer laptop that broke down and I got a newer one with multi-core chip etc... I was hoping to be able to get MT5 to work locally rather than from a VPS like I have been doing for the past 2 years, but installing MT5 I got a proxy prompt that I couldn't get around... I remembered that MT5 should work without installation, so I copied MT5 directory from VPS and tried to run... Runs without any problems, but immediately crashes as before... What the heck, the cobbler is not without boots, but he only sees his boots on the picture from the UPU on the other side of the earth... What can be done?

 
moby_dick:

Good afternoon, Could you please advise who I can contact with the following problem - MT5 is not working on my second computer - I tried everything - I changed operating systems and providers, but as if by an evil hand, I can not see the terminal on my computer...

Please write a request to Service Desk. You need details and we will try to sort it out.
Общайтесь с разработчиками через Сервисдеск!
Общайтесь с разработчиками через Сервисдеск!
  • www.mql5.com
Ваше сообщение сразу станет доступно нашим отделам тестирования, технической поддержки и разработчикам торговой платформы.
 

Hi! Standard library MovingAverages.mqh

//+------------------------------------------------------------------+
//| Simple Moving Average |
//+------------------------------------------------------------------+
double SimpleMA(const int position,const int period,const double &price[])
{
//---
double result=0.0;
//--- check position
if(position>=period && period>0)
{
//--- calculate value
for(int i=0;i<period;i++) result+=price[position-i];
result/=period;
}
//---
return(result);
}

It turns out that the SimpleMA function cannot get the average value of the whole array! Suppose there is a price[] array with 100 elements. I need to get its average value. I pass it into the function:

SimpleMA(99, 100, price);

I get 0, because 99<100. What prevents me from correcting period (highlighted in the code) to (period-1)?

Документация по MQL5: Стандартная библиотека
Документация по MQL5: Стандартная библиотека
  • www.mql5.com
Стандартная библиотека - Документация по MQL5
 
Question to the developers. The capabilities of the new build include the CHART_EVENT_MOUSE_MOVE event.

Will the CHART_EVENT_MOUSE_DOWN and CHART_EVENT_MOUSE_UP events be introduced?

Without them, you can't have full-fledged drag and drop.

 
Vigor:
Question to the developers. The capabilities of the new build include the CHART_EVENT_MOUSE_MOVE event.

Will you add CHART_EVENT_MOUSE_DOWN and CHART_EVENT_MOUSE_UP events?

Without them, drag and drop is not a full-fledged solution.

I support this request.

Now we have to use the functions GetCursorPos + GetKeyState.
With appearance of EVENT_MOUSE_MOVE, we won't need GetCursorPos and with MOUSE_DOWN and MOUSE_UP we won't need GetKeyState either.

MQL5 programs will first improve interactivity and responsiveness to user actions. Secondly - will be able to sell them in the Marketplace, because they will no longer use DLL.


Please write a request to servicedesk (you can with indication of this post). I am sure by the time you release a new build will have time to add. The implementation is not difficult.
Especially since it's already in the developers' interest - as the development of a standard library of controls is in progress.

PS.

I am very glad that the company itself decided to create a library of controls, and realized (encountered) that giving these features is simply necessary.
I hope the improvements in features and usability will continue.

Reason: